From: "Jiawen Wu" <jiawenwu@trustnetic.com>
To: "'Simon Horman'" <horms@kernel.org>
Cc: <netdev@vger.kernel.org>, <andrew+netdev@lunn.ch>,
<davem@davemloft.net>, <edumazet@google.com>, <kuba@kernel.org>,
<pabeni@redhat.com>, <mengyuanlou@net-swift.com>,
<stable@vger.kernel.org>
Subject: RE: [PATCH net] net: libwx: fix multicast packets received count
Date: Thu, 10 Jul 2025 09:54:05 +0800 [thread overview]
Message-ID: <086c01dbf13d$84ab4ec0$8e01ec40$@trustnetic.com> (raw)
In-Reply-To: <20250709112937.GU452973@horms.kernel.org>
On Wed, Jul 9, 2025 7:30 PM, Simon Horman wrote:
> On Wed, Jul 09, 2025 at 02:35:12PM +0800, Jiawen Wu wrote:
> > Multicast good packets received by PF rings that pass ethternet MAC
> > address filtering are counted for rtnl_link_stats64.multicast. The
> > counter is not cleared on read. Fix the duplicate counting on updating
> > statistics.
> >
> > Fixes: 46b92e10d631 ("net: libwx: support hardware statistics")
> > Cc: stable@vger.kernel.org
> > Signed-off-by: Jiawen Wu <jiawenwu@trustnetic.com>
> > ---
> > drivers/net/ethernet/wangxun/libwx/wx_hw.c | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/drivers/net/ethernet/wangxun/libwx/wx_hw.c b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> > index 0f4be72116b8..a9519997286b 100644
> > --- a/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> > +++ b/drivers/net/ethernet/wangxun/libwx/wx_hw.c
> > @@ -2778,6 +2778,7 @@ void wx_update_stats(struct wx *wx)
> > hwstats->fdirmiss += rd32(wx, WX_RDB_FDIR_MISS);
> > }
> >
> > + hwstats->qmprc = 0;
> > for (i = wx->num_vfs * wx->num_rx_queues_per_pool;
> > i < wx->mac.max_rx_queues; i++)
> > hwstats->qmprc += rd32(wx, WX_PX_MPRC(i));
>
> Sorry if I am being dense, but I have a question:
>
> The treatment of qmprc prior to this patch seems consistent
> with other members of hwstats. What makes qmprc special?
The other members are read from CAB registers, and they are cleaned
on read. 'qmprc' is read from BAR register, it is designed not to be
cleared on read.
next prev parent reply other threads:[~2025-07-10 1:55 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-09 6:35 [PATCH net] net: libwx: fix multicast packets received count Jiawen Wu
2025-07-09 11:29 ` Simon Horman
2025-07-10 1:54 ` Jiawen Wu [this message]
2025-07-10 10:54 ` Simon Horman
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='086c01dbf13d$84ab4ec0$8e01ec40$@trustnetic.com' \
--to=jiawenwu@trustnetic.com \
--cc=andrew+netdev@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=stable@vger.kernel.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