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: Allen Zhu <allenz@mellanox.com>
Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com>
Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com>
Change-Id: I2ebff51b7b7de418c5ac8fbd0265444fd27e1e10
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/3816
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom CI
Community-CI: Mellanox Build Bot
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
Reviewed-by: Paul Luse <paul.e.luse@intel.com>
This commit is contained in:
Allen Zhu 2020-08-07 10:31:06 +03:00 committed by Tomasz Zawadzki
parent 96ab62802c
commit 3e2c9092d4

View File

@ -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: