Netdev List
 help / color / mirror / Atom feed
From: Tianyi Gao <tianyi@cloudflare.com>
To: Alexander Duyck <alexander.duyck@gmail.com>
Cc: Tianyi Gao <tianyi@cloudflare.com>,
	netdev@vger.kernel.org, intel-wired-lan@lists.osuosl.org,
	Tony Nguyen <anthony.l.nguyen@intel.com>,
	Przemek Kitszel <przemyslaw.kitszel@intel.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>,
	Simon Horman <horms@kernel.org>,
	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>,
	Paul Greenwalt <paul.greenwalt@intel.com>,
	Alice Michael <alice.michael@intel.com>,
	Eric Joyner <eric.joyner@intel.com>,
	Jesse Brandeburg <jbrandeb@kernel.org>,
	Lorenzo Bianconi <lorenzo@kernel.org>,
	bpf@vger.kernel.org, kernel-team@cloudflare.com,
	tianyi.gao@linux.dev,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH net] ice: do not report CHECKSUM_COMPLETE when an XDP program is attached
Date: Wed, 25 Nov 2026 22:44:20 +0000	[thread overview]
Message-ID: <20261125224421.79289-1-tianyi@cloudflare.com> (raw)
In-Reply-To: <CAKgT0Ueso=OQ7=GJp7m8nr90kBUp-+N6ko+Qy4e29MZv6tLQfQ@mail.gmail.com>

On Wed, 2026-11-25 at 14:02 -0800, Alexander Duyck wrote:
> The thing is once you start making modifications to the frame all that
> metadata should probably be thrown out anyway since none of it is
> really valid.

I see what you mean now. Today the kernel does the opposite in both
cases:

- When XDP changes the frame and returns XDP_PASS, the driver still
  reports the RX hints of the old frame.
- When XDP redirects a frame that it did not change, the RX hints are
  lost.

The right time to drop them should be when the frame is modified, not
whether it is redirected. I will look in this direction. Thank you,
this really hits the nail on the head.

> If anything, the path you are taking now with disabling
> CHECKSUM_COMPLETE is the opposite direction of how I would probably go
> about this.

Agreed. Once XDP has the infrastructure to pass an adjusted
CHECKSUM_COMPLETE to the driver, or to simply invalidate it once the
frame is modified, we should bring it back.

> That is why back in the day we had strongly encouraged
> people to use non-zero UDP checksum on their tunnels and had added the
> ability to convert the CHECKSUM_UNNECESSARY to CHECKSUM_COMPLETE when
> decapsulating generic UDP tunnels.

Yes, I fully agree, and thanks for the history behind it. I am glad
that UDP over IPv6 requires a non-zero checksum in most cases, and that
ice reports CHECKSUM_NONE for a zero checksum.

Thanks,
Tianyi

  reply	other threads:[~2026-11-25 22:44 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-21  1:24 [PATCH net] ice: do not report CHECKSUM_COMPLETE when an XDP program is attached Tianyi Gao
2026-11-23 18:29 ` Maciej Fijalkowski
2026-11-23 20:50   ` Tianyi Gao
2026-11-23 18:49 ` Alexander H Duyck
2026-11-23 20:35   ` Tianyi Gao
2026-11-23 21:09     ` Alexander Duyck
2026-11-23 22:01       ` Tianyi Gao
2026-11-23 22:42         ` Alexander Duyck
2026-11-23 23:26           ` Tianyi Gao
2026-11-24  0:17             ` Alexander Duyck
2026-11-25  9:07               ` Tianyi Gao
2026-11-25 16:32                 ` Alexander Duyck
2026-11-25 18:31                   ` Tianyi Gao
2026-11-25 22:02                     ` Alexander Duyck
2026-11-25 22:44                       ` Tianyi Gao [this message]
2026-11-25  1:38 ` netdev-bot+sashiko
2026-11-25  9:00   ` Tianyi Gao

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=20261125224421.79289-1-tianyi@cloudflare.com \
    --to=tianyi@cloudflare.com \
    --cc=alexander.duyck@gmail.com \
    --cc=alice.michael@intel.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=anthony.l.nguyen@intel.com \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@kernel.org \
    --cc=eric.joyner@intel.com \
    --cc=hawk@kernel.org \
    --cc=horms@kernel.org \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=jbrandeb@kernel.org \
    --cc=john.fastabend@gmail.com \
    --cc=kernel-team@cloudflare.com \
    --cc=kuba@kernel.org \
    --cc=lorenzo@kernel.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=paul.greenwalt@intel.com \
    --cc=przemyslaw.kitszel@intel.com \
    --cc=sdf@fomichev.me \
    --cc=tianyi.gao@linux.dev \
    /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