Skip to contentSkip to conversation

sched: fix wrr parameter data type

PATCH In review Megha Ajmera 3 participants 3 messages Feb 21, 2025

lore
Share & tools
lore
#0 lore raw

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.

Fixes e16b06da0908 ("sched: remove WRR from strict priority TC queues")
---
 lib/sched/rte_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/sched/rte_sched.c +1 -1
index d8ee4e7e91..dcef44b91b 100644
@@ -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
Acked-by on v1 1/1
#1 lore raw
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 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.

Fixes e16b06da0908 ("sched: remove WRR from strict priority TC queues")
---
 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..dcef44b91b 100644

lib/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

#2 lore raw
In reply to Megha Ajmera
Quoted 15 lines · On Fri, 21 Feb 2025 18:17:55 +0530 Megha Ajmera <[email protected]> wrote:

wrr tokens getting truncated to uint8_t in wrr_store function() due to type mismatch. This patch chnages the data type to uint16_t.

Fixes e16b06da0908 ("sched: remove WRR from strict priority TC queues")
---
 lib/sched/rte_sched.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
lib/sched/rte_sched.c +0 -0
index d8ee4e7e91..dcef44b91b 100644

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.