aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorMina Almasry <almasrymina@google.com>2024-04-08 08:29:58 -0700
committerJakub Kicinski <kuba@kernel.org>2024-04-09 18:20:32 -0700
commitf58f3c9563409e618e591d0d540316286cb0665f (patch)
tree7137308fbcdba00cb1b087c1efd78be02fc5b1b8
parentnet: make napi_frag_unref reuse skb_page_unref (diff)
downloadwireguard-linux-f58f3c9563409e618e591d0d540316286cb0665f.tar.xz
wireguard-linux-f58f3c9563409e618e591d0d540316286cb0665f.zip
net: remove napi_frag_unref
With the changes in the last patches, napi_frag_unref() is now reduandant. Remove it and use skb_page_unref directly. Signed-off-by: Mina Almasry <almasrymina@google.com> Reviewed-by: Dragos Tatulea <dtatulea@nvidia.com> Reviewed-by: Eric Dumazet <edumazet@google.com> Reviewed-by: Jacob Keller <jacob.e.keller@intel.com> Link: https://lore.kernel.org/r/20240408153000.2152844-4-almasrymina@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--include/linux/skbuff.h8
-rw-r--r--net/core/skbuff.c2
2 files changed, 2 insertions, 8 deletions
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index c0ff85bb087a..7135a3e94afd 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3531,12 +3531,6 @@ skb_page_unref(struct page *page, bool recycle)
put_page(page);
}
-static inline void
-napi_frag_unref(skb_frag_t *frag, bool recycle)
-{
- skb_page_unref(skb_frag_page(frag), recycle);
-}
-
/**
* __skb_frag_unref - release a reference on a paged fragment.
* @frag: the paged fragment
@@ -3547,7 +3541,7 @@ napi_frag_unref(skb_frag_t *frag, bool recycle)
*/
static inline void __skb_frag_unref(skb_frag_t *frag, bool recycle)
{
- napi_frag_unref(frag, recycle);
+ skb_page_unref(skb_frag_page(frag), recycle);
}
/**
diff --git a/net/core/skbuff.c b/net/core/skbuff.c
index 21cd01641f4c..888874ef8566 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1101,7 +1101,7 @@ static void skb_release_data(struct sk_buff *skb, enum skb_drop_reason reason)
}
for (i = 0; i < shinfo->nr_frags; i++)
- napi_frag_unref(&shinfo->frags[i], skb->pp_recycle);
+ __skb_frag_unref(&shinfo->frags[i], skb->pp_recycle);
free_head:
if (shinfo->frag_list)