Thread (5 messages) 5 messages, 4 authors, 5d ago

Re: [PATCH net-next v2] net: skbuff: optimization of net_zcopy_get() call in pskb_carve helpers

From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Date: 2026-07-09 01:26:12

Yun Lu wrote:
From: Yun Lu <redacted>

Commit 98d0912e9f84 ("net: skbuff: fix missing zerocopy reference in
pskb_carve helpers") introduced two calls of net_zcopy_get(skb_zcopy(skb)).
In fact, skb_zcopy() has already been executed once before. When calling
net_zcopy_get(), skb_zcopy() always returns skb_uarg(skb), which results
in adding some unnecessary instructions in skb_zcopy. So, change these
two calls to directly use skb_uarg(skb) instead of skb_zcopy.

In addition, also use net_zcopy_get() instead of refcount_inc() in
pskb_expand_head() for code consistency.

No functional change intended.

Signed-off-by: Yun Lu <redacted>
Reviewed-by: Willem de Bruijn <willemb@google.com>
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help