From: Simon Horman <horms@kernel.org>
To: David Yang <mmyangfl@gmail.com>
Cc: netdev@vger.kernel.org, andrew@lunn.ch, olteanv@gmail.com,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, jhs@mojatatu.com, jiri@resnulli.us,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 2/2] net: dsa: yt921x: Add port TBF support
Date: Fri, 15 May 2026 17:37:26 +0100 [thread overview]
Message-ID: <20260515163726.GB227382@horms.kernel.org> (raw)
In-Reply-To: <CAAXyoMOiokO-yh7AVs6qXDZzfM3PVYUDRKHY7FdXivjpcH=5mg@mail.gmail.com>
On Fri, May 15, 2026 at 01:55:58AM +0800, David Yang wrote:
> On Tue, May 12, 2026 at 5:12 PM Simon Horman <horms@kernel.org> wrote:
> > Is it intended to return 0 here without populating the hardware statistics?
> >
> > When the driver handles this command by returning 0 without modifying
> > qopt->stats, it incorrectly signals to the TC core that hardware statistics
> > were successfully fetched. As a result, the subsystem will report
> > unmodified (typically zeroed) statistics, which hides any packets shaped
> > or dropped by the hardware.
>
> https://lore.kernel.org/all/20260507012311.2187979-1-kuba@kernel.org/
Sorry for not noticing that earlier.
> Would a stub TC_TBF_STATS case that returns 0 (leaving bstats/qstats
> untouched) preserve the flag here? mlxsw does this in its
> spectrum_qdisc.c.
Maybe adding a comment is sufficient.
> (also trying to address that in
> https://lore.kernel.org/r/20260509122238.2792915-1-mmyangfl@gmail.com)
Nice, thanks.
>
> > Should this read the hardware statistic registers (like the newly defined
> > YT921X_PORTn_SHAPE_STAT) to update qopt->stats, or alternatively return
> > -EOPNOTSUPP to indicate a lack of support?
>
> YT921X_PORTn_SHAPE_STAT gives the token bucket statistic, not flow meter.
>
> (Not a real problem, but trying to suppress further AI gossip)
Ack.
prev parent reply other threads:[~2026-05-15 16:37 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-08 6:57 [PATCH net-next v3 0/2] net: dsa: yt921x: Add port TBF support David Yang
2026-05-08 6:57 ` [PATCH net-next v3 1/2] net/sched: tbf: add extack to offload params David Yang
2026-05-12 9:06 ` Simon Horman
2026-05-08 6:57 ` [PATCH net-next v3 2/2] net: dsa: yt921x: Add port TBF support David Yang
2026-05-12 8:56 ` Paolo Abeni
2026-05-12 9:10 ` Simon Horman
2026-05-14 17:55 ` David Yang
2026-05-15 16:37 ` Simon Horman [this message]
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=20260515163726.GB227382@horms.kernel.org \
--to=horms@kernel.org \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
/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