aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorByungchul Park <byungchul@sk.com>2025-07-21 11:18:27 +0900
committerJakub Kicinski <kuba@kernel.org>2025-07-23 17:46:54 -0700
commit6fd824342a57164d97717325763daee1ef01cbcd (patch)
treed68442c2cea24cb0b20714e7cbd2c11dbe4f67b1
parentnetmem, mlx4: access ->pp_ref_count through netmem_desc instead of page (diff)
downloadwireguard-linux-6fd824342a57164d97717325763daee1ef01cbcd.tar.xz
wireguard-linux-6fd824342a57164d97717325763daee1ef01cbcd.zip
netdevsim: access ->pp through netmem_desc instead of page
To eliminate the use of struct page in page pool, the page pool users should use netmem descriptor and APIs instead. Make netdevsim access ->pp through netmem_desc instead of page. Signed-off-by: Byungchul Park <byungchul@sk.com> Link: https://patch.msgid.link/20250721021835.63939-5-byungchul@sk.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
-rw-r--r--drivers/net/netdevsim/netdev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index a7628f5c09af..39fe28af48b9 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -917,7 +917,8 @@ nsim_pp_hold_write(struct file *file, const char __user *data,
if (!ns->page)
ret = -ENOMEM;
} else {
- page_pool_put_full_page(ns->page->pp, ns->page, false);
+ page_pool_put_full_page(pp_page_to_nmdesc(ns->page)->pp,
+ ns->page, false);
ns->page = NULL;
}
@@ -1145,7 +1146,8 @@ void nsim_destroy(struct netdevsim *ns)
/* Put this intentionally late to exercise the orphaning path */
if (ns->page) {
- page_pool_put_full_page(ns->page->pp, ns->page, false);
+ page_pool_put_full_page(pp_page_to_nmdesc(ns->page)->pp,
+ ns->page, false);
ns->page = NULL;
}