netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Fernando Fernandez Mancera <fmancera@suse.de>
Cc: bpf@vger.kernel.org, netdev@vger.kernel.org,
	magnus.karlsson@intel.com, maciej.fijalkowski@intel.com,
	sdf@fomichev.me, kerneljasonxing@gmail.com, fw@strlen.de
Subject: Re: [PATCH 2/2 bpf v2] xsk: avoid data corruption on cq descriptor number
Date: Tue, 28 Oct 2025 16:01:07 -0700	[thread overview]
Message-ID: <20251028160107.5c161a4f@kernel.org> (raw)
In-Reply-To: <20251028183032.5350-2-fmancera@suse.de>

On Tue, 28 Oct 2025 19:30:32 +0100 Fernando Fernandez Mancera wrote:
> Since commit 30f241fcf52a ("xsk: Fix immature cq descriptor
> production"), the descriptor number is stored in skb control block and
> xsk_cq_submit_addr_locked() relies on it to put the umem addrs onto
> pool's completion queue.

Looking at the past discussion it sounds like you want to optimize 
the single descriptor case? Can you not use a magic pointer for that?

	#define XSK_DESTRUCT_SINGLE_BUF	(void *)1
	destructor_arg = XSK_DESTRUCT_SINGLE_BUF

Let's target this fix at net, please, I think the complexity here is
all in skbs paths.

  reply	other threads:[~2025-10-28 23:01 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-28 18:30 [PATCH 1/2 bpf v2] xdp: add XDP extension to skb Fernando Fernandez Mancera
2025-10-28 18:30 ` [PATCH 2/2 bpf v2] xsk: avoid data corruption on cq descriptor number Fernando Fernandez Mancera
2025-10-28 23:01   ` Jakub Kicinski [this message]
2025-10-29  7:51     ` Fernando Fernandez Mancera
2025-10-29 23:22       ` Jakub Kicinski
2025-10-30  8:38         ` Fernando Fernandez Mancera
2025-10-30  1:05   ` Jason Xing
2025-10-28 22:55 ` [PATCH 1/2 bpf v2] xdp: add XDP extension to skb Jakub Kicinski

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=20251028160107.5c161a4f@kernel.org \
    --to=kuba@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=fmancera@suse.de \
    --cc=fw@strlen.de \
    --cc=kerneljasonxing@gmail.com \
    --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;
as well as URLs for NNTP newsgroup(s).