diff options
| author | Byungchul Park <[email protected]> | 2025-07-21 02:18:26 +0000 |
|---|---|---|
| committer | Jakub Kicinski <[email protected]> | 2025-07-24 00:46:54 +0000 |
| commit | 89ade7c7306508f46b811cd43960eaed88e0e1dd (patch) | |
| tree | 7fbbc2d65d83ab468de6c569cb9833c5dc44dc39 /drivers/net/netdevsim/netdev.c | |
| parent | netmem: use netmem_desc instead of page to access ->pp in __netmem_get_pp() (diff) | |
| download | kernel-89ade7c7306508f46b811cd43960eaed88e0e1dd.tar.gz kernel-89ade7c7306508f46b811cd43960eaed88e0e1dd.zip | |
netmem, mlx4: access ->pp_ref_count 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 mlx4 access ->pp_ref_count through netmem_desc instead of page.
While at it, add a helper, pp_page_to_nmdesc() and __pp_page_to_nmdesc(),
that can be used to get netmem_desc from page only if it's a pp page.
For now that netmem_desc overlays on page, it can be achieved by just
casting, and use macro and _Generic to cover const casting as well.
Plus, change page_pool_page_is_pp() to check for 'const struct page *'
instead of 'struct page *' since it doesn't modify data and additionally
covers const type.
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')
0 files changed, 0 insertions, 0 deletions
