sched: fix wrr parameter data type
PATCH 1/1 sched: fix wrr parameter data type
wrr tokens getting truncated to uint8_t in wrr_store function() due to type mismatch. This patch chnages the data type to uint16_t.
--- lib/sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
lib/sched/rte_sched.c +1 -1
@@ -66,7 +66,7 @@ struct __rte_cache_aligned rte_sched_pipe {uint64_t tc_credits[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ];/* Weighted Round Robin (WRR) */ -uint8_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ]; +uint16_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ];/* TC oversubscription */ uint64_t tc_ov_credits;
Signature · 1 line
2.34.1
Quoted 34 lines
-----Original Message-----
From: Ajmera, Megha <[email protected]>
Sent: Friday, February 21, 2025 12:48 PM
To: [email protected]
Cc: Singh, Jasvinder <[email protected]>; Dumitrescu, Cristian <[email protected]>
Subject: [PATCH] sched: fix wrr parameter data typewrr tokens getting truncated to
uint8_tinwrr_storefunction()due to type mismatch. This patch chnages the data type touint16_t.Fixes e16b06da0908 ("sched: remove WRR from strict priority TC queues")Signed-off-by Megha Ajmera <[email protected]>--- lib/sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/sched/rte_sched.c index renamed from lib/sched/rte_sched.c +0
-0
d8ee4e7e91..dcef44b91b100644lib/sched/rte_sched.c +1
-2@@ -66,7 +66,7 @@ struct __rte_cache_aligned rte_sched_pipe {uint64_t tc_credits[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ];/* Weighted Round Robin (WRR) */ -uint8_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ]; +uint16_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ];/* TC oversubscription */ uint64_t tc_ov_credits; --
Quoted 1 line
2.34.1
Quoted 15 lines · On Fri, 21 Feb 2025 18:17:55 +0530 Megha Ajmera <[email protected]> wrote:
wrr tokens getting truncated to
uint8_tinwrr_storefunction()due to type mismatch. This patch chnages the data type touint16_t.Fixes e16b06da0908 ("sched: remove WRR from strict priority TC queues")Signed-off-by Megha Ajmera <[email protected]>--- lib/sched/rte_sched.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)lib/sched/rte_sched.c +0
-0
lib/sched/rte_sched.c struct __rte_cache_aligned rte_sched_pipe { · line 72
Quoted 8 lines
lib/sched/rte_sched.c +1
-1@@ -66,7 +66,7 @@ struct __rte_cache_aligned rte_sched_pipe {uint64_t tc_credits[RTE_SCHED_TRAFFIC_CLASSES_PER_PIPE ];/* Weighted Round Robin (WRR) */ -uint8_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ]; +uint16_t wrr_tokens[RTE_SCHED_BE_QUEUES_PER_PIPE ];/* TC oversubscription */ uint64_t tc_ov_credits;
This would be a change in ABI.