nvmf_rpc: add control for rdma buffer cache size

Change-Id: I63e433a7e0aa5374b12ca6c12a4855900cf2d2c6
Signed-off-by: Seth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439431
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
Seth Howell 2019-01-07 13:53:44 -07:00 committed by Ben Walker
parent e6ddb7df3f
commit 2740f26841
3 changed files with 12 additions and 2 deletions

View File

@ -1454,6 +1454,10 @@ static const struct spdk_json_object_decoder nvmf_rpc_create_transport_decoder[]
"num_shared_buffers", offsetof(struct nvmf_rpc_create_transport_ctx, opts.num_shared_buffers),
spdk_json_decode_uint32, true
},
{
"buf_cache_size", offsetof(struct nvmf_rpc_create_transport_ctx, opts.buf_cache_size),
spdk_json_decode_uint32, true
},
};
static void

View File

@ -1280,7 +1280,8 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
max_io_size=args.max_io_size,
io_unit_size=args.io_unit_size,
max_aq_depth=args.max_aq_depth,
num_shared_buffers=args.num_shared_buffers)
num_shared_buffers=args.num_shared_buffers,
buf_cache_size=args.buf_cache_size)
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)
@ -1291,6 +1292,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
p.add_argument('-u', '--io-unit-size', help='I/O unit size (bytes)', type=int)
p.add_argument('-a', '--max-aq-depth', help='Max number of admin cmds per AQ', type=int)
p.add_argument('-n', '--num-shared-buffers', help='The number of pooled data buffers available to the transport', type=int)
p.add_argument('-b', '--buf-cache-size', help='The number of shared buffers to cache per poll group', type=int)
p.set_defaults(func=nvmf_create_transport)
def get_nvmf_transports(args):

View File

@ -82,7 +82,8 @@ def nvmf_create_transport(client,
max_io_size=None,
io_unit_size=None,
max_aq_depth=None,
num_shared_buffers=None):
num_shared_buffers=None,
buf_cache_size=None):
"""NVMf Transport Create options.
Args:
@ -94,6 +95,7 @@ def nvmf_create_transport(client,
io_unit_size: I/O unit size in bytes (optional)
max_aq_depth: Max size admin quque per controller (optional)
num_shared_buffers: The number of pooled data buffers available to the transport (optional)
buf_cache_size: The number of shared buffers to cache per poll group (optional)
Returns:
True or False
@ -115,6 +117,8 @@ def nvmf_create_transport(client,
params['max_aq_depth'] = max_aq_depth
if num_shared_buffers:
params['num_shared_buffers'] = num_shared_buffers
if buf_cache_size:
params['buf_cache_size'] = buf_cache_size
return client.call('nvmf_create_transport', params)