page_pool: keep pp info as long as page pool owns the page
authorYunsheng Lin <linyunsheng@huawei.com>
Fri, 6 Aug 2021 02:46:19 +0000 (10:46 +0800)
committerJakub Kicinski <kuba@kernel.org>
Mon, 9 Aug 2021 22:49:00 +0000 (15:49 -0700)
commit57f05bc2ab2443b89c2e2562c05053bcc7d30e8b
treecaed6888bdd92daed5f868c8c01be6281be067e0
parent2a2b6e3640c43a808dcb5226963e2cc0669294b1
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>
drivers/net/ethernet/marvell/mvneta.c
drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
drivers/net/ethernet/ti/cpsw.c
drivers/net/ethernet/ti/cpsw_new.c
include/linux/skbuff.h
include/net/page_pool.h
net/core/page_pool.c