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-h... 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@i...) compiler: m68k-linux-gcc (GCC) 8.5.0 reproduce: (https://download.01.org/0day-ci/archive/20250716/202507160103.dqVvaCEE-lkp@i...)
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@intel.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