Lines Matching defs:opts
68 return &transport->opts;
75 const struct spdk_nvmf_transport_opts *opts = spdk_nvmf_get_transport_opts(transport);
80 spdk_json_write_named_uint32(w, "max_queue_depth", opts->max_queue_depth);
81 spdk_json_write_named_uint32(w, "max_io_qpairs_per_ctrlr", opts->max_qpairs_per_ctrlr - 1);
82 spdk_json_write_named_uint32(w, "in_capsule_data_size", opts->in_capsule_data_size);
83 spdk_json_write_named_uint32(w, "max_io_size", opts->max_io_size);
84 spdk_json_write_named_uint32(w, "io_unit_size", opts->io_unit_size);
85 spdk_json_write_named_uint32(w, "max_aq_depth", opts->max_aq_depth);
86 spdk_json_write_named_uint32(w, "num_shared_buffers", opts->num_shared_buffers);
87 spdk_json_write_named_uint32(w, "buf_cache_size", opts->buf_cache_size);
88 spdk_json_write_named_bool(w, "dif_insert_or_strip", opts->dif_insert_or_strip);
89 spdk_json_write_named_bool(w, "zcopy", opts->zcopy);
95 spdk_json_write_named_uint32(w, "abort_timeout_sec", opts->abort_timeout_sec);
96 spdk_json_write_named_uint32(w, "ack_timeout", opts->ack_timeout);
97 spdk_json_write_named_uint32(w, "data_wr_pool_size", opts->data_wr_pool_size);
126 nvmf_transport_opts_copy(struct spdk_nvmf_transport_opts *opts,
130 assert(opts);
133 opts->opts_size = opts_size;
136 if (offsetof(struct spdk_nvmf_transport_opts, field) + sizeof(opts->field) <= opts_size) { \
137 opts->field = opts_src->field; \
167 struct spdk_nvmf_transport_opts opts;
175 return transport->opts.num_shared_buffers || transport->opts.buf_cache_size;
192 transport->opts = ctx->opts;
222 nvmf_transport_create_async_done(_ctx, _ctx->ops->create(&_ctx->opts));
226 nvmf_transport_create(const char *transport_name, struct spdk_nvmf_transport_opts *opts,
239 if (!opts) {
240 SPDK_ERRLOG("opts should not be NULL\n");
244 if (!opts->opts_size) {
245 SPDK_ERRLOG("The opts_size in opts structure should not be zero\n");
255 nvmf_transport_opts_copy(&ctx->opts, opts, opts->opts_size);
256 if (ctx->opts.max_io_size != 0 && (!spdk_u32_is_pow2(ctx->opts.max_io_size) ||
257 ctx->opts.max_io_size < 8192)) {
259 ctx->opts.max_io_size);
263 if (ctx->opts.max_aq_depth < SPDK_NVMF_MIN_ADMIN_MAX_SQ_SIZE) {
265 ctx->opts.max_aq_depth);
266 ctx->opts.max_aq_depth = SPDK_NVMF_MIN_ADMIN_MAX_SQ_SIZE;
270 if (ctx->opts.io_unit_size == 0) {
274 if (ctx->opts.io_unit_size > opts_iobuf.large_bufsize) {
276 ctx->opts.io_unit_size, opts_iobuf.large_bufsize);
280 if (ctx->opts.io_unit_size <= opts_iobuf.small_bufsize) {
287 if (ctx->opts.num_shared_buffers > count) {
290 ctx->opts.num_shared_buffers, count);
312 rc = ctx->ops->create_async(&ctx->opts, nvmf_transport_create_async_done, ctx);
325 spdk_nvmf_transport_create_async(const char *transport_name, struct spdk_nvmf_transport_opts *opts,
328 return nvmf_transport_create(transport_name, opts, cb_fn, cb_arg, false);
340 spdk_nvmf_transport_create(const char *transport_name, struct spdk_nvmf_transport_opts *opts)
347 nvmf_transport_create(transport_name, opts, nvmf_transport_create_sync_done, &transport, true);
400 const struct spdk_nvme_transport_id *trid, struct spdk_nvmf_listen_opts *opts)
414 listener->sock_impl = opts->sock_impl;
417 rc = transport->ops->listen(transport, &listener->trid, opts);
426 if (opts->sock_impl && strncmp(opts->sock_impl, listener->sock_impl, strlen(listener->sock_impl))) {
427 SPDK_ERRLOG("opts->sock_impl: '%s' doesn't match listener->sock_impl: '%s'\n", opts->sock_impl,
619 buf_cache_size = transport->opts.buf_cache_size;
628 uint32_t num_shared_buffers = transport->opts.num_shared_buffers;
642 if (transport->opts.io_unit_size <= opts_iobuf.small_bufsize) {
827 struct spdk_nvmf_transport_opts *opts, size_t opts_size)
838 if (!opts) {
839 SPDK_ERRLOG("opts should not be NULL\n");
844 SPDK_ERRLOG("opts_size inside opts should not be zero value\n");
853 nvmf_transport_opts_copy(opts, &opts_local, opts_size);
956 uint32_t io_unit_size = transport->opts.io_unit_size;
979 rc = nvmf_request_get_buffers(req, group, transport, length, transport->opts.io_unit_size, false);
999 req->qpair->transport->opts.io_unit_size));
1039 uint32_t io_unit_size = transport->opts.io_unit_size / block_size * data_block_size;