Commit 4739f623 authored by Ziye Yang's avatar Ziye Yang Committed by Darek Stojaczyk
Browse files

nvmf: enable transport based scheduler decode in RPC.



Purpose: To eanble the transport based scheduler in RPC.
Previously, we only support it with configuration file.

Signed-off-by: default avatarZiye Yang <ziye.yang@intel.com>
Change-Id: I02ae9b1b316d4fec8b28b550e70dcdc78ce78722
Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461645


Reviewed-by: default avatarChangpeng Liu <changpeng.liu@intel.com>
Reviewed-by: default avatarDarek Stojaczyk <dariusz.stojaczyk@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent 0abee610
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -1339,6 +1339,8 @@ static int decode_conn_sched(const struct spdk_json_val *val, void *out)
		*sched = CONNECT_SCHED_ROUND_ROBIN;
	} else if (spdk_json_strequal(val, "hostip") == true) {
		*sched = CONNECT_SCHED_HOST_IP;
	} else if (spdk_json_strequal(val, "transport") == true) {
		*sched = CONNECT_SCHED_TRANSPORT_OPTIMAL_GROUP;
	} else {
		SPDK_ERRLOG("Invalid connection scheduling parameter\n");
		return -EINVAL;
+2 −0
Original line number Diff line number Diff line
@@ -515,6 +515,8 @@ get_conn_sched_string(enum spdk_nvmf_connect_sched sched)
{
	if (sched == CONNECT_SCHED_HOST_IP) {
		return "hostip";
	} else if (sched == CONNECT_SCHED_TRANSPORT_OPTIMAL_GROUP) {
		return "transport";
	} else {
		return "roundrobin";
	}
+1 −1
Original line number Diff line number Diff line
@@ -1402,7 +1402,7 @@ Format: 'user:u1 secret:s1 muser:mu1 msecret:ms1,user:u2 secret:s2 muser:mu2 mse
    p.add_argument('-s', '--conn-sched', help="""'roundrobin' - Schedule the incoming connections from any host
    on the cores in a round robin manner (Default). 'hostip' - Schedule all the incoming connections from a
    specific host IP on to the same core. Connections from different IP will be assigned to cores in a round
    robin manner""")
    robin manner. 'transport' - Schedule the connection according to the transport characteristics.""")
    p.set_defaults(func=set_nvmf_target_config)

    def nvmf_create_transport(args):