[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YgbaKDZhHfGV542h@lunn.ch>
Date: Fri, 11 Feb 2022 22:50:32 +0100
From: Andrew Lunn <andrew@...n.ch>
To: Oleksij Rempel <o.rempel@...gutronix.de>
Cc: netdev@...r.kernel.org
Subject: Re: packet stats validation
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
Powered by blists - more mailing lists