Thread (9 messages) 9 messages, 3 authors, 2023-09-01
STALE1029d

[PATCH net-next RFC v1 3/4] veth: lift skb_head_is_locked restriction for SKB based XDP

From: Jesper Dangaard Brouer <hawk@kernel.org>
Date: 2023-08-22 17:59:25
Subsystem: networking drivers, the rest · Maintainers: Andrew Lunn, "David S. Miller", Eric Dumazet, Jakub Kicinski, Paolo Abeni, Linus Torvalds

As veth_xdp_rcv_skb() no-longer steals SKB data and no-longer uses
XDP native xdp_do_redirect(), then it is possible to handle
more types of SKBs with other memory types.

Replacing skb_head_is_locked() with skb_cloned().

Signed-off-by: Jesper Dangaard Brouer <hawk@kernel.org>
---
 drivers/net/veth.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index 192547035194..8e117cc44fda 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -720,7 +720,7 @@ static int veth_convert_skb_to_xdp_buff(struct veth_rq *rq,
 	struct sk_buff *skb = *pskb;
 	u32 frame_sz;
 
-	if (skb_shared(skb) || skb_head_is_locked(skb) ||
+	if (skb_shared(skb) || skb_cloned(skb) ||
 	    skb_shinfo(skb)->nr_frags ||
 	    skb_headroom(skb) < XDP_PACKET_HEADROOM) {
 		u32 size, len, max_head_size, off;

Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help