[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240403152844.4061814-4-almasrymina@google.com>
Date: Wed, 3 Apr 2024 08:28:42 -0700
From: Mina Almasry <almasrymina@...gle.com>
To: netdev@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: Mina Almasry <almasrymina@...gle.com>, Ayush Sawal <ayush.sawal@...lsio.com>,
"David S. Miller" <davem@...emloft.net>, Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Steffen Klassert <steffen.klassert@...unet.com>, Herbert Xu <herbert@...dor.apana.org.au>,
David Ahern <dsahern@...nel.org>, Boris Pismenny <borisp@...dia.com>,
John Fastabend <john.fastabend@...il.com>, Tariq Toukan <tariqt@...dia.com>,
Dragos Tatulea <dtatulea@...dia.com>, Simon Horman <horms@...nel.org>,
Sabrina Dubroca <sd@...asysnail.net>,
"Ahelenia ZiemiaĆska" <nabijaczleweli@...ijaczleweli.xyz>,
Pavan Chebbi <pavan.chebbi@...adcom.com>,
Christophe JAILLET <christophe.jaillet@...adoo.fr>, Yunsheng Lin <linyunsheng@...wei.com>,
Florian Westphal <fw@...len.de>, David Howells <dhowells@...hat.com>,
Alexander Lobakin <aleksander.lobakin@...el.com>, Lorenzo Bianconi <lorenzo@...nel.org>,
Johannes Berg <johannes.berg@...el.com>
Subject: [PATCH net-next v4 3/3] 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@...gle.com>
Reviewed-by: Dragos Tatulea <dtatulea@...dia.com>
---
include/linux/skbuff.h | 8 +-------
net/core/skbuff.c | 2 +-
2 files changed, 2 insertions(+), 8 deletions(-)
diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index 71caeee061ca..eb3d70e57166 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -3536,12 +3536,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
@@ -3552,7 +3546,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 ff7e450ec5ea..9aa1b40d1693 100644
--- a/net/core/skbuff.c
+++ b/net/core/skbuff.c
@@ -1082,7 +1082,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)
--
2.44.0.478.gd926399ef9-goog
Powered by blists - more mailing lists