mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-02-23 00:22:56 -05:00
eth: stmmac: let page recycling happen with skbs
stmmac removes pages from the page pool after attaching them to skbs. Use page recycling instead. skb heads are always copied, and pages are always from page pool in this driver. We could as well mark all allocated skbs for recycling. Reviewed-by: Yunsheng Lin <linyunsheng@huawei.com> Link: https://lore.kernel.org/r/20230720010409.1967072-3-kuba@kernel.org Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
This commit is contained in:
@@ -5441,7 +5441,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
|
||||
priv->dma_conf.dma_buf_sz);
|
||||
|
||||
/* Data payload appended into SKB */
|
||||
page_pool_release_page(rx_q->page_pool, buf->page);
|
||||
skb_mark_for_recycle(skb);
|
||||
buf->page = NULL;
|
||||
}
|
||||
|
||||
@@ -5453,7 +5453,7 @@ static int stmmac_rx(struct stmmac_priv *priv, int limit, u32 queue)
|
||||
priv->dma_conf.dma_buf_sz);
|
||||
|
||||
/* Data payload appended into SKB */
|
||||
page_pool_release_page(rx_q->page_pool, buf->sec_page);
|
||||
skb_mark_for_recycle(skb);
|
||||
buf->sec_page = NULL;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user