rpc: fix nvmf_create_transport c2h_success option.
This option was intended to enable the user to disable the c2h_option, but because of the way arguments filter down through the python script, it was actually impossible to disable the optimization. My understanding is that typically we will want to keep this optimization enabled on most systems, but the option should work like it says it does. Also, align the implementation of this function with the other ones on the RPC i.e. use the store_true, store_false paradigm. Change-Id: I59f0e9a573abf1d567e5539294c63c68899b35f1 Signed-off-by: Seth Howell <seth.howell@intel.com> Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461737 Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
dc53a9de36
commit
e2c0d9a294
@ -19,7 +19,9 @@ This allows the user to specify which file to store the persistent reservation s
|
||||
that this is done per namespace.
|
||||
|
||||
The c2h success optimization under which a command capsule response is not sent
|
||||
for reads is turned on. A config knob was added to allow for enable/disable.
|
||||
for reads is turned on by default. A config knob was added to allow disabling
|
||||
the optimization. This will mostly be used for integration testing with 5.0.x kernels
|
||||
while some compatibility fixes make their way down the pipeline for 5.1.x kernels.
|
||||
|
||||
Shared receive queue can now be disabled even for NICs that support it using the
|
||||
`nvmf_create_transport` RPC method parameter `no_srq`. The actual use of a shared
|
||||
|
@ -3614,7 +3614,7 @@ num_shared_buffers | Optional | number | The number of pooled data buf
|
||||
buf_cache_size | Optional | number | The number of shared buffers to reserve for each poll group
|
||||
max_srq_depth | Optional | number | The number of elements in a per-thread shared receive queue (RDMA only)
|
||||
no_srq | Optional | boolean | Disable shared receive queue even for devices that support it. (RDMA only)
|
||||
c2h_success | Optional | boolean | Enable C2H success optimization (TCP only)
|
||||
c2h_success | Optional | boolean | Disable C2H success optimization (TCP only)
|
||||
dif_insert_or_strip | Optional | boolean | Enable DIF insert for write I/O and DIF strip for read I/O DIF (TCP only)
|
||||
|
||||
### Example:
|
||||
|
@ -1433,7 +1433,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.add_argument('-b', '--buf-cache-size', help='The number of shared buffers to reserve for each poll group', type=int)
|
||||
p.add_argument('-s', '--max-srq-depth', help='Max number of outstanding I/O per SRQ. Relevant only for RDMA transport', type=int)
|
||||
p.add_argument('-r', '--no-srq', action='store_true', help='Disable per-thread shared receive queue. Relevant only for RDMA transport')
|
||||
p.add_argument('-o', '--c2h-success', help='Enable C2H success optimization. Relevant only for TCP transport', type=bool)
|
||||
p.add_argument('-o', '--c2h-success', action='store_false', help='Disable C2H success optimization. Relevant only for TCP transport')
|
||||
p.add_argument('-f', '--dif-insert-or-strip', action='store_true', help='Enable DIF insert/strip. Relevant only for TCP transport')
|
||||
p.set_defaults(func=nvmf_create_transport)
|
||||
|
||||
|
@ -63,7 +63,7 @@ def nvmf_create_transport(client,
|
||||
buf_cache_size: The number of shared buffers to reserve for each poll group (optional)
|
||||
max_srq_depth: Max number of outstanding I/O per shared receive queue - RDMA specific (optional)
|
||||
no_srq: Boolean flag to disable SRQ even for devices that support it - RDMA specific (optional)
|
||||
c2h_success: Boolean flag to enable/disable the C2H success optimization - TCP specific (optional)
|
||||
c2h_success: Boolean flag to disable the C2H success optimization - TCP specific (optional)
|
||||
dif_insert_or_strip: Boolean flag to enable DIF insert/strip for I/O - TCP specific (optional)
|
||||
|
||||
Returns:
|
||||
@ -92,7 +92,7 @@ def nvmf_create_transport(client,
|
||||
params['max_srq_depth'] = max_srq_depth
|
||||
if no_srq:
|
||||
params['no_srq'] = no_srq
|
||||
if c2h_success:
|
||||
if c2h_success is not None:
|
||||
params['c2h_success'] = c2h_success
|
||||
if dif_insert_or_strip:
|
||||
params['dif_insert_or_strip'] = dif_insert_or_strip
|
||||
|
Loading…
Reference in New Issue
Block a user