Thread (22 messages) 22 messages, 2 authors, 2025-09-16
STALE310d

[PATCH io_uring for-6.18 03/20] io_uring/zcrx: use page_pool_unref_and_test()

From: Pavel Begunkov <asml.silence@gmail.com>
Date: 2025-09-16 14:26:51
Also in: io-uring
Subsystem: io_uring, io_uring zcrx, the rest · Maintainers: Jens Axboe, Pavel Begunkov, Linus Torvalds

page_pool_unref_and_test() tries to better follow usuall refcount
semantics, use it instead of page_pool_unref_netmem().

Signed-off-by: Pavel Begunkov <asml.silence@gmail.com>
---
 io_uring/zcrx.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/io_uring/zcrx.c b/io_uring/zcrx.c
index a4a0560e8269..bd2fb3688432 100644
--- a/io_uring/zcrx.c
+++ b/io_uring/zcrx.c
@@ -787,7 +787,7 @@ static void io_zcrx_ring_refill(struct page_pool *pp,
 			continue;
 
 		netmem = net_iov_to_netmem(niov);
-		if (page_pool_unref_netmem(netmem, 1) != 0)
+		if (!page_pool_unref_and_test(netmem))
 			continue;
 
 		if (unlikely(niov->pp != pp)) {
-- 
2.49.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help