diff options
author | Yunsheng Lin <linyunsheng@huawei.com> | 2021-08-06 04:46:19 +0200 |
---|---|---|
committer | Jakub Kicinski <kuba@kernel.org> | 2021-08-10 00:49:00 +0200 |
commit | 57f05bc2ab2443b89c2e2562c05053bcc7d30e8b (patch) | |
tree | caed6888bdd92daed5f868c8c01be6281be067e0 /drivers/net/ethernet/ti/cpsw_new.c | |
parent | devlink: Fix port_type_set function pointer check (diff) | |
download | linux-57f05bc2ab2443b89c2e2562c05053bcc7d30e8b.tar.xz linux-57f05bc2ab2443b89c2e2562c05053bcc7d30e8b.zip |
page_pool: keep pp info as long as page pool owns the page
Currently, page->pp is cleared and set everytime the page
is recycled, which is unnecessary.
So only set the page->pp when the page is added to the page
pool and only clear it when the page is released from the
page pool.
This is also a preparation to support allocating frag page
in page pool.
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Diffstat (limited to 'drivers/net/ethernet/ti/cpsw_new.c')
-rw-r--r-- | drivers/net/ethernet/ti/cpsw_new.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/ti/cpsw_new.c b/drivers/net/ethernet/ti/cpsw_new.c index 192394fe4c1c..ff3a96b084ee 100644 --- a/drivers/net/ethernet/ti/cpsw_new.c +++ b/drivers/net/ethernet/ti/cpsw_new.c @@ -375,7 +375,7 @@ static void cpsw_rx_handler(void *token, int len, int status) skb->protocol = eth_type_trans(skb, ndev); /* mark skb for recycling */ - skb_mark_for_recycle(skb, page, pool); + skb_mark_for_recycle(skb); netif_receive_skb(skb); ndev->stats.rx_bytes += len; |