From: Andrew Lunn <andrew@lunn.ch>
To: Oleksij Rempel <o.rempel@pengutronix.de>
Cc: netdev@vger.kernel.org
Subject: Re: packet stats validation
Date: Fri, 11 Feb 2022 22:50:32 +0100 [thread overview]
Message-ID: <YgbaKDZhHfGV542h@lunn.ch> (raw)
In-Reply-To: <YgYixOmTSI7jxALK@pengutronix.de>
On Fri, Feb 11, 2022 at 09:48:04AM +0100, Oleksij Rempel wrote:
> Hi all,
>
> I'm implementing stats64 for the ksz switch and by validating my
> implementation found different by count methods in different sub
> systems. For example, i send 64 byte packet with:
>
> mausezahn enp1s0f3 -c 1 -a rand -p 64
>
> - tshark is recognizing 64 byte frame with 50 byte data
> - Intel igb is counting it as 64 byte
> - ksz9477 switch HW counter is counting it as 68 bytes packet
> - linux bridge is counting it as 50 byte packet
>
> Can you please help me to understand this differences?
> Do linux bridge is doing it correct or it is a bug?
> ksz9477 is probably adding a tag and counting tagged packets. Should
> this number be provided to stats64?
I've come across this before, when i was doing systematic testing of
switches, using different USB ethernet dongles as traffic
source/sinks. Tests with one board and set of dongles gave different
results to a different board with different dongles. The drivers
counted different bytes in the frames. Some drivers include the FCS,
some don't, etc. I proposed a change to one of the drivers so it gave
the same counters as the other, but it was rejected. Because it is not
clearly defined what should be counted, there is not correct driver.
It is also unclear how you should count runt frames which get padded
up to 64 when actually put on the wire. This might be why the bridge
is so different, the frame as not been padded yet.
Andrew
next prev parent reply other threads:[~2022-02-11 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-11 8:48 packet stats validation Oleksij Rempel
2022-02-11 21:50 ` Andrew Lunn [this message]
2022-02-12 2:21 ` Stephen Hemminger
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=YgbaKDZhHfGV542h@lunn.ch \
--to=andrew@lunn.ch \
--cc=netdev@vger.kernel.org \
--cc=o.rempel@pengutronix.de \
/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).