Commit 3e2c9092 authored by Allen Zhu's avatar Allen Zhu Committed by Tomasz Zawadzki
Browse files

rpc/bdev.py: pass zero values to SPDK when allowed



In bdev_nvme_set_options command, timeout_us/retry_count/arbitration_burst/low_priority_weight/
medium_prioity_weight/high_prioity_weight/nvme_ioq_poll_period_us/io_queue_requests can be 0,
which should be passed in the rpc command.

Signed-off-by: default avatarAllen Zhu <allenz@mellanox.com>
Signed-off-by: default avatarAlexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: default avatarEvgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2ebff51b7b7de418c5ac8fbd0265444fd27e1e10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3816


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarPaul Luse <paul.e.luse@intel.com>
parent 96ab6280
Loading
Loading
Loading
Loading
+8 −8
Original line number Diff line number Diff line
@@ -406,31 +406,31 @@ def bdev_nvme_set_options(client, action_on_timeout=None, timeout_us=None, retry
    if action_on_timeout:
        params['action_on_timeout'] = action_on_timeout

    if timeout_us:
    if timeout_us is not None:
        params['timeout_us'] = timeout_us

    if retry_count:
    if retry_count is not None:
        params['retry_count'] = retry_count

    if arbitration_burst:
    if arbitration_burst is not None:
        params['arbitration_burst'] = arbitration_burst

    if low_priority_weight:
    if low_priority_weight is not None:
        params['low_priority_weight'] = low_priority_weight

    if medium_priority_weight:
    if medium_priority_weight is not None:
        params['medium_priority_weight'] = medium_priority_weight

    if high_priority_weight:
    if high_priority_weight is not None:
        params['high_priority_weight'] = high_priority_weight

    if nvme_adminq_poll_period_us:
        params['nvme_adminq_poll_period_us'] = nvme_adminq_poll_period_us

    if nvme_ioq_poll_period_us:
    if nvme_ioq_poll_period_us is not None:
        params['nvme_ioq_poll_period_us'] = nvme_ioq_poll_period_us

    if io_queue_requests:
    if io_queue_requests is not None:
        params['io_queue_requests'] = io_queue_requests

    if delay_cmd_submit is not None: