nvmf/tcp: Add the sock priority setting in conf file.

We already support in rpc and we also need the support in conf
file.

Signed-off-by: Ziye Yang <ziye.yang@intel.com>
Change-Id: Ic0d64c48c21954d913ef7345ce35a767e8e285bd
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/476186
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
Community-CI: Broadcom SPDK FC-NVMe CI <spdk-ci.pdl@broadcom.com>
Reviewed-by: Ben Walker <benjamin.walker@intel.com>
Reviewed-by: Changpeng Liu <changpeng.liu@intel.com>
This commit is contained in:
Ziye Yang 2019-11-30 01:53:41 +08:00 committed by Tomasz Zawadzki
parent 94f2def65a
commit c322751769
3 changed files with 13 additions and 0 deletions

View File

@ -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. 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 ### util
`spdk_pipe`, a new utility for buffering data from sockets or files for parsing `spdk_pipe`, a new utility for buffering data from sockets or files for parsing

View File

@ -146,6 +146,9 @@
# Set whether to use the C2H Success optimization, only used for TCP transport. # Set whether to use the C2H Success optimization, only used for TCP transport.
# C2HSuccess true # C2HSuccess true
# Set whether to use different priority for socket, only used for TCP transport.
# SockPriority 0
# Define FC transport # Define FC transport
#[Transport] #[Transport]
# Set FC transport type. # Set FC transport type.

View File

@ -638,6 +638,11 @@ spdk_nvmf_parse_transport(struct spdk_nvmf_parse_transport_ctx *ctx)
if (trtype == SPDK_NVME_TRANSPORT_TCP) { if (trtype == SPDK_NVME_TRANSPORT_TCP) {
bval = spdk_conf_section_get_boolval(ctx->sp, "C2HSuccess", true); bval = spdk_conf_section_get_boolval(ctx->sp, "C2HSuccess", true);
opts.c2h_success = bval; 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); bval = spdk_conf_section_get_boolval(ctx->sp, "DifInsertOrStrip", false);