nvmf/rdma: Add RPC to set new RDMA batching option
Add option to enable/disable work requests batching (RDMA only). Signed-off-by: Ivan Betsis <c_ivanb@mellanox.com> Signed-off-by: Evgeniy Kochetov <evgeniik@mellanox.com> Signed-off-by: Alexey Marchuk <alexeymar@mellanox.com> Signed-off-by: Sasha Kotchubievsky <sashakot@mellanox.com> Change-Id: I84ca599711cdc2713606444e7ec501c36671e796 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/925 Reviewed-by: Jim Harris <james.r.harris@intel.com> Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Community-CI: Broadcom CI
This commit is contained in:
parent
c818233b41
commit
bd3840a729
@ -68,6 +68,8 @@ RPC.
|
||||
A new RPC `bdev_examine_bdev` was added to allow users to examine a bdev explicitly.
|
||||
It can be used only if bdev_auto_examine is set to false by the RPC `bdev_set_options`.
|
||||
|
||||
Add optional 'no_wr_batching' parameter to 'nvmf_create_transport' RPC method.
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
The contents of the log_rpc library have been moved to the event library. The log_rpc
|
||||
|
@ -4714,6 +4714,7 @@ dif_insert_or_strip | Optional | boolean | Enable DIF insert for write I
|
||||
sock_priority | Optional | number | The socket priority of the connection owned by this transport (TCP only)
|
||||
acceptor_backlog | Optional | number | The number of pending connections allowed in backlog before failing new connection attempts (RDMA only)
|
||||
abort_timeout_sec | Optional | number | Abort execution timeout value, in seconds
|
||||
no_wr_batching | Optional | boolean | Disable work requests batching (RDMA only)
|
||||
|
||||
### Example
|
||||
|
||||
|
@ -510,6 +510,10 @@ static const struct spdk_json_object_decoder rdma_transport_opts_decoder[] = {
|
||||
"no_srq", offsetof(struct rdma_transport_opts, no_srq),
|
||||
spdk_json_decode_bool, true
|
||||
},
|
||||
{
|
||||
"no_wr_batching", offsetof(struct rdma_transport_opts, no_wr_batching),
|
||||
spdk_json_decode_bool, true
|
||||
},
|
||||
{
|
||||
"acceptor_backlog", offsetof(struct rdma_transport_opts, acceptor_backlog),
|
||||
spdk_json_decode_int32, true
|
||||
@ -2562,6 +2566,7 @@ nvmf_rdma_dump_opts(struct spdk_nvmf_transport *transport, struct spdk_json_writ
|
||||
spdk_json_write_named_uint32(w, "max_srq_depth", rtransport->rdma_opts.max_srq_depth);
|
||||
spdk_json_write_named_bool(w, "no_srq", rtransport->rdma_opts.no_srq);
|
||||
spdk_json_write_named_int32(w, "acceptor_backlog", rtransport->rdma_opts.acceptor_backlog);
|
||||
spdk_json_write_named_bool(w, "no_wr_batching", rtransport->rdma_opts.no_wr_batching);
|
||||
}
|
||||
|
||||
static int
|
||||
|
@ -1805,7 +1805,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
dif_insert_or_strip=args.dif_insert_or_strip,
|
||||
sock_priority=args.sock_priority,
|
||||
acceptor_backlog=args.acceptor_backlog,
|
||||
abort_timeout_sec=args.abort_timeout_sec)
|
||||
abort_timeout_sec=args.abort_timeout_sec,
|
||||
no_wr_batching=args.no_wr_batching)
|
||||
|
||||
p = subparsers.add_parser('nvmf_create_transport', help='Create NVMf transport')
|
||||
p.add_argument('-t', '--trtype', help='Transport type (ex. RDMA)', type=str, required=True)
|
||||
@ -1827,6 +1828,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
|
||||
p.add_argument('-y', '--sock-priority', help='The sock priority of the tcp connection. Relevant only for TCP transport', type=int)
|
||||
p.add_argument('-l', '--acceptor_backlog', help='Pending connections allowed at one time. Relevant only for RDMA transport', type=int)
|
||||
p.add_argument('-x', '--abort-timeout-sec', help='Abort execution timeout value, in seconds', type=int)
|
||||
p.add_argument('-w', '--no-wr-batching', action='store_true', help='Disable work requests batching. Relevant only for RDMA transport')
|
||||
p.set_defaults(func=nvmf_create_transport)
|
||||
|
||||
def nvmf_get_transports(args):
|
||||
|
@ -109,7 +109,8 @@ def nvmf_create_transport(client,
|
||||
dif_insert_or_strip=None,
|
||||
sock_priority=None,
|
||||
acceptor_backlog=None,
|
||||
abort_timeout_sec=None):
|
||||
abort_timeout_sec=None,
|
||||
no_wr_batching=None):
|
||||
"""NVMf Transport Create options.
|
||||
|
||||
Args:
|
||||
@ -129,7 +130,7 @@ def nvmf_create_transport(client,
|
||||
dif_insert_or_strip: Boolean flag to enable DIF insert/strip for I/O - TCP specific (optional)
|
||||
acceptor_backlog: Pending connections allowed at one time - RDMA specific (optional)
|
||||
abort_timeout_sec: Abort execution timeout value, in seconds (optional)
|
||||
|
||||
no_wr_batching: Boolean flag to disable work requests batching - RDMA specific (optional)
|
||||
Returns:
|
||||
True or False
|
||||
"""
|
||||
@ -171,6 +172,8 @@ def nvmf_create_transport(client,
|
||||
params['acceptor_backlog'] = acceptor_backlog
|
||||
if abort_timeout_sec:
|
||||
params['abort_timeout_sec'] = abort_timeout_sec
|
||||
if no_wr_batching is not None:
|
||||
params['no_wr_batching'] = no_wr_batching
|
||||
return client.call('nvmf_create_transport', params)
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user