Re: [PATCH net 1/2] net: macb: exclude software FCS from TX byte statistics

From: David Laight

Date: Fri Aug 28 2026 - 04:37:45 EST


On Thu, 27 Aug 2026 11:56:01 -0700
Jakub Kicinski <kuba@xxxxxxxxxx> wrote:

> On Mon, 24 Aug 2026 15:47:02 +0200 Nicolai Buchwitz wrote:
> > + * @skb_len: skb->len as handed over by the stack, before padding and
> > + * software FCS, only set for the last buffer of the frame
>
> counting pad bytes to ETH_ZLEN as sent is perfectly legit,
> it's a driver preference. Some don't because HW pads and
> the driver doesn't want to bother adding a conditional.
> But it's best if the driver bytes match wire bytes IMO.
>
> Either way, you only need u8 or even a flag for this,
> not a full u32?
>

You could save a count to be subtracted from skb->len.
But isn't that also unrelated to the UDP checksum issue?

Note that the receiver will treat an IPv4 checksum of zero as valid.
For IPv6 it is a protocol error.

David