Linux-ARM-Kernel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jisheng Zhang <jszhang@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@kernel.org>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Stanislav Fomichev <sdf@fomichev.me>,
	Ong Boon Leong <boon.leong.ong@intel.com>,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	bpf@vger.kernel.org
Subject: Re: [PATCH net-next 2/2] net: stmmac: disable TX checksum offload for jumbo frames on bugged cores
Date: Wed, 21 Oct 2026 12:33:37 +0800	[thread overview]
Message-ID: <athAoWfW-xesPhFP@xhacker> (raw)
In-Reply-To: <3ca537e7-c9a3-4306-a2f4-9c7d57123bfc@lunn.ch>

On Tue, Oct 20, 2026 at 02:28:26PM +0200, Andrew Lunn wrote:
> > > Here I want to query a generic rule from netdev maintainers:
> > > can XDP frame enable HW checksum on dwmac IP? Per my understanding, the
> > > dwmac can only do HW checksum for normal particular packets layouts, such as
> > > TCP, UDP. What about if XDP transmits a non-IP frame?
> > 
> > or a generic XDP guide from netdev maintainers:
> > Since XDP can tranmist arbitrary Eth frames, so how does the eth driver cope
> > with HW checksum if the HW checksum is intended for supported IP packet
> > layouts rather than arbitrary layer2 frames?
> > 
> > choices:
> > c1. Simply disabled HW checksum by default. Then XDP prog must provide
> > checksums themselves, lost the HW offload cap for IP packets.
> > 
> > c2. detect the frame in eth driver's xdp code path, then enable/disable
> > HW checksum accordingly. Then how? Any example in exisiting eth drivers
> > is appreciated.
> 
> Why is this specific to XDP? Cannot the network stack transmit
> arbitrary layer2 frames? Isn't this a generic problem?
> 

network stack normal tx supplies the skb->ip_summed metadata, and
dwmac driver specifically can decide to enable/disable HW csum
by checking the protocol which is extraced from skb, example
stmmac_has_ip_ethertype()
But XDP path doesn't have the necessary metadata, and I'm not sure
whether stmmac_has_ip_ethertype xdb version can be implemented or
not. That's the reason I request generic XDP guidence from netdev
maintainers.

correct me if I misunderstood something.

Thanks


  reply	other threads:[~2026-10-21  4:53 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-12 15:24 [PATCH net-next 0/2] stmmac: some XDP fixes in XDP_TX path Lorenzo Bianconi
2026-10-12 15:24 ` [PATCH net-next 1/2] net: stmmac: fix XDP TX DMA address for compound RX pages Lorenzo Bianconi
2026-10-12 19:43   ` Daniel Machon
2026-10-12 20:47     ` Lorenzo Bianconi
2026-10-13  7:54       ` Daniel Machon
2026-10-13 15:27   ` netdev-bot+sashiko
2026-10-13 15:40     ` Lorenzo Bianconi
2026-10-16 14:13   ` Maxime Chevallier
2026-10-12 15:24 ` [PATCH net-next 2/2] net: stmmac: disable TX checksum offload for jumbo frames on bugged cores Lorenzo Bianconi
2026-10-13 15:27   ` netdev-bot+sashiko
2026-10-13 15:33     ` Lorenzo Bianconi
2026-10-19 13:40       ` Paolo Abeni
2026-10-20 13:17         ` Lorenzo Bianconi
2026-10-16 14:18   ` Maxime Chevallier
2026-10-20  0:57     ` Jisheng Zhang
2026-10-20  3:08       ` Jisheng Zhang
2026-10-20 12:28         ` Andrew Lunn
2026-10-21  4:33           ` Jisheng Zhang [this message]
2026-10-12 15:30 ` [PATCH net-next 0/2] stmmac: some XDP fixes in XDP_TX path netdev-bot+sinfo
2026-10-12 15:52   ` Lorenzo Bianconi
2026-10-19 13:50 ` patchwork-bot+netdevbpf

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=athAoWfW-xesPhFP@xhacker \
    --to=jszhang@kernel.org \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=andrew@lunn.ch \
    --cc=ast@kernel.org \
    --cc=boon.leong.ong@intel.com \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=hawk@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=lorenzo.bianconi@oss.qualcomm.com \
    --cc=maxime.chevallier@bootlin.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    /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