Re: [Intel-wired-lan] [PATCH net-next v11 12/12] libeth: xdp: access ->pp through netmem_desc instead of page

From: Pavel Begunkov
Date: Fri Jul 18 2025 - 05:34:23 EST


On 7/18/25 10:18, Pavel Begunkov wrote:
On 7/18/25 02:14, Byungchul Park wrote:
...>>>>     include/linux/mm.h:4176:54: note: expected 'struct page *' but argument is of type 'const struct page *'
     static inline bool page_pool_page_is_pp(struct page *page)
                                             ~~~~~~~~~~~~~^~~~

Oh.  page_pool_page_is_pp() in the mainline code already has this issue
that the helper cannot take const struct page * as argument.

Probably not, and probably for wrong reasons. netmem_ref is define
as an integer, compilers cast away such const unlike const pointers.

Taking a look libeth, at least at the reported spot it does
page->pp->p.offset, that should be fine. And your problem
is caused by the is_pp check in pp_page_to_nmdesc().

--
Pavel Begunkov