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: Ziye Yang <ziye.yang@intel.com> Change-Id: I02ae9b1b316d4fec8b28b550e70dcdc78ce78722 Reviewed-on: https://review.gerrithub.io/c/spdk/spdk/+/461645 Reviewed-by: Changpeng Liu <changpeng.liu@intel.com> Reviewed-by: Darek Stojaczyk <dariusz.stojaczyk@intel.com> Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
parent
0abee610f0
commit
4739f62365
@ -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;
|
||||
|
@ -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";
|
||||
}
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user