Commit b03f68ba authored by Jakub Kicinski's avatar Jakub Kicinski

eth: tsnep: let page recycling happen with skbs

tsnep builds an skb with napi_build_skb() and then calls
page_pool_release_page() for the page in which that skb's
head sits. Use recycling instead, recycling of heads works
just fine.
Reviewed-by: default avatarYunsheng Lin <linyunsheng@huawei.com>
Link: https://lore.kernel.org/r/20230720010409.1967072-2-kuba@kernel.orgReviewed-by: default avatarAlexander Lobakin <aleksander.lobakin@intel.com>
Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5766946e
...@@ -1333,7 +1333,7 @@ static void tsnep_rx_page(struct tsnep_rx *rx, struct napi_struct *napi, ...@@ -1333,7 +1333,7 @@ static void tsnep_rx_page(struct tsnep_rx *rx, struct napi_struct *napi,
skb = tsnep_build_skb(rx, page, length); skb = tsnep_build_skb(rx, page, length);
if (skb) { if (skb) {
page_pool_release_page(rx->page_pool, page); skb_mark_for_recycle(skb);
rx->packets++; rx->packets++;
rx->bytes += length; rx->bytes += length;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment