Netdev List
 help / color / mirror / Atom feed
From: David Laight <david.laight.linux@gmail.com>
To: Nicolai Buchwitz <nb@tipi-net.de>
Cc: "Jakub Kicinski" <kuba@kernel.org>,
	"Théo Lebrun" <theo.lebrun@bootlin.com>,
	"Conor Dooley" <conor.dooley@microchip.com>,
	"Claudiu Beznea" <claudiu.beznea@tuxon.dev>,
	"Jonathan Bell" <jonathan@raspberrypi.com>,
	"Andrew Lunn" <andrew+netdev@lunn.ch>,
	"David S . Miller" <davem@davemloft.net>,
	"Eric Dumazet" <edumazet@google.com>,
	"Paolo Abeni" <pabeni@redhat.com>,
	"Richard Cochran" <richardcochran@gmail.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net 1/2] net: macb: exclude software FCS from TX byte statistics
Date: Fri, 28 Aug 2026 14:02:42 +0100	[thread overview]
Message-ID: <20260828140242.7c78d4cd@pumpkin> (raw)
In-Reply-To: <36165fe4a906b07dd9f92a73a72a05f1@tipi-net.de>

On Fri, 28 Aug 2026 10:20:24 +0200
Nicolai Buchwitz <nb@tipi-net.de> wrote:

> Hi Jakub
> 
> On 27.8.2026 20:56, Jakub Kicinski 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.  
> 
> Matches what I had in mind for my v2. So the driver bytes would match 
> wire bytes minus FCS.
> 
> > 
> > Either way, you only need u8 or even a flag for this,
> > not a full u32?  
> 
> Agreed. skb->len at completion should already do the trick (minus 
> ETH_FCS_LEN).
> So a flag would be sufficient.

If you make the 'flag' 0 or 4 it will save some maths (and maybe a branch)
in the completion code.

David

> 
> Thanks,
> Nicolai
> 


  reply	other threads:[~2026-08-28 13:02 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-24 13:47 [PATCH net 0/2] net: macb: fix zero UDPv4 checksum on transmit Nicolai Buchwitz
2026-08-24 13:47 ` [PATCH net 1/2] net: macb: exclude software FCS from TX byte statistics Nicolai Buchwitz
2026-08-25 15:04   ` Nicolai Buchwitz
2026-08-27  8:52     ` Paolo Abeni
2026-08-28  8:10       ` Nicolai Buchwitz
2026-08-27 18:56   ` Jakub Kicinski
2026-08-28  8:20     ` Nicolai Buchwitz
2026-08-28 13:02       ` David Laight [this message]
2026-08-28  8:37     ` David Laight
2026-08-24 13:47 ` [PATCH net 2/2] net: macb: fix zero UDPv4 checksum on transmit Nicolai Buchwitz
2026-08-28  6:04 ` [PATCH net 0/2] " Alexander Dahl

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=20260828140242.7c78d4cd@pumpkin \
    --to=david.laight.linux@gmail.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=claudiu.beznea@tuxon.dev \
    --cc=conor.dooley@microchip.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jonathan@raspberrypi.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nb@tipi-net.de \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=richardcochran@gmail.com \
    --cc=theo.lebrun@bootlin.com \
    /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