diff --git a/CHANGELOG.md b/CHANGELOG.md index f82bd9c3a..d98e24c8b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -27,6 +27,11 @@ Added boolean return value for function spdk_fs_set_cache_size to indicate its o Added `blobfs_set_cache_size` RPC method to set cache size for blobstore filesystem. +### nvmf + +Add SockPriority option in [Transport] section, this can be used for NVMe-oF target +on TCP transport to set sock priority for the incomming TCP connections. + ### util `spdk_pipe`, a new utility for buffering data from sockets or files for parsing diff --git a/etc/spdk/nvmf.conf.in b/etc/spdk/nvmf.conf.in index 6731b273c..5799f65cf 100644 --- a/etc/spdk/nvmf.conf.in +++ b/etc/spdk/nvmf.conf.in @@ -146,6 +146,9 @@ # Set whether to use the C2H Success optimization, only used for TCP transport. # C2HSuccess true + # Set whether to use different priority for socket, only used for TCP transport. + # SockPriority 0 + # Define FC transport #[Transport] # Set FC transport type. diff --git a/module/event/subsystems/nvmf/conf.c b/module/event/subsystems/nvmf/conf.c index f686f7c23..5f78bcb46 100644 --- a/module/event/subsystems/nvmf/conf.c +++ b/module/event/subsystems/nvmf/conf.c @@ -638,6 +638,11 @@ spdk_nvmf_parse_transport(struct spdk_nvmf_parse_transport_ctx *ctx) if (trtype == SPDK_NVME_TRANSPORT_TCP) { bval = spdk_conf_section_get_boolval(ctx->sp, "C2HSuccess", true); opts.c2h_success = bval; + + val = spdk_conf_section_get_intval(ctx->sp, "SockPriority"); + if (val >= 0) { + opts.sock_priority = val; + } } bval = spdk_conf_section_get_boolval(ctx->sp, "DifInsertOrStrip", false);