From: Pavel Begunkov <asml.silence@gmail.com>
To: Byungchul Park <byungchul@sk.com>, kernel test robot <lkp@intel.com>
Cc: willy@infradead.org, netdev@vger.kernel.org,
oe-kbuild-all@lists.linux.dev, linux-kernel@vger.kernel.org,
linux-mm@kvack.org, kernel_team@skhynix.com,
almasrymina@google.com, ilias.apalodimas@linaro.org,
harry.yoo@oracle.com, akpm@linux-foundation.org,
andrew+netdev@lunn.ch, toke@redhat.com, david@redhat.com,
Liam.Howlett@oracle.com, vbabka@suse.cz, rppt@kernel.org,
surenb@google.com, mhocko@suse.com, linux-rdma@vger.kernel.org,
bpf@vger.kernel.org, vishal.moola@gmail.com, hannes@cmpxchg.org,
ziy@nvidia.com, jackmanb@google.com, wei.fang@nxp.com,
shenwei.wang@nxp.com, xiaoning.wang@nxp.com, davem@davemloft.net,
edumazet@google.com, kuba@kernel.org
Subject: Re: [Intel-wired-lan] [PATCH net-next v11 12/12] libeth: xdp: access ->pp through netmem_desc instead of page
Date: Fri, 18 Jul 2025 10:18:41 +0100 [thread overview]
Message-ID: <35592824-6749-4fa4-89d9-2de9caccc695@gmail.com> (raw)
In-Reply-To: <20250718011407.GB38833@system.software.com>
On 7/18/25 02:14, Byungchul Park wrote:
...>>>
>>> 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':
>>>>> 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]
>>> pp_page_to_nmdesc(page)->pp->p.offset, len, true);
>>> ^~~~
>>> 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.
Probably not, and probably for wrong reasons. netmem_ref is define
as an integer, compilers cast away such const unlike const pointers.
>> 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?
page_pool_page_is_pp() doesn't change the page, just make the
argument const.
bool page_pool_page_is_pp(const struct page *page)
--
Pavel Begunkov
next prev parent reply other threads:[~2025-07-18 9:17 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-07-17 7:00 [PATCH net-next v11 00/12] Split netmem from struct page Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 01/12] netmem: introduce struct netmem_desc mirroring " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 02/12] netmem: use netmem_desc instead of page to access ->pp in __netmem_get_pp() Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 03/12] netmem, mlx4: access ->pp_ref_count through netmem_desc instead of page Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 04/12] netdevsim: access ->pp " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 05/12] mt76: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 06/12] net: fec: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 07/12] octeontx2-pf: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 08/12] iavf: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 09/12] idpf: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 10/12] mlx5: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 11/12] net: ti: icssg-prueth: " Byungchul Park
2025-07-17 7:00 ` [PATCH net-next v11 12/12] libeth: xdp: " Byungchul Park
2025-07-17 17:42 ` [Intel-wired-lan] " kernel test robot
2025-07-18 0:43 ` Byungchul Park
2025-07-18 1:14 ` Byungchul Park
2025-07-18 9:18 ` Pavel Begunkov [this message]
2025-07-18 9:32 ` Pavel Begunkov
2025-07-21 1:03 ` Byungchul Park
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=35592824-6749-4fa4-89d9-2de9caccc695@gmail.com \
--to=asml.silence@gmail.com \
--cc=Liam.Howlett@oracle.com \
--cc=akpm@linux-foundation.org \
--cc=almasrymina@google.com \
--cc=andrew+netdev@lunn.ch \
--cc=bpf@vger.kernel.org \
--cc=byungchul@sk.com \
--cc=davem@davemloft.net \
--cc=david@redhat.com \
--cc=edumazet@google.com \
--cc=hannes@cmpxchg.org \
--cc=harry.yoo@oracle.com \
--cc=ilias.apalodimas@linaro.org \
--cc=jackmanb@google.com \
--cc=kernel_team@skhynix.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=linux-rdma@vger.kernel.org \
--cc=lkp@intel.com \
--cc=mhocko@suse.com \
--cc=netdev@vger.kernel.org \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=rppt@kernel.org \
--cc=shenwei.wang@nxp.com \
--cc=surenb@google.com \
--cc=toke@redhat.com \
--cc=vbabka@suse.cz \
--cc=vishal.moola@gmail.com \
--cc=wei.fang@nxp.com \
--cc=willy@infradead.org \
--cc=xiaoning.wang@nxp.com \
--cc=ziy@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).