From: Thomas Monjalon <thomas@monjalon.net>
To: Megha Ajmera <megha.ajmera@intel.com>
Cc: dev@dpdk.org, jasvinder.singh@intel.com,
Stephen Hemminger <stephen@networkplumber.org>,
stable@dpdk.org
Subject: Re: [PATCH] sched: fix wrr parameter data type
Date: Thu, 23 Oct 2025 19:40:04 +0200 [thread overview]
Message-ID: <6674915.uKWtJMOXK1@thomas> (raw)
In-Reply-To: <20250918085145.584fca13@hermes.local>
18/09/2025 17:51, Stephen Hemminger:
> On Thu, 18 Sep 2025 08:16:09 +0530
> Megha Ajmera <megha.ajmera@intel.com> 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 <megha.ajmera@intel.com>
> > Acked-by: Jasvinder Singh <Jasvinder.singh@intel.com>
>
> 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 <stephen@networkplumber.org>
Cc stable
Applied, thanks.
parent reply other threads:[~2025-10-23 17:40 UTC|newest]
Thread overview: expand[flat|nested] mbox.gz Atom feed
[parent not found: <20250918085145.584fca13@hermes.local>]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=6674915.uKWtJMOXK1@thomas \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=jasvinder.singh@intel.com \
--cc=megha.ajmera@intel.com \
--cc=stable@dpdk.org \
--cc=stephen@networkplumber.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).