From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 36732A046B for ; Fri, 23 Aug 2019 16:48:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 29CCE1C10D; Fri, 23 Aug 2019 16:46:39 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 01F4E1C035 for ; Fri, 23 Aug 2019 16:46:22 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga101.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Aug 2019 07:46:22 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,421,1559545200"; d="scan'208";a="263211324" Received: from silpixa00381635.ir.intel.com (HELO silpixa00381635.ger.corp.intel.com) ([10.237.223.4]) by orsmga001.jf.intel.com with ESMTP; 23 Aug 2019 07:46:20 -0700 From: Jasvinder Singh To: dev@dpdk.org Cc: cristian.dumitrescu@intel.com, Lukasz Krakowiak Date: Fri, 23 Aug 2019 15:46:01 +0100 Message-Id: <20190823144602.58213-15-jasvinder.singh@intel.com> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190823144602.58213-1-jasvinder.singh@intel.com> References: <20190823144602.58213-1-jasvinder.singh@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH 14/15] examples/qos_sched: add subport configuration flexibility X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Modify qos sample app to allow different subports of the same port to have different configuration in terms of number of pipes, pipe queue sizes, etc. Signed-off-by: Jasvinder Singh Signed-off-by: Lukasz Krakowiak --- examples/qos_sched/app_thread.c | 4 +- examples/qos_sched/cfg_file.c | 226 ++++++++++++++++-------------- examples/qos_sched/init.c | 54 +++---- examples/qos_sched/main.h | 1 + examples/qos_sched/profile.cfg | 5 +- examples/qos_sched/profile_ov.cfg | 5 +- examples/qos_sched/stats.c | 36 ++--- 7 files changed, 179 insertions(+), 152 deletions(-) diff --git a/examples/qos_sched/app_thread.c b/examples/qos_sched/app_thread.c index 18b734a14..e07cc7452 100644 --- a/examples/qos_sched/app_thread.c +++ b/examples/qos_sched/app_thread.c @@ -36,9 +36,9 @@ get_pkt_sched(struct rte_mbuf *m, uint32_t *subport, uint32_t *pipe, uint16_t pipe_queue; *subport = (rte_be_to_cpu_16(pdata[SUBPORT_OFFSET]) & 0x0FFF) & - (port_params.n_subports_per_port - 1); /* Outer VLAN ID*/ + (port_params.n_subports_per_port - 1); /* Outer VLAN ID*/ *pipe = (rte_be_to_cpu_16(pdata[PIPE_OFFSET]) & 0x0FFF) & - (port_params.n_pipes_per_subport - 1); /* Inner VLAN ID */ + (subport_params[*subport].n_pipes_per_subport - 1); /* Inner VLAN ID */ pipe_queue = active_queues[(pdata[QUEUE_OFFSET] >> 8) % n_active_queues]; *traffic_class = pipe_queue > RTE_SCHED_TRAFFIC_CLASS_BE ? RTE_SCHED_TRAFFIC_CLASS_BE : pipe_queue; /* Destination IP */ diff --git a/examples/qos_sched/cfg_file.c b/examples/qos_sched/cfg_file.c index 45bf599e4..aaf7ca8f4 100644 --- a/examples/qos_sched/cfg_file.c +++ b/examples/qos_sched/cfg_file.c @@ -24,14 +24,10 @@ int cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params) { const char *entry; - int j; if (!cfg || !port_params) return -1; - memset(active_queues, 0, sizeof(active_queues)); - n_active_queues = 0; - entry = rte_cfgfile_get_entry(cfg, "port", "frame overhead"); if (entry) port_params->frame_overhead = (uint32_t)atoi(entry); @@ -40,106 +36,6 @@ cfg_load_port(struct rte_cfgfile *cfg, struct rte_sched_port_params *port_params if (entry) port_params->n_subports_per_port = (uint32_t)atoi(entry); - entry = rte_cfgfile_get_entry(cfg, "port", "number of pipes per subport"); - if (entry) - port_params->n_pipes_per_subport = (uint32_t)atoi(entry); - - entry = rte_cfgfile_get_entry(cfg, "port", "queue sizes"); - if (entry) { - char *next; - - for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) { - port_params->qsize[j] = (uint16_t)strtol(entry, &next, 10); - if (next == NULL) - break; - entry = next; - } - - for (j = 0; j < RTE_SCHED_TRAFFIC_CLASS_BE; j++) - if (port_params->qsize[j]) { - active_queues[n_active_queues] = j; - n_active_queues++; - } - - if (port_params->qsize[RTE_SCHED_TRAFFIC_CLASS_BE]) - for (j = 0; j < RTE_SCHED_BE_QUEUES_PER_PIPE; j++) { - active_queues[n_active_queues] = - RTE_SCHED_TRAFFIC_CLASS_BE + j; - n_active_queues++; - } - } - -#ifdef RTE_SCHED_RED - for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) { - char str[32]; - - /* Parse WRED min thresholds */ - snprintf(str, sizeof(str), "tc %d wred min", j); - entry = rte_cfgfile_get_entry(cfg, "red", str); - if (entry) { - char *next; - int k; - /* for each packet colour (green, yellow, red) */ - for (k = 0; k < RTE_COLORS; k++) { - port_params->red_params[j][k].min_th - = (uint16_t)strtol(entry, &next, 10); - if (next == NULL) - break; - entry = next; - } - } - - /* Parse WRED max thresholds */ - snprintf(str, sizeof(str), "tc %d wred max", j); - entry = rte_cfgfile_get_entry(cfg, "red", str); - if (entry) { - char *next; - int k; - /* for each packet colour (green, yellow, red) */ - for (k = 0; k < RTE_COLORS; k++) { - port_params->red_params[j][k].max_th - = (uint16_t)strtol(entry, &next, 10); - if (next == NULL) - break; - entry = next; - } - } - - /* Parse WRED inverse mark probabilities */ - snprintf(str, sizeof(str), "tc %d wred inv prob", j); - entry = rte_cfgfile_get_entry(cfg, "red", str); - if (entry) { - char *next; - int k; - /* for each packet colour (green, yellow, red) */ - for (k = 0; k < RTE_COLORS; k++) { - port_params->red_params[j][k].maxp_inv - = (uint8_t)strtol(entry, &next, 10); - - if (next == NULL) - break; - entry = next; - } - } - - /* Parse WRED EWMA filter weights */ - snprintf(str, sizeof(str), "tc %d wred weight", j); - entry = rte_cfgfile_get_entry(cfg, "red", str); - if (entry) { - char *next; - int k; - /* for each packet colour (green, yellow, red) */ - for (k = 0; k < RTE_COLORS; k++) { - port_params->red_params[j][k].wq_log2 - = (uint8_t)strtol(entry, &next, 10); - if (next == NULL) - break; - entry = next; - } - } - } -#endif /* RTE_SCHED_RED */ - return 0; } @@ -155,7 +51,7 @@ cfg_load_pipe(struct rte_cfgfile *cfg, struct rte_sched_pipe_params *pipe_params return -1; profiles = rte_cfgfile_num_sections(cfg, "pipe profile", sizeof("pipe profile") - 1); - port_params.n_pipe_profiles = profiles; + subport_params[0].n_pipe_profiles = profiles; for (j = 0; j < profiles; j++) { char pipe_name[32]; @@ -253,12 +149,118 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo return -1; memset(app_pipe_to_profile, -1, sizeof(app_pipe_to_profile)); + memset(active_queues, 0, sizeof(active_queues)); + n_active_queues = 0; + +#ifdef RTE_SCHED_RED + char sec_name[CFG_NAME_LEN]; + struct rte_red_params red_params[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE][RTE_COLORS]; + + snprintf(sec_name, sizeof(sec_name), "red"); + + if (rte_cfgfile_has_section(cfg, sec_name)) { + + for (i = 0; i < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; i++) { + char str[32]; + + /* Parse WRED min thresholds */ + snprintf(str, sizeof(str), "tc %d wred min", i); + entry = rte_cfgfile_get_entry(cfg, sec_name, str); + if (entry) { + char *next; + /* for each packet colour (green, yellow, red) */ + for (j = 0; j < RTE_COLORS; j++) { + red_params[i][j].min_th + = (uint16_t)strtol(entry, &next, 10); + if (next == NULL) + break; + entry = next; + } + } + + /* Parse WRED max thresholds */ + snprintf(str, sizeof(str), "tc %d wred max", i); + entry = rte_cfgfile_get_entry(cfg, "red", str); + if (entry) { + char *next; + /* for each packet colour (green, yellow, red) */ + for (j = 0; j < RTE_COLORS; j++) { + red_params[i][j].max_th + = (uint16_t)strtol(entry, &next, 10); + if (next == NULL) + break; + entry = next; + } + } + + /* Parse WRED inverse mark probabilities */ + snprintf(str, sizeof(str), "tc %d wred inv prob", i); + entry = rte_cfgfile_get_entry(cfg, "red", str); + if (entry) { + char *next; + /* for each packet colour (green, yellow, red) */ + for (j = 0; j < RTE_COLORS; j++) { + red_params[i][j].maxp_inv + = (uint8_t)strtol(entry, &next, 10); + + if (next == NULL) + break; + entry = next; + } + } + + /* Parse WRED EWMA filter weights */ + snprintf(str, sizeof(str), "tc %d wred weight", i); + entry = rte_cfgfile_get_entry(cfg, "red", str); + if (entry) { + char *next; + /* for each packet colour (green, yellow, red) */ + for (j = 0; j < RTE_COLORS; j++) { + red_params[i][j].wq_log2 + = (uint8_t)strtol(entry, &next, 10); + if (next == NULL) + break; + entry = next; + } + } + } + } +#endif /* RTE_SCHED_RED */ for (i = 0; i < MAX_SCHED_SUBPORTS; i++) { char sec_name[CFG_NAME_LEN]; snprintf(sec_name, sizeof(sec_name), "subport %d", i); if (rte_cfgfile_has_section(cfg, sec_name)) { + entry = rte_cfgfile_get_entry(cfg, sec_name, + "number of pipes per subport"); + if (entry) + subport_params[i].n_pipes_per_subport = + (uint32_t)atoi(entry); + + entry = rte_cfgfile_get_entry(cfg, sec_name, "queue sizes"); + if (entry) { + char *next; + + for (j = 0; j < RTE_SCHED_TRAFFIC_CLASS_BE; j++) { + subport_params[i].qsize[j] = + (uint16_t)strtol(entry, &next, 10); + if (subport_params[i].qsize[j] != 0) { + active_queues[n_active_queues] = j; + n_active_queues++; + } + if (next == NULL) + break; + entry = next; + } + + for (j = 0; j < RTE_SCHED_BE_QUEUES_PER_PIPE; j++) { + active_queues[n_active_queues] = + RTE_SCHED_TRAFFIC_CLASS_BE + j; + n_active_queues++; + } + } + entry = rte_cfgfile_get_entry(cfg, sec_name, "tb rate"); if (entry) subport_params[i].tb_rate = (uint32_t)atoi(entry); @@ -362,6 +364,20 @@ cfg_load_subport(struct rte_cfgfile *cfg, struct rte_sched_subport_params *subpo } } } +#ifdef RTE_SCHED_RED + for (j = 0; j < RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE; j++) { + for (k = 0; k < RTE_COLORS; k++) { + subport_params[i].red_params[j][k].min_th = + red_params[j][k].min_th; + subport_params[i].red_params[j][k].max_th = + red_params[j][k].max_th; + subport_params[i].red_params[j][k].maxp_inv = + red_params[j][k].maxp_inv; + subport_params[i].red_params[j][k].wq_log2 = + red_params[j][k].wq_log2; + } + } +#endif } } diff --git a/examples/qos_sched/init.c b/examples/qos_sched/init.c index b05206d5a..c18eea98c 100644 --- a/examples/qos_sched/init.c +++ b/examples/qos_sched/init.c @@ -165,18 +165,6 @@ app_init_port(uint16_t portid, struct rte_mempool *mp) return 0; } -static struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { - { - .tb_rate = 1250000000, - .tb_size = 1000000, - - .tc_rate = {1250000000, 1250000000, 1250000000, 1250000000, - 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, - 1250000000, 1250000000, 1250000000, 1250000000}, - .tc_period = 10, - }, -}; - static struct rte_sched_pipe_params pipe_profiles[MAX_SCHED_PIPE_PROFILES] = { { /* Profile #0 */ .tb_rate = 305175, @@ -193,19 +181,20 @@ static struct rte_sched_pipe_params pipe_profiles[MAX_SCHED_PIPE_PROFILES] = { }, }; -struct rte_sched_port_params port_params = { - .name = "port_scheduler_0", - .socket = 0, /* computed */ - .rate = 0, /* computed */ - .mtu = 6 + 6 + 4 + 4 + 2 + 1500, - .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT, - .n_subports_per_port = 1, - .n_pipes_per_subport = 4096, - .qsize = {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, - .pipe_profiles = pipe_profiles, - .n_pipe_profiles = sizeof(pipe_profiles) / sizeof(struct rte_sched_pipe_params), - .n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES, +struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS] = { + { + .tb_rate = 1250000000, + .tb_size = 1000000, + .tc_rate = {1250000000, 1250000000, 1250000000, 1250000000, + 1250000000, 1250000000, 1250000000, 1250000000, 1250000000, + 1250000000, 1250000000, 1250000000, 1250000000}, + .tc_period = 10, + .n_pipes_per_subport = 4096, + .qsize = {64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64, 64}, + .pipe_profiles = pipe_profiles, + .n_pipe_profiles = sizeof(pipe_profiles) / + sizeof(struct rte_sched_pipe_params), #ifdef RTE_SCHED_RED .red_params = { /* Traffic Class 0 Colors Green / Yellow / Red */ @@ -274,6 +263,18 @@ struct rte_sched_port_params port_params = { [12][2] = {.min_th = 32, .max_th = 64, .maxp_inv = 10, .wq_log2 = 9}, }, #endif /* RTE_SCHED_RED */ + }, +}; + +struct rte_sched_port_params port_params = { + .name = "port_scheduler_0", + .socket = 0, /* computed */ + .rate = 0, /* computed */ + .mtu = 6 + 6 + 4 + 4 + 2 + 1500, + .frame_overhead = RTE_SCHED_FRAME_OVERHEAD_DEFAULT, + .n_subports_per_port = 1, + .n_max_pipes_per_subport = MAX_SCHED_PIPES, + .n_max_pipe_profiles = MAX_SCHED_PIPE_PROFILES, }; static struct rte_sched_port * @@ -304,7 +305,10 @@ app_init_sched_port(uint32_t portid, uint32_t socketid) subport, err); } - for (pipe = 0; pipe < port_params.n_pipes_per_subport; pipe++) { + uint32_t n_pipes_per_subport = + subport_params[subport].n_pipes_per_subport; + + for (pipe = 0; pipe < n_pipes_per_subport; pipe++) { if (app_pipe_to_profile[subport][pipe] != -1) { err = rte_sched_pipe_config(port, subport, pipe, app_pipe_to_profile[subport][pipe]); diff --git a/examples/qos_sched/main.h b/examples/qos_sched/main.h index d8f890b64..baa2b3ead 100644 --- a/examples/qos_sched/main.h +++ b/examples/qos_sched/main.h @@ -152,6 +152,7 @@ uint32_t active_queues[RTE_SCHED_QUEUES_PER_PIPE]; uint32_t n_active_queues; extern struct rte_sched_port_params port_params; +extern struct rte_sched_subport_params subport_params[MAX_SCHED_SUBPORTS]; int app_parse_args(int argc, char **argv); int app_init(void); diff --git a/examples/qos_sched/profile.cfg b/examples/qos_sched/profile.cfg index 335561370..61b8b7071 100644 --- a/examples/qos_sched/profile.cfg +++ b/examples/qos_sched/profile.cfg @@ -20,11 +20,12 @@ [port] frame overhead = 24 number of subports per port = 1 -number of pipes per subport = 4096 -queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 ; Subport configuration [subport 0] +number of pipes per subport = 4096 +queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 + tb rate = 1250000000 ; Bytes per second tb size = 1000000 ; Bytes diff --git a/examples/qos_sched/profile_ov.cfg b/examples/qos_sched/profile_ov.cfg index 394987399..ab509d28d 100644 --- a/examples/qos_sched/profile_ov.cfg +++ b/examples/qos_sched/profile_ov.cfg @@ -5,11 +5,12 @@ [port] frame overhead = 24 number of subports per port = 1 -number of pipes per subport = 32 -queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 ; Subport configuration [subport 0] +number of pipes per subport = 32 +queue sizes = 64 64 64 64 64 64 64 64 64 64 64 64 64 + tb rate = 8400000 ; Bytes per second tb size = 100000 ; Bytes diff --git a/examples/qos_sched/stats.c b/examples/qos_sched/stats.c index e62e4a2f6..0626cf6e6 100644 --- a/examples/qos_sched/stats.c +++ b/examples/qos_sched/stats.c @@ -24,7 +24,7 @@ qavg_q(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, if (i == nb_pfc || subport_id >= port_params.n_subports_per_port || - pipe_id >= port_params.n_pipes_per_subport || + pipe_id >= subport_params[subport_id].n_pipes_per_subport || tc >= RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE || q >= RTE_SCHED_BE_QUEUES_PER_PIPE || (tc < RTE_SCHED_TRAFFIC_CLASS_BE && q > 0)) @@ -32,7 +32,7 @@ qavg_q(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, uint8_t tc, port = qos_conf[i].sched_port; for (i = 0; i < subport_id; i++) - queue_id += port_params.n_pipes_per_subport * + queue_id += subport_params[i].n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; if (tc < RTE_SCHED_TRAFFIC_CLASS_BE) queue_id += pipe_id * RTE_SCHED_QUEUES_PER_PIPE + tc; @@ -69,14 +69,15 @@ qavg_tcpipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id, } if (i == nb_pfc || subport_id >= port_params.n_subports_per_port || - pipe_id >= port_params.n_pipes_per_subport || + pipe_id >= subport_params[subport_id].n_pipes_per_subport || tc >= RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE) return -1; port = qos_conf[i].sched_port; for (i = 0; i < subport_id; i++) - queue_id += port_params.n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; + queue_id += + subport_params[i].n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; queue_id += pipe_id * RTE_SCHED_QUEUES_PER_PIPE + tc; @@ -123,13 +124,13 @@ qavg_pipe(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id) if (i == nb_pfc || subport_id >= port_params.n_subports_per_port || - pipe_id >= port_params.n_pipes_per_subport) + pipe_id >= subport_params[subport_id].n_pipes_per_subport) return -1; port = qos_conf[i].sched_port; for (i = 0; i < subport_id; i++) - queue_id += port_params.n_pipes_per_subport * + queue_id += subport_params[i].n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; queue_id += pipe_id * RTE_SCHED_QUEUES_PER_PIPE; @@ -177,13 +178,13 @@ qavg_tcsubport(uint16_t port_id, uint32_t subport_id, uint8_t tc) for (i = 0; i < subport_id; i++) subport_queue_id += - port_params.n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; + subport_params[i].n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; average = 0; for (count = 0; count < qavg_ntimes; count++) { part_average = 0; - for (i = 0; i < port_params.n_pipes_per_subport; i++) { + for (i = 0; i < subport_params[subport_id].n_pipes_per_subport; i++) { if (tc < RTE_SCHED_TRAFFIC_CLASS_BE) { queue_id = subport_queue_id + i * RTE_SCHED_QUEUES_PER_PIPE + tc; @@ -203,10 +204,11 @@ qavg_tcsubport(uint16_t port_id, uint32_t subport_id, uint8_t tc) } if (tc < RTE_SCHED_TRAFFIC_CLASS_BE) - average += part_average / (port_params.n_pipes_per_subport); + average += part_average / + (subport_params[subport_id].n_pipes_per_subport); else - average += - part_average / (port_params.n_pipes_per_subport) * + average += part_average / + (subport_params[subport_id].n_pipes_per_subport) * RTE_SCHED_BE_QUEUES_PER_PIPE; usleep(qavg_period); @@ -240,14 +242,14 @@ qavg_subport(uint16_t port_id, uint32_t subport_id) port = qos_conf[i].sched_port; for (i = 0; i < subport_id; i++) - subport_queue_id += port_params.n_pipes_per_subport * + subport_queue_id += subport_params[i].n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; average = 0; for (count = 0; count < qavg_ntimes; count++) { part_average = 0; - for (i = 0; i < port_params.n_pipes_per_subport; i++) { + for (i = 0; i < subport_params[subport_id].n_pipes_per_subport; i++) { queue_id = subport_queue_id + i * RTE_SCHED_QUEUES_PER_PIPE; for (j = 0; j < RTE_SCHED_QUEUES_PER_PIPE; j++) { @@ -258,7 +260,8 @@ qavg_subport(uint16_t port_id, uint32_t subport_id) } average += part_average / - (port_params.n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE); + (subport_params[subport_id].n_pipes_per_subport * + RTE_SCHED_QUEUES_PER_PIPE); usleep(qavg_period); } @@ -322,12 +325,13 @@ pipe_stat(uint16_t port_id, uint32_t subport_id, uint32_t pipe_id) if (i == nb_pfc || subport_id >= port_params.n_subports_per_port || - pipe_id >= port_params.n_pipes_per_subport) + pipe_id >= subport_params[subport_id].n_pipes_per_subport) return -1; port = qos_conf[i].sched_port; for (i = 0; i < subport_id; i++) - queue_id += port_params.n_pipes_per_subport * RTE_SCHED_QUEUES_PER_PIPE; + queue_id += subport_params[i].n_pipes_per_subport * + RTE_SCHED_QUEUES_PER_PIPE; queue_id += pipe_id * RTE_SCHED_QUEUES_PER_PIPE; -- 2.21.0