nvmf: Add dif_insert_or_strip to transport options
This is a place holder and subsequent patches will use the option dif_insert_or_strip and provide JSON RPCs to configure it. Signed-off-by: Shuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com> Change-Id: I7e3fbb1d49c47647a9a0a1a2149152801591b283 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/456452 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Paul Luse <paul.e.luse@intel.com> Reviewed-by: Ziye Yang <ziye.yang@intel.com> Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
parent
ddb680ebab
commit
aa322721cb
@ -75,6 +75,7 @@ struct spdk_nvmf_transport_opts {
|
|||||||
uint32_t max_srq_depth;
|
uint32_t max_srq_depth;
|
||||||
bool no_srq;
|
bool no_srq;
|
||||||
bool c2h_success;
|
bool c2h_success;
|
||||||
|
bool dif_insert_or_strip;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -539,7 +539,8 @@ spdk_nvmf_tcp_create(struct spdk_nvmf_transport_opts *opts)
|
|||||||
" Transport opts: max_ioq_depth=%d, max_io_size=%d,\n"
|
" Transport opts: max_ioq_depth=%d, max_io_size=%d,\n"
|
||||||
" max_qpairs_per_ctrlr=%d, io_unit_size=%d,\n"
|
" max_qpairs_per_ctrlr=%d, io_unit_size=%d,\n"
|
||||||
" in_capsule_data_size=%d, max_aq_depth=%d\n"
|
" in_capsule_data_size=%d, max_aq_depth=%d\n"
|
||||||
" num_shared_buffers=%d, c2h_success=%d\n",
|
" num_shared_buffers=%d, c2h_success=%d,\n"
|
||||||
|
" dif_insert_or_strip=%d\n",
|
||||||
opts->max_queue_depth,
|
opts->max_queue_depth,
|
||||||
opts->max_io_size,
|
opts->max_io_size,
|
||||||
opts->max_qpairs_per_ctrlr,
|
opts->max_qpairs_per_ctrlr,
|
||||||
@ -547,7 +548,8 @@ spdk_nvmf_tcp_create(struct spdk_nvmf_transport_opts *opts)
|
|||||||
opts->in_capsule_data_size,
|
opts->in_capsule_data_size,
|
||||||
opts->max_aq_depth,
|
opts->max_aq_depth,
|
||||||
opts->num_shared_buffers,
|
opts->num_shared_buffers,
|
||||||
opts->c2h_success);
|
opts->c2h_success,
|
||||||
|
opts->dif_insert_or_strip);
|
||||||
|
|
||||||
/* I/O unit size cannot be larger than max I/O size */
|
/* I/O unit size cannot be larger than max I/O size */
|
||||||
if (opts->io_unit_size > opts->max_io_size) {
|
if (opts->io_unit_size > opts->max_io_size) {
|
||||||
@ -2825,6 +2827,7 @@ spdk_nvmf_tcp_qpair_set_sq_size(struct spdk_nvmf_qpair *qpair)
|
|||||||
#define SPDK_NVMF_TCP_DEFAULT_NUM_SHARED_BUFFERS 511
|
#define SPDK_NVMF_TCP_DEFAULT_NUM_SHARED_BUFFERS 511
|
||||||
#define SPDK_NVMF_TCP_DEFAULT_BUFFER_CACHE_SIZE 32
|
#define SPDK_NVMF_TCP_DEFAULT_BUFFER_CACHE_SIZE 32
|
||||||
#define SPDK_NVMF_TCP_DEFAULT_SUCCESS_OPTIMIZATION true
|
#define SPDK_NVMF_TCP_DEFAULT_SUCCESS_OPTIMIZATION true
|
||||||
|
#define SPDK_NVMF_TCP_DEFAULT_DIF_INSERT_OR_STRIP false
|
||||||
|
|
||||||
static void
|
static void
|
||||||
spdk_nvmf_tcp_opts_init(struct spdk_nvmf_transport_opts *opts)
|
spdk_nvmf_tcp_opts_init(struct spdk_nvmf_transport_opts *opts)
|
||||||
@ -2838,6 +2841,7 @@ spdk_nvmf_tcp_opts_init(struct spdk_nvmf_transport_opts *opts)
|
|||||||
opts->num_shared_buffers = SPDK_NVMF_TCP_DEFAULT_NUM_SHARED_BUFFERS;
|
opts->num_shared_buffers = SPDK_NVMF_TCP_DEFAULT_NUM_SHARED_BUFFERS;
|
||||||
opts->buf_cache_size = SPDK_NVMF_TCP_DEFAULT_BUFFER_CACHE_SIZE;
|
opts->buf_cache_size = SPDK_NVMF_TCP_DEFAULT_BUFFER_CACHE_SIZE;
|
||||||
opts->c2h_success = SPDK_NVMF_TCP_DEFAULT_SUCCESS_OPTIMIZATION;
|
opts->c2h_success = SPDK_NVMF_TCP_DEFAULT_SUCCESS_OPTIMIZATION;
|
||||||
|
opts->dif_insert_or_strip = SPDK_NVMF_TCP_DEFAULT_DIF_INSERT_OR_STRIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
const struct spdk_nvmf_transport_ops spdk_nvmf_transport_tcp = {
|
const struct spdk_nvmf_transport_ops spdk_nvmf_transport_tcp = {
|
||||||
|
Loading…
Reference in New Issue
Block a user