Commit 3709db73 authored by Seth Howell's avatar Seth Howell Committed by Ben Walker
Browse files

nvmf: add buf_cache_size to conf and rpc functions



Change-Id: I11514dc5981e9750d693202ff86af22b2064ae72
Signed-off-by: default avatarSeth Howell <seth.howell@intel.com>
Reviewed-on: https://review.gerrithub.io/c/439434


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Chandler-Test-Pool: SPDK Automated Test System <sys_sgsw@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
parent 3d0c4138
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -94,6 +94,9 @@
  # It is used to provide the read/write data buffers for the qpairs on this transport.
  #NumSharedBuffers 512

  # Set the number of shared buffers to be cached per poll group
  #BufCacheSize 32

[Nvme]
  # NVMe Device Whitelist
  # Users may specify which NVMe devices to claim by their transport id.
+5 −0
Original line number Diff line number Diff line
@@ -524,6 +524,11 @@ spdk_nvmf_parse_transport(struct spdk_nvmf_parse_transport_ctx *ctx)
	if (val >= 0) {
		opts.num_shared_buffers = val;
	}
	val = spdk_conf_section_get_intval(ctx->sp, "BufCacheSize");
	if (val >= 0) {
		opts.buf_cache_size = val;
	}


	transport = spdk_nvmf_transport_create(trtype, &opts);
	if (transport) {
+1 −0
Original line number Diff line number Diff line
@@ -1590,6 +1590,7 @@ dump_nvmf_transport(struct spdk_json_write_ctx *w, struct spdk_nvmf_transport *t
	spdk_json_write_named_uint32(w, "io_unit_size", opts->io_unit_size);
	spdk_json_write_named_uint32(w, "max_aq_depth", opts->max_aq_depth);
	spdk_json_write_named_uint32(w, "num_shared_buffers", opts->num_shared_buffers);
	spdk_json_write_named_uint32(w, "buf_cache_size", opts->buf_cache_size);

	spdk_json_write_object_end(w);
}