Skip to contentSkip to conversation

examples/ip_pipeline: remove tc ov flag from pipe profile cli

PATCH In review Jasvinder Singh 4 participants 7 messages Jul 31, 2019 – Sep 4, 2019

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 examples/ip_pipeline: remove tc ov flag from pipe profile cli

Since sched library always check the non-zero value of subport tc ov weight. Therefore, it is necessary to set right value of tc ov weight even if RTE_SCHED_SUBPORT_TC_OV is disabled.

---
 examples/ip_pipeline/cli.c | 2 --
 1 file changed, 2 deletions(-)
examples/ip_pipeline/cli.c +0 -2
index f4c2be8b8..c6cf4204e 100644
@@ -469,12 +469,10 @@ cmd_tmgr_pipe_profile(char **tokens,
 		return;
 	}
 
-#ifdef RTE_SCHED_SUBPORT_TC_OV
 	if (parser_read_uint8(&p.tc_ov_weight, tokens[19]) != 0) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "tc_ov_weight");
 		return;
 	}
-#endif
 
 	for (i = 0; i < RTE_SCHED_BE_QUEUES_PER_PIPE; i++)
 		if (parser_read_uint8(&p.wrr_weights[i], tokens[20 + i]) != 0) {
Signature · 1 line
2.21.0
Acked-by on v1 1/1
#1 lore raw
Quoted 36 lines

-----Original Message-----
From: Singh, Jasvinder
Sent: Wednesday, July 31, 2019 12:33 PM
To: [email protected]
Cc: Dumitrescu, Cristian <[email protected]>
Subject: [PATCH] examples/ip_pipeline: remove tc ov flag from pipe profile cli

Since sched library always check the non-zero value of subport tc ov weight. Therefore, it is necessary to set right value of tc ov weight even if RTE_SCHED_SUBPORT_TC_OV is disabled.

---
 examples/ip_pipeline/cli.c | 2 --
 1 file changed, 2 deletions(-)
examples/ip_pipeline/cli.c +0 -2
index f4c2be8b8..c6cf4204e 100644
@@ -469,12 +469,10 @@ cmd_tmgr_pipe_profile(char **tokens,
 		return;
 	}
 
-#ifdef RTE_SCHED_SUBPORT_TC_OV
 	if (parser_read_uint8(&p.tc_ov_weight, tokens[19]) != 0) {
 		snprintf(out, out_size, MSG_ARG_INVALID,
 "tc_ov_weight");
 		return;
 	}
-#endif
 
 	for (i = 0; i < RTE_SCHED_BE_QUEUES_PER_PIPE; i++)
Quoted 4 lines

if (parser_read_uint8(&p.wrr_weights[i], tokens[20 + i]) != 0)
{
--
2.21.0

We should check that this macro does not show up anymore in any of our apps.

#2 lore raw

31/07/2019 14:19, Dumitrescu, Cristian:

Quoted 7 lines

From: Singh, Jasvinder

Quoted 6 lines

Subject: [PATCH] examples/ip_pipeline: remove tc ov flag from pipe profile cli

Since sched library always check the non-zero value of subport tc ov weight. Therefore, it is necessary to set right value of tc ov weight even if RTE_SCHED_SUBPORT_TC_OV is disabled.

If I understand well, this is fixing something, but what? Please could you propose a better title and a "Fixes" line? Thanks

#3 lore raw
Quoted 16 lines

-----Original Message-----
From: Thomas Monjalon [mailto:[email protected]]
Sent: Tuesday, August 6, 2019 11:43 AM
To: Dumitrescu, Cristian <[email protected]>; Singh, Jasvinder <[email protected]>
Cc: [email protected]
Subject: Re: [dpdk-dev] [PATCH] examples/ip_pipeline: remove tc ov flag from pipe profile cli

31/07/2019 14:19, Dumitrescu, Cristian:

Quoted 4 lines

From: Singh, Jasvinder

Quoted 3 lines

Subject: [PATCH] examples/ip_pipeline: remove tc ov flag from pipe profile cli

Quoted 8 lines
Quoted 3 lines
Quoted 3 lines

Since sched library always check the non-zero value of subport tc ov weight. Therefore, it is necessary to set right value of tc ov weight even if RTE_SCHED_SUBPORT_TC_OV is disabled.

If I understand well, this is fixing something, but what? Please could you propose a better title and a "Fixes" line? Thanks

Sent v2 version. Thank you.

#4 lore raw

PATCH v2 1/1 examples/ip_pipeline: fix wrong value of tc ov weight

In reply to Jasvinder Singh

The sched library checks the subport tc ov weight value regardless of whether RTE_SCHED_SUBPORT_TC_OV flag is enabled or not.

This fix allows application to always set valid tc ov weight value.

Fixes 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")

error log
SCHED: pipe_profile_check: Incorrect value for tc ov weight
SCHED: rte_sched_port_check_params: Pipe profile check failed(-22) Command "tmgr" failed.

---
v2:
- add fix line
- change title

 examples/ip_pipeline/cli.c | 2 --
 1 file changed, 2 deletions(-)
examples/ip_pipeline/cli.c +0 -2
index f4c2be8b8..c6cf4204e 100644
@@ -469,12 +469,10 @@ cmd_tmgr_pipe_profile(char **tokens,
 		return;
 	}
 
-#ifdef RTE_SCHED_SUBPORT_TC_OV
 	if (parser_read_uint8(&p.tc_ov_weight, tokens[19]) != 0) {
 		snprintf(out, out_size, MSG_ARG_INVALID, "tc_ov_weight");
 		return;
 	}
-#endif
 
 	for (i = 0; i < RTE_SCHED_BE_QUEUES_PER_PIPE; i++)
 		if (parser_read_uint8(&p.wrr_weights[i], tokens[20 + i]) != 0) {
Signature · 1 line
2.21.0
#5 lore raw

Re: [dpdk-dev] [PATCH v2] examples/ip_pipeline: fix wrong value of tc ov weight

06/08/2019 13:49, Jasvinder Singh:

Quoted 12 lines

The sched library checks the subport tc ov weight value regardless of whether RTE_SCHED_SUBPORT_TC_OV flag is enabled or not.

This fix allows application to always set valid tc ov weight value.

Fixes 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")

error log
SCHED: pipe_profile_check: Incorrect value for tc ov weight
SCHED: rte_sched_port_check_params: Pipe profile check failed(-22) Command "tmgr" failed.

Quoted 6 lines

---
v2:
- add fix line
- change title

"tc ov" is not that obvious.
I changed the title to "examples/ip_pipeline: fix TC oversubscription weight"

+Add Cc stable

Applied, thanks

#6 lore raw

Re: [dpdk-dev] [PATCH v2] examples/ip_pipeline: fix wrong value of tc ov weight

Quoted 8 lines · Thomas Monjalon

06/08/2019 13:49, Jasvinder Singh:

Quoted 7 lines

The sched library checks the subport tc ov weight value regardless of whether RTE_SCHED_SUBPORT_TC_OV flag is enabled or not.

This fix allows application to always set valid tc ov weight value.

Fixes 25961ff3bcb9 ("examples/ip_pipeline: add traffic manager object")

FYI, tc_ov_weight is not visible without the RTE_SCHED_SUBPORT_TC_OV until

Fixes ca4d5915b877 ("sched: add config flexibility to TC queue sizes")

so this will not build on 18.11 stable.

Quoted 20 lines
Quoted 11 lines

error log
SCHED: pipe_profile_check: Incorrect value for tc ov weight
SCHED: rte_sched_port_check_params: Pipe profile check failed(-22) Command "tmgr" failed.

---
v2:
- add fix line
- change title

"tc ov" is not that obvious.
I changed the title to "examples/ip_pipeline: fix TC oversubscription weight"

+Add Cc stable

Applied, thanks