diff options
author | 2023-07-19 18:04:07 -0700 | |
---|---|---|
committer | 2023-07-21 18:50:18 -0700 | |
commit | 98e2727c79d007d99a026eb66f481908e66af263 (patch) | |
tree | b514bec3504d246489da0bd70022601906cdb8e2 /drivers/net/ethernet/stmicro | |
parent | eth: tsnep: let page recycling happen with skbs (diff) | |
download | linux-98e2727c79d007d99a026eb66f481908e66af263.tar.gz linux-98e2727c79d007d99a026eb66f481908e66af263.tar.bz2 linux-98e2727c79d007d99a026eb66f481908e66af263.zip |
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>
Diffstat (limited to 'drivers/net/ethernet/stmicro')
-rw-r--r-- | drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index e7ca52f0d2f2..e1f1c034d325 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -5441,7 +5441,7 @@ read_again: 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 @@ read_again: 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; } |