diff options
| author | Byungchul Park <[email protected]> | 2025-07-21 02:18:27 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-24 00:46:54 +0000 |
| commit | 6fd824342a57164d97717325763daee1ef01cbcd (patch) | |
| tree | d68442c2cea24cb0b20714e7cbd2c11dbe4f67b1 /drivers/net/netdevsim/netdev.c | |
| parent | netmem, mlx4: access ->pp_ref_count through netmem_desc instead of page (diff) | |
| download | kernel-6fd824342a57164d97717325763daee1ef01cbcd.tar.gz kernel-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 <[email protected]>
Link: https://patch.msgid.link/[email protected]
Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/netdevsim/netdev.c')
| -rw-r--r-- | drivers/net/netdevsim/netdev.c | 6 |
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; } |
