[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CACKFLinCcTHcsGMLRiqFXXPodjscptWpZRi0rzn9g0USn1xg6w@mail.gmail.com>
Date: Tue, 4 Mar 2025 14:33:18 -0800
From: Michael Chan <michael.chan@...adcom.com>
To: Jakub Kicinski <kuba@...nel.org>
Cc: davem@...emloft.net, netdev@...r.kernel.org, edumazet@...gle.com,
pabeni@...hat.com, andrew+netdev@...n.ch, horms@...nel.org,
pavan.chebbi@...adcom.com, przemyslaw.kitszel@...el.com
Subject: Re: [PATCH net-next v2 7/9] eth: bnxt: maintain rx pkt/byte stats in SW
On Mon, Mar 3, 2025 at 2:38 PM Michael Chan <michael.chan@...adcom.com> wrote:
>
> On Mon, Mar 3, 2025 at 2:32 PM Jakub Kicinski <kuba@...nel.org> wrote:
> > Not 100% clear to me. I looked at nfp and a couple of Intel drivers
> > and if I read the code right they don't count VLAN tags if stripped.
> > I suspect that's what most drivers which count in SW will do, simply
> > because it's easier rather than intentional choice by their authors.
> >
> > Happy to change if you have a preference, but to spell it out my
> > understanding is that not counting stripped tags was more comment
> > and that's what I intended to implement here.
>
> I believe our hardware byte counters will count the VLAN tag, but let
> me double check on that to be certain. I think for consistency, the
> software counters should match the hardware counters.
I've confirmed that our HW will count packet bytes on the network
side. This means that the VLAN tag will be counted even if it gets
stripped on RX or inserted on TX. This also means that padding bytes
inserted by the HW will be counted as well. The driver only pads in
software TX packets less than 52 bytes.
I think it's better for SW stats to match HW stats. Thanks.
Download attachment "smime.p7s" of type "application/pkcs7-signature" (4196 bytes)
Powered by blists - more mailing lists