From: Rongzheng Wang <testwrzwrz@gmail.com>
To: Jason Xing <kerneljasonxing@gmail.com>
Cc: Rongzheng Wang <testwrzwrz@gmail.com>,
Magnus Karlsson <magnus.karlsson@intel.com>,
Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
Stanislav Fomichev <sdf@fomichev.me>,
Jesper Dangaard Brouer <hawk@kernel.org>,
netdev@vger.kernel.org, bpf@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH net v2 1/2] xsk: defer software checksum until the skb is complete
Date: Sun, 25 Oct 2026 11:43:27 +0800 [thread overview]
Message-ID: <20261025034327.95300-1-testwrzwrz@gmail.com> (raw)
In-Reply-To: <CAL+tcoBQHudeQC+B0J0mwqbh1CH82XQWfQrtyXqVMF3ybopr3w@mail.gmail.com>
Hi Jason,
Sorry for the noise. I posted v2 too quickly and incorrectly threaded it
under the v1 patch. I should have waited and replied to your review here
first. I will hold off on any further revision until this discussion settles.
You are right that I did not answer your questions directly. The cover letter
only summarizes the drop behavior:
> On a checksum failure the packet is now dropped after the descriptors have
> been consumed. Metadata validation makes this path unreachable in the
> current copy-mode implementation; keeping the defensive drop avoids a
> retry path for an skb that is no longer complete.
Let me expand on the two points you asked about.
Drop vs retry: in v2 the checksum is calculated after xskq_cons_release().
At that point the descriptors for the completed packet have already been
consumed, so returning an error and retrying the same skb is not safe. Drop
is intentional for this failure path.
skb_checksum_help() error cases: based on the current XDP_COPY path, I do not
see a reachable error. The skb is not GSO, the fragments are readable kernel
pages, the skb is not cloned or shared, and the metadata validation has
already checked the checksum range. If you think I missed an error case,
please point it out; otherwise I would keep the defensive drop.
I also applied your literal-else and unlikely suggestions, and split/reused
the selftest as 2/2.
Thanks,
Rongzheng
next prev parent reply other threads:[~2026-10-25 3:43 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-10-24 9:12 [PATCH net] " Rongzheng Wang
2026-10-24 9:15 ` netdev-bot+sinfo
2026-10-24 11:35 ` 王荣峥
2026-10-24 12:25 ` Jason Xing
2026-10-24 14:11 ` [PATCH net v2 0/2] xsk: fix multi-buffer TX software checksum Rongzheng Wang
2026-10-24 14:11 ` [PATCH net v2 1/2] xsk: defer software checksum until the skb is complete Rongzheng Wang
2026-10-25 2:51 ` Jason Xing
2026-10-25 3:43 ` Rongzheng Wang [this message]
2026-10-24 14:11 ` [PATCH net v2 2/2] selftests/bpf: cover AF_XDP multi-buffer TX software checksum Rongzheng Wang
2026-10-25 14:46 ` netdev-bot+sashiko
2026-10-24 14:15 ` [PATCH net v2 0/2] xsk: fix " netdev-bot+sinfo
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=20261025034327.95300-1-testwrzwrz@gmail.com \
--to=testwrzwrz@gmail.com \
--cc=bpf@vger.kernel.org \
--cc=hawk@kernel.org \
--cc=kerneljasonxing@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=maciej.fijalkowski@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=netdev@vger.kernel.org \
--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
all inboxes | Powered by JetHome®