* [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
@ 2026-03-16 14:05 Maciej Fijalkowski
2026-03-16 15:40 ` Stanislav Fomichev
` (3 more replies)
0 siblings, 4 replies; 11+ messages in thread
From: Maciej Fijalkowski @ 2026-03-16 14:05 UTC (permalink / raw)
To: bpf
Cc: netdev, magnus.karlsson, stfomichev, kuba, pabeni, horms, ast,
daniel, Maciej Fijalkowski
Commit f620af11c27b ("xsk: avoid double checking against rx queue being
full") addressed a case in copy mode, when working with multi-buffer
xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
there is a space to produce descriptors.
Adjust ZC path to follow the same principle.
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
---
v2: route patch via bpf-next, not net-next
---
net/xdp/xsk.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/net/xdp/xsk.c b/net/xdp/xsk.c
index ef265e45810c..cdf93728fcba 100644
--- a/net/xdp/xsk.c
+++ b/net/xdp/xsk.c
@@ -196,13 +196,13 @@ static int xsk_rcv_zc(struct xdp_sock *xs, struct xdp_buff *xdp, u32 len)
goto err;
}
- __xsk_rcv_zc(xs, xskb, len, contd);
+ __xsk_rcv_zc_safe(xs, xskb, len, contd);
xskb_list = &xskb->pool->xskb_list;
list_for_each_entry_safe(pos, tmp, xskb_list, list_node) {
if (list_is_singular(xskb_list))
contd = 0;
len = pos->xdp.data_end - pos->xdp.data;
- __xsk_rcv_zc(xs, pos, len, contd);
+ __xsk_rcv_zc_safe(xs, pos, len, contd);
list_del_init(&pos->list_node);
}
--
2.43.0
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-16 14:05 [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
@ 2026-03-16 15:40 ` Stanislav Fomichev
2026-03-17 0:12 ` Jakub Kicinski
` (2 subsequent siblings)
3 siblings, 0 replies; 11+ messages in thread
From: Stanislav Fomichev @ 2026-03-16 15:40 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, netdev, magnus.karlsson, kuba, pabeni, horms, ast, daniel
On 03/16, Maciej Fijalkowski wrote:
> Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> full") addressed a case in copy mode, when working with multi-buffer
> xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> there is a space to produce descriptors.
>
> Adjust ZC path to follow the same principle.
>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> ---
> v2: route patch via bpf-next, not net-next
Acked-by: Stanislav Fomichev <sdf@fomichev.me>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-16 14:05 [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
2026-03-16 15:40 ` Stanislav Fomichev
@ 2026-03-17 0:12 ` Jakub Kicinski
2026-03-17 15:09 ` Alexei Starovoitov
2026-03-17 1:21 ` Jason Xing
2026-03-18 2:10 ` patchwork-bot+netdevbpf
3 siblings, 1 reply; 11+ messages in thread
From: Jakub Kicinski @ 2026-03-17 0:12 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, netdev, magnus.karlsson, stfomichev, pabeni, horms, ast,
daniel
On Mon, 16 Mar 2026 15:05:57 +0100 Maciej Fijalkowski wrote:
> Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> full") addressed a case in copy mode, when working with multi-buffer
> xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> there is a space to produce descriptors.
>
> Adjust ZC path to follow the same principle.
Acked-by: Jakub Kicinski <kuba@kernel.org>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-16 14:05 [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
2026-03-16 15:40 ` Stanislav Fomichev
2026-03-17 0:12 ` Jakub Kicinski
@ 2026-03-17 1:21 ` Jason Xing
2026-03-18 2:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 11+ messages in thread
From: Jason Xing @ 2026-03-17 1:21 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, netdev, magnus.karlsson, stfomichev, kuba, pabeni, horms,
ast, daniel
On Mon, Mar 16, 2026 at 10:14 PM Maciej Fijalkowski
<maciej.fijalkowski@intel.com> wrote:
>
> Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> full") addressed a case in copy mode, when working with multi-buffer
> xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> there is a space to produce descriptors.
>
> Adjust ZC path to follow the same principle.
>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Reviewed-by: Jason Xing <kerneljasonxing@gmail.com>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-17 0:12 ` Jakub Kicinski
@ 2026-03-17 15:09 ` Alexei Starovoitov
2026-03-17 22:20 ` Jakub Kicinski
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2026-03-17 15:09 UTC (permalink / raw)
To: Jakub Kicinski, Martin KaFai Lau
Cc: Maciej Fijalkowski, bpf, Network Development, Karlsson, Magnus,
Stanislav Fomichev, Paolo Abeni, Simon Horman, Alexei Starovoitov,
Daniel Borkmann
On Mon, Mar 16, 2026 at 5:12 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Mon, 16 Mar 2026 15:05:57 +0100 Maciej Fijalkowski wrote:
> > Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> > full") addressed a case in copy mode, when working with multi-buffer
> > xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> > there is a space to produce descriptors.
> >
> > Adjust ZC path to follow the same principle.
>
> Acked-by: Jakub Kicinski <kuba@kernel.org>
Do you guys need it in net-next in this merge window ?
We have nothing in bpf-next/net so far, so should be fine
to take this patch into net-next directly?
Martin, thoughts?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-17 15:09 ` Alexei Starovoitov
@ 2026-03-17 22:20 ` Jakub Kicinski
2026-03-18 0:57 ` Alexei Starovoitov
0 siblings, 1 reply; 11+ messages in thread
From: Jakub Kicinski @ 2026-03-17 22:20 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Martin KaFai Lau, Maciej Fijalkowski, bpf, Network Development,
Karlsson, Magnus, Stanislav Fomichev, Paolo Abeni, Simon Horman,
Alexei Starovoitov, Daniel Borkmann
On Tue, 17 Mar 2026 08:09:08 -0700 Alexei Starovoitov wrote:
> On Mon, Mar 16, 2026 at 5:12 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > On Mon, 16 Mar 2026 15:05:57 +0100 Maciej Fijalkowski wrote:
> > > Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> > > full") addressed a case in copy mode, when working with multi-buffer
> > > xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> > > there is a space to produce descriptors.
> > >
> > > Adjust ZC path to follow the same principle.
> >
> > Acked-by: Jakub Kicinski <kuba@kernel.org>
>
> Do you guys need it in net-next in this merge window ?
>
> We have nothing in bpf-next/net so far, so should be fine
> to take this patch into net-next directly?
Somehow __xsk_rcv_zc_safe() landed in bpf-next/master f620af11c27b8ec9
So I think we have limited number of possible moves now :)
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-17 22:20 ` Jakub Kicinski
@ 2026-03-18 0:57 ` Alexei Starovoitov
2026-03-18 1:29 ` Jakub Kicinski
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2026-03-18 0:57 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Martin KaFai Lau, Maciej Fijalkowski, bpf, Network Development,
Karlsson, Magnus, Stanislav Fomichev, Paolo Abeni, Simon Horman,
Alexei Starovoitov, Daniel Borkmann
On Tue, Mar 17, 2026 at 3:20 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 17 Mar 2026 08:09:08 -0700 Alexei Starovoitov wrote:
> > On Mon, Mar 16, 2026 at 5:12 PM Jakub Kicinski <kuba@kernel.org> wrote:
> > > On Mon, 16 Mar 2026 15:05:57 +0100 Maciej Fijalkowski wrote:
> > > > Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> > > > full") addressed a case in copy mode, when working with multi-buffer
> > > > xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> > > > there is a space to produce descriptors.
> > > >
> > > > Adjust ZC path to follow the same principle.
> > >
> > > Acked-by: Jakub Kicinski <kuba@kernel.org>
> >
> > Do you guys need it in net-next in this merge window ?
> >
> > We have nothing in bpf-next/net so far, so should be fine
> > to take this patch into net-next directly?
>
> Somehow __xsk_rcv_zc_safe() landed in bpf-next/master f620af11c27b8ec9
> So I think we have limited number of possible moves now :)
I wasn't paying attention. We can revert it in bpf-next and reapply
in net-next and probably route all future xsk patches to net/net-next ?
since it doesn't have much to do with bpf anymore.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-18 0:57 ` Alexei Starovoitov
@ 2026-03-18 1:29 ` Jakub Kicinski
2026-03-18 1:43 ` Alexei Starovoitov
0 siblings, 1 reply; 11+ messages in thread
From: Jakub Kicinski @ 2026-03-18 1:29 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Martin KaFai Lau, Maciej Fijalkowski, bpf, Network Development,
Karlsson, Magnus, Stanislav Fomichev, Paolo Abeni, Simon Horman,
Alexei Starovoitov, Daniel Borkmann
On Tue, 17 Mar 2026 17:57:32 -0700 Alexei Starovoitov wrote:
> > > Do you guys need it in net-next in this merge window ?
> > >
> > > We have nothing in bpf-next/net so far, so should be fine
> > > to take this patch into net-next directly?
> >
> > Somehow __xsk_rcv_zc_safe() landed in bpf-next/master f620af11c27b8ec9
> > So I think we have limited number of possible moves now :)
>
> I wasn't paying attention. We can revert it in bpf-next and reapply
> in net-next and probably route all future xsk patches to net/net-next ?
> since it doesn't have much to do with bpf anymore.
Maybe we should defer until the merge window and let it sit in Maciej's
local tree for now. It's a tiny optimization, Maciej can resend in the
next cycle.
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-18 1:29 ` Jakub Kicinski
@ 2026-03-18 1:43 ` Alexei Starovoitov
2026-03-18 1:52 ` Jakub Kicinski
0 siblings, 1 reply; 11+ messages in thread
From: Alexei Starovoitov @ 2026-03-18 1:43 UTC (permalink / raw)
To: Jakub Kicinski
Cc: Martin KaFai Lau, Maciej Fijalkowski, bpf, Network Development,
Karlsson, Magnus, Stanislav Fomichev, Paolo Abeni, Simon Horman,
Alexei Starovoitov, Daniel Borkmann
On Tue, Mar 17, 2026 at 6:29 PM Jakub Kicinski <kuba@kernel.org> wrote:
>
> On Tue, 17 Mar 2026 17:57:32 -0700 Alexei Starovoitov wrote:
> > > > Do you guys need it in net-next in this merge window ?
> > > >
> > > > We have nothing in bpf-next/net so far, so should be fine
> > > > to take this patch into net-next directly?
> > >
> > > Somehow __xsk_rcv_zc_safe() landed in bpf-next/master f620af11c27b8ec9
> > > So I think we have limited number of possible moves now :)
> >
> > I wasn't paying attention. We can revert it in bpf-next and reapply
> > in net-next and probably route all future xsk patches to net/net-next ?
> > since it doesn't have much to do with bpf anymore.
>
> Maybe we should defer until the merge window and let it sit in Maciej's
> local tree for now. It's a tiny optimization, Maciej can resend in the
> next cycle.
or I can apply it to bpf-next/master and we start taking xsk via net-next
after merge window?
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-18 1:43 ` Alexei Starovoitov
@ 2026-03-18 1:52 ` Jakub Kicinski
0 siblings, 0 replies; 11+ messages in thread
From: Jakub Kicinski @ 2026-03-18 1:52 UTC (permalink / raw)
To: Alexei Starovoitov
Cc: Martin KaFai Lau, Maciej Fijalkowski, bpf, Network Development,
Karlsson, Magnus, Stanislav Fomichev, Paolo Abeni, Simon Horman,
Alexei Starovoitov, Daniel Borkmann
On Tue, 17 Mar 2026 18:43:18 -0700 Alexei Starovoitov wrote:
> > > I wasn't paying attention. We can revert it in bpf-next and reapply
> > > in net-next and probably route all future xsk patches to net/net-next ?
> > > since it doesn't have much to do with bpf anymore.
> >
> > Maybe we should defer until the merge window and let it sit in Maciej's
> > local tree for now. It's a tiny optimization, Maciej can resend in the
> > next cycle.
>
> or I can apply it to bpf-next/master and we start taking xsk via net-next
> after merge window?
SGTM
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
2026-03-16 14:05 [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
` (2 preceding siblings ...)
2026-03-17 1:21 ` Jason Xing
@ 2026-03-18 2:10 ` patchwork-bot+netdevbpf
3 siblings, 0 replies; 11+ messages in thread
From: patchwork-bot+netdevbpf @ 2026-03-18 2:10 UTC (permalink / raw)
To: Maciej Fijalkowski
Cc: bpf, netdev, magnus.karlsson, stfomichev, kuba, pabeni, horms,
ast, daniel
Hello:
This patch was applied to bpf/bpf-next.git (master)
by Alexei Starovoitov <ast@kernel.org>:
On Mon, 16 Mar 2026 15:05:57 +0100 you wrote:
> Commit f620af11c27b ("xsk: avoid double checking against rx queue being
> full") addressed a case in copy mode, when working with multi-buffer
> xdp_buff, where we were peeking onto XSK Rx queue twice, to find out if
> there is a space to produce descriptors.
>
> Adjust ZC path to follow the same principle.
>
> [...]
Here is the summary with links:
- [v2,bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
https://git.kernel.org/bpf/bpf-next/c/77378dabb50f
You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-03-18 2:10 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 14:05 [PATCH v2 bpf-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
2026-03-16 15:40 ` Stanislav Fomichev
2026-03-17 0:12 ` Jakub Kicinski
2026-03-17 15:09 ` Alexei Starovoitov
2026-03-17 22:20 ` Jakub Kicinski
2026-03-18 0:57 ` Alexei Starovoitov
2026-03-18 1:29 ` Jakub Kicinski
2026-03-18 1:43 ` Alexei Starovoitov
2026-03-18 1:52 ` Jakub Kicinski
2026-03-17 1:21 ` Jason Xing
2026-03-18 2:10 ` patchwork-bot+netdevbpf
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox