public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH net-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing
@ 2026-03-10 13:30 Maciej Fijalkowski
  2026-03-10 18:22 ` kernel test robot
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Maciej Fijalkowski @ 2026-03-10 13:30 UTC (permalink / raw)
  To: netdev
  Cc: bpf, magnus.karlsson, stfomichev, kuba, pabeni, horms,
	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>
---
 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] 9+ messages in thread

end of thread, other threads:[~2026-03-14 14:46 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-10 13:30 [PATCH net-next] xsk: use __xsk_rcv_zc_safe for ZC multi-buffer Rx processing Maciej Fijalkowski
2026-03-10 18:22 ` kernel test robot
2026-03-10 21:59 ` Stanislav Fomichev
2026-03-13  0:33   ` Jakub Kicinski
2026-03-13  9:31     ` Maciej Fijalkowski
2026-03-13 10:49       ` Maciej Fijalkowski
2026-03-14 14:46         ` Jakub Kicinski
2026-03-10 22:10 ` kernel test robot
2026-03-11  0:36 ` Jason Xing

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox