[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <202507160103.dqVvaCEE-lkp@intel.com>
Date: Wed, 16 Jul 2025 01:36:40 +0800
From: kernel test robot <lkp@...el.com>
To: Mohsin Bashir <mohsin.bashr@...il.com>, netdev@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, kuba@...nel.org, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
shuah@...nel.org, horms@...nel.org, cratiu@...dia.com,
noren@...dia.com, cjubran@...dia.com, mbloch@...dia.com,
mohsin.bashr@...il.com, jdamato@...tly.com, gal@...dia.com,
sdf@...ichev.me, ast@...nel.org, daniel@...earbox.net,
hawk@...nel.org, john.fastabend@...il.com, nathan@...nel.org,
nick.desaulniers+lkml@...il.com, morbo@...gle.com,
justinstitt@...gle.com, bpf@...r.kernel.org,
linux-kselftest@...r.kernel.org
Subject: Re: [PATCH net-next V4 1/5] net: netdevsim: hook in XDP handling
Hi Mohsin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on net-next/main]
url: https://github.com/intel-lab-lkp/linux/commits/Mohsin-Bashir/net-netdevsim-hook-in-XDP-handling/20250715-050721
base: net-next/main
patch link: https://lore.kernel.org/r/20250714210352.1115230-2-mohsin.bashr%40gmail.com
patch subject: [PATCH net-next V4 1/5] net: netdevsim: hook in XDP handling
config: m68k-randconfig-r121-20250715 (https://download.01.org/0day-ci/archive/20250716/202507160103.dqVvaCEE-lkp@intel.com/config)
compiler: m68k-linux-gcc (GCC) 8.5.0
reproduce: (https://download.01.org/0day-ci/archive/20250716/202507160103.dqVvaCEE-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 <lkp@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202507160103.dqVvaCEE-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> drivers/net/netdevsim/netdev.c:342:20: sparse: sparse: incompatible types in comparison expression (different address spaces):
drivers/net/netdevsim/netdev.c:342:20: sparse: struct bpf_prog [noderef] __rcu *
drivers/net/netdevsim/netdev.c:342:20: sparse: struct bpf_prog *
vim +342 drivers/net/netdevsim/netdev.c
331
332 static int nsim_rcv(struct nsim_rq *rq, int budget)
333 {
334 struct net_device *dev = rq->napi.dev;
335 struct bpf_prog *xdp_prog;
336 struct netdevsim *ns;
337 struct sk_buff *skb;
338 unsigned int skblen;
339 int i, ret;
340
341 ns = netdev_priv(dev);
> 342 xdp_prog = rcu_dereference(ns->xdp.prog);
343
344 for (i = 0; i < budget; i++) {
345 if (skb_queue_empty(&rq->skb_queue))
346 break;
347
348 skb = skb_dequeue(&rq->skb_queue);
349
350 if (xdp_prog) {
351 /* skb might be freed directly by XDP, save the len */
352 skblen = skb->len;
353
354 ret = do_xdp_generic(xdp_prog, &skb);
355 if (ret != XDP_PASS) {
356 dev_dstats_rx_add(dev, skblen);
357 continue;
358 }
359 }
360
361 /* skb might be discard at netif_receive_skb, save the len */
362 skblen = skb->len;
363 skb_mark_napi_id(skb, &rq->napi);
364 ret = netif_receive_skb(skb);
365 if (ret == NET_RX_SUCCESS)
366 dev_dstats_rx_add(dev, skblen);
367 else
368 dev_dstats_rx_dropped(dev);
369 }
370
371 return i;
372 }
373
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
Powered by blists - more mailing lists