18/09/2025 17:51, Stephen Hemminger: > On Thu, 18 Sep 2025 08:16:09 +0530 > Megha Ajmera <[email protected]> wrote: > > > wrr tokens getting truncated to uint8_t in wrr_store function() due to > > type mismatch. This patch changes the data type to uint16_t. > > > > Fixes: e16b06da0908 ("sched: remove WRR from strict priority TC queues") > > > > Signed-off-by: Megha Ajmera <[email protected]> > > Acked-by: Jasvinder Singh <[email protected]> > > The pipe tokens are updated in grinder_wrr_store by: > > pipe->wrr_tokens[0] = > (grinder->wrr_tokens[0] & grinder->wrr_mask[0]) >> > RTE_SCHED_WRR_SHIFT; > > The token in rte_sched_grinder is uint16_t. > The mask value in wrr_mask is either 0 or 0xffff. > The shift is 3. > Therefore the range of pipe tokens is 0xffff >> 3 = 1FFF > > The sched code is severely under commented and overly complex. > The patch looks right. > > Acked-by: Stephen Hemminger <[email protected]>
Cc stable Applied, thanks.

