[v2] examples/ip_pipeline: fix wrong value of tc ov weight

Message ID 20190806114951.62131-1-jasvinder.singh@intel.com (mailing list archive)
State Accepted, archived
Headers
Series [v2] examples/ip_pipeline: fix wrong value of tc ov weight |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation fail Compilation issues

Commit Message

Jasvinder Singh Aug. 6, 2019, 11:49 a.m. UTC
  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.

Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
---
v2:
- add fix line
- change title

 examples/ip_pipeline/cli.c | 2 --
 1 file changed, 2 deletions(-)
  

Comments

Thomas Monjalon Aug. 6, 2019, 1:26 p.m. UTC | #1
06/08/2019 13:49, 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.
> 
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
> ---
> 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
  
Kevin Traynor Sept. 4, 2019, 5:26 p.m. UTC | #2
On 06/08/2019 14:26, Thomas Monjalon wrote:
> 06/08/2019 13:49, 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")
>>

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.

>> 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.
>>
>> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
>> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
>> ---
>> 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
> 
>
  

Patch

diff --git a/examples/ip_pipeline/cli.c b/examples/ip_pipeline/cli.c
index f4c2be8b8..c6cf4204e 100644
--- a/examples/ip_pipeline/cli.c
+++ b/examples/ip_pipeline/cli.c
@@ -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) {