In file included from include/linux/container_of.h:5,
from include/linux/list.h:5,
from include/linux/timer.h:5,
from include/linux/netdevice.h:24,
from include/trace/events/xdp.h:8,
from include/linux/bpf_trace.h:5,
from include/net/libeth/xdp.h:7,
from drivers/net/ethernet/intel/libeth/tx.c:6:
include/net/libeth/xdp.h: In function 'libeth_xdp_prepare_buff':
pp_page_to_nmdesc(page)->pp->p.offset, len, true);include/net/libeth/xdp.h:1295:23: warning: passing argument 1 of 'page_pool_page_is_pp' discards 'const' qualifier from pointer target type [-Wdiscarded-qualifiers]
^~~~
include/linux/build_bug.h:30:63: note: in definition of macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
include/net/netmem.h:301:2: note: in expansion of macro 'DEBUG_NET_WARN_ON_ONCE'
DEBUG_NET_WARN_ON_ONCE(!page_pool_page_is_pp(p)); \
^~~~~~~~~~~~~~~~~~~~~~
include/net/libeth/xdp.h:1295:5: note: in expansion of macro 'pp_page_to_nmdesc'
pp_page_to_nmdesc(page)->pp->p.offset, len, true);
^~~~~~~~~~~~~~~~~
In file included from arch/arm/include/asm/cacheflush.h:10,
from include/linux/cacheflush.h:5,
from include/linux/highmem.h:8,
from include/linux/bvec.h:10,
from include/linux/skbuff.h:17,
from include/net/net_namespace.h:43,
from include/linux/netdevice.h:38,
from include/trace/events/xdp.h:8,
from include/linux/bpf_trace.h:5,
from include/net/libeth/xdp.h:7,
from drivers/net/ethernet/intel/libeth/tx.c:6:
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.
How should we resolve the issue? Changing page_pool_page_is_pp() to
macro and using _Generic again looks too much. Or should we? Any idea?