From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02C61C83F34 for ; Fri, 18 Jul 2025 01:14:20 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 5C2A06B00B3; Thu, 17 Jul 2025 21:14:20 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id 59B336B00B7; Thu, 17 Jul 2025 21:14:20 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 4D7726B00B8; Thu, 17 Jul 2025 21:14:20 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0014.hostedemail.com [216.40.44.14]) by kanga.kvack.org (Postfix) with ESMTP id 40D676B00B3 for ; Thu, 17 Jul 2025 21:14:20 -0400 (EDT) Received: from smtpin13.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay08.hostedemail.com (Postfix) with ESMTP id 94C8614027B for ; Fri, 18 Jul 2025 01:14:19 +0000 (UTC) X-FDA: 83675614638.13.082250A Received: from invmail4.hynix.com (exvmail4.hynix.com [166.125.252.92]) by imf22.hostedemail.com (Postfix) with ESMTP id 02D34C0003 for ; Fri, 18 Jul 2025 01:14:16 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; spf=pass (imf22.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1752801258; a=rsa-sha256; cv=none; b=4Xkutj/W0VGPCGpcnJ8IKPdfaG31zJW7nVdqz0DYp6ISJ6KXdNY/Sc1kETTl0AuqGNMqzU BzH14F5wBkWd44zLae7Zq4py3rLX8H/tokbgX+UXVB9MJUF3WT5IJud4ijh2DEcVI1kpt+ hhoM4WN1At8zcderGhNXY2zyb7sJAPw= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=none; dmarc=none; spf=pass (imf22.hostedemail.com: domain of byungchul@sk.com designates 166.125.252.92 as permitted sender) smtp.mailfrom=byungchul@sk.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1752801258; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=7uEGxC/AhcDGKorXDmmK2g0LCXRuAMjgtx2P03izqjo=; b=CmBjtwVDrwuX4YeyfMu8AxYtBIdCyfuYIhyWLfsyMyeujS6R4+FF5jRGViv6sOx4bajYn+ lsJTGMmdRfBihX1fRXIFA311Tro1oBuredtMkipXZkOAjLI+8vqxBTXUw0lppIR12ymOja 7w4a7RMOrYI+0dXsZhDY3Kghqe1dwDw= X-AuditID: a67dfc5b-681ff7000002311f-84-68799fe50406 Date: Fri, 18 Jul 2025 10:14:07 +0900 From: Byungchul Park To: kernel test robot 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, asml.silence@gmail.com, 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 Message-ID: <20250718011407.GB38833@system.software.com> References: <20250717070052.6358-13-byungchul@sk.com> <202507180111.jygqJHzk-lkp@intel.com> <20250718004346.GA38833@system.software.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20250718004346.GA38833@system.software.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-Brightmail-Tracker: H4sIAAAAAAAAA02SW0iTcRjG+X9nh8Ovdfo3L4JpBEKWKfFPQiS6+C4swq7KC1v51VZuyqZr ywJFC5SU0pRmiyaKh2mJ8zTDQy7bNMPjkpWmU5zYwYmKpWnapkje/Xie533e9+JlcFEGKWbk yhRepZQmSigBIZjzLznmfqmTnbD3BiBDbQ2Fqle0qMJlIZHB1ATQUpedQob+LAIt1/7Bkds2 RaNq83k0UT5DoNysNRy1rXpoNNCUR6LmdBeNht8YKDRes0miGWsugb5nTlFoIi8a2YwHkLXK gaGu2mYMjWyuY6hgyEihoXdTBHqekQdQbbuTRAut3lVrK94Ou8PtNd6P09GHuXc/53Guoeoz xrUUf6U5ozmVq68M4Upbv2Gc2ZRNcebFfJobG2mluO5nawQ3W68HXItlCeNyMz0UV+exYNyC +wvBzbd/oi7uvSI4k8AnyjW86njUVYGsaHmWTu4L0xr7C7F0MBuUA/wYyEbArOkOaofNT4q2 mGCPwJnhh7SPKfYodDpXcR/v8+qWyXIsBwgYnO0k4XyXw2swzF5WC9cNGl9GyCK44uoFvoyI fQRgXUYrtW3sgT36acLHOBsCnRvfMN8szgbCig3GJ/uxp6HetbEV388GwbdN9q1dkNUz8Ivn L7l96CHYWekkHgO2eFdt8a7a4v+1RoCbgEiu1Cik8sSIUJlOKdeGXk9SmIH3Mcrvr8dZwOLA JStgGSDxF751a2UiUqpR6xRWABlcsk9YMKSRiYQJUt1dXpUUr0pN5NVWEMgQkoPCk7/uJIjY m9IU/jbPJ/OqHRdj/MTpwEhbYpXX+tKWY+PVjgMNUc44XePT4Ch7anR3QsfZtPumbP3vjiJb bADjedHWolgSVp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Nh4vf KxK0xYOwPCGlboa87Gmsqr8vIjRSSaIYV2skvwEOxxX/9QIAAA== X-CFilter-Loop: Reflected X-Rspamd-Queue-Id: 02D34C0003 X-Stat-Signature: hqkczzhbcpeex5qie7ju5q9gqirj3ed3 X-Rspam-User: X-Rspamd-Server: rspam08 X-HE-Tag: 1752801256-232762 X-HE-Meta: U2FsdGVkX18Cv84fGE51gTweL3FVsgPAwKNJoNOhqwEAp064eZWYIg2CP16eT2ZEDQ8RRuO1pytdRztr8Y0mxx/JZK7/slqJBQl0ivn+k+Vz8PA4kjqEuLALXd1VjoDjnrbYV1eEmGH9cFNnVcnGT+6flU4x/BQkUZ8TS2U0cufxZWD8rhMRCJ1banxEWznOUSzNQU+UjrCEdct2c6mU0ise+ppTJjm99P8FgECTkj5ZukwUvC+J5NQXxZA+YZz9b9Z/IyZL5HjT4Wz3BmESo2lz2YoUViCtsYKH1o0bAUlgP6AdsKEvEq3JYHI09gmkhGDLFdmu0cly8KaYN9pd/GqQl5UyRoJ1tb24nkrHLcK5uaRv0u3VBytczmTSESOQVPESEDzD6ZWuf+VaTc24NSa44b8KHjSGc1K7TduYiRgxgaNh9i/+aXEd5jUV6KuOE+GiJuXX9YkZVxrPfvM7YND3Vid89upb5NBTwNryzcYNaM3pl2yNPhM50YBoJeH++IfM88h9ZVeCix8CaomZnJTyiuE2aVDDGb/9JRs/6c8yn27MPZszHpkgBYoZN3/AAls3t3AycA+ZNci4WtK7Ww73oImdEtrh0MjVWHx5QWaSg+A3//mb9OxcyxMMjtiUy2V/mX2Pkrs+lTrGBIJFNhVtKettiHskjb/4oQg9j4AdiXq8ByAsEYfJvbY5auR0inGLCQTgddaT+Kn0+andbm0/KAyvhKd7sIxM6RtCOPgIhEJI/TTJFTufymOh/7ZRTSnqQnOxrWN3B5CdTiqmvWTHRahQVgLvI87hQ1XZv+WXpgY4cCtSFstXP+zwEF/vOUebVArGslU/FBFmJhrHViw5QzZQJT25AaU2pC0T5ymq3ULXcIFoubhWFmEaLbPWBW/uaamv5FR6Fza1vj1cndk4htMh11x9JCqdbohwsrlptH1No5/BaqjOgV8fonGwP5iBW/qWyTn+vZ8D9rn bvqeLOmm JAsYxIN0oqMH5X/xtdv4yqrRUDuyKiFCJOU+JG723HeXsW+n9wEFkK26Ig6e2QcBEEYla8USfbQtuMcGoibJo99/HKPapYiD3N9GLvPxxChwfJE0UDUtQaUdkU+JjMATzOqikIEKC+Vagj5NzJTnDLKmvqatryNQJwx8zv6kToqEuoqb+E0Ma2efcPJY9QV0m3XGK2K2YNkkdnXsfE2NUP2BcZMjkDIBcnT+L X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: On Fri, Jul 18, 2025 at 09:43:46AM +0900, Byungchul Park wrote: > On Fri, Jul 18, 2025 at 01:42:38AM +0800, kernel test robot wrote: > > Hi Byungchul, > > > > kernel test robot noticed the following build warnings: > > > > [auto build test WARNING on c65d34296b2252897e37835d6007bbd01b255742] > > > > url: https://github.com/intel-lab-lkp/linux/commits/Byungchul-Park/netmem-introduce-struct-netmem_desc-mirroring-struct-page/20250717-150253 > > base: c65d34296b2252897e37835d6007bbd01b255742 > > patch link: https://lore.kernel.org/r/20250717070052.6358-13-byungchul%40sk.com > > patch subject: [Intel-wired-lan] [PATCH net-next v11 12/12] libeth: xdp: access ->pp through netmem_desc instead of page > > config: arm-randconfig-r072-20250717 (https://download.01.org/0day-ci/archive/20250718/202507180111.jygqJHzk-lkp@intel.com/config) > > compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0 > > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250718/202507180111.jygqJHzk-lkp@intel.com/reproduce) > > > > If you fix the issue in a separate patch/commit (i.e. not just a new version of > > the same patch/commit), kindly add following tags > > | Reported-by: kernel test robot > > | Closes: https://lore.kernel.org/oe-kbuild-all/202507180111.jygqJHzk-lkp@intel.com/ > > > > All warnings (new ones prefixed by >>): > > > > 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. > > 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? option 1. Remove 'const' on declaration of struct page in libeth_xdp_prepare_buff() but maybe bad. option 2. Use __pp_page_to_nmdesc() instead of pp_page_to_nmdesc() in libeth_xdp_prepare_buff() to skip checking if it's a pp page. option 3. Change page_pool_page_is_pp() to macro and use _Generic to cover const casting. More? Byungchul > Byungchul > > > vim +1295 include/net/libeth/xdp.h > > > > 1263 > > 1264 bool libeth_xdp_buff_add_frag(struct libeth_xdp_buff *xdp, > > 1265 const struct libeth_fqe *fqe, > > 1266 u32 len); > > 1267 > > 1268 /** > > 1269 * libeth_xdp_prepare_buff - fill &libeth_xdp_buff with head FQE data > > 1270 * @xdp: XDP buffer to attach the head to > > 1271 * @fqe: FQE containing the head buffer > > 1272 * @len: buffer len passed from HW > > 1273 * > > 1274 * Internal, use libeth_xdp_process_buff() instead. Initializes XDP buffer > > 1275 * head with the Rx buffer data: data pointer, length, headroom, and > > 1276 * truesize/tailroom. Zeroes the flags. > > 1277 * Uses faster single u64 write instead of per-field access. > > 1278 */ > > 1279 static inline void libeth_xdp_prepare_buff(struct libeth_xdp_buff *xdp, > > 1280 const struct libeth_fqe *fqe, > > 1281 u32 len) > > 1282 { > > 1283 const struct page *page = __netmem_to_page(fqe->netmem); > > 1284 > > 1285 #ifdef __LIBETH_WORD_ACCESS > > 1286 static_assert(offsetofend(typeof(xdp->base), flags) - > > 1287 offsetof(typeof(xdp->base), frame_sz) == > > 1288 sizeof(u64)); > > 1289 > > 1290 *(u64 *)&xdp->base.frame_sz = fqe->truesize; > > 1291 #else > > 1292 xdp_init_buff(&xdp->base, fqe->truesize, xdp->base.rxq); > > 1293 #endif > > 1294 xdp_prepare_buff(&xdp->base, page_address(page) + fqe->offset, > > > 1295 pp_page_to_nmdesc(page)->pp->p.offset, len, true); > > 1296 } > > 1297 > > > > -- > > 0-DAY CI Kernel Test Service > > https://github.com/intel/lkp-tests/wiki