Hi Avinash, kernel test robot noticed the following build warnings:
[auto build test WARNING on a975094bf98ca97be9146f9d3b5681a6f9cf5ce3] url: https://github.com/intel-lab-lkp/linux/commits/Avinash-Duduskar/bpf-Add-BPF_FIB_LOOKUP_VLAN-flag-to-bpf_fib_lookup-helper/20260623-105336 base: a975094bf98ca97be9146f9d3b5681a6f9cf5ce3 patch link: https://lore.kernel.org/r/20260623025147.1001664-4-avinash.duduskar%40gmail.com patch subject: [PATCH bpf-next v4 3/3] selftests/bpf: Add bpf_fib_lookup() VLAN flag tests config: i386-buildonly-randconfig-006-20260623 (https://download.01.org/0day-ci/archive/20260623/[email protected]/config) compiler: clang version 22.1.3 (https://github.com/llvm/llvm-project e9846648fd6183ee6d8cbdb4502213fcf902a211) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260623/[email protected]/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 <[email protected]> | Closes: https://lore.kernel.org/oe-kbuild-all/[email protected]/ All warnings (new ones prefixed by >>): >> net/core/filter.c:6567:14: warning: unused variable 'net' [-Wunused-variable] 6567 | struct net *net = dev_net(skb->dev); | ^~~ 1 warning generated. vim +/net +6567 net/core/filter.c 87f5fc7e48dd31 David Ahern 2018-05-09 6563 87f5fc7e48dd31 David Ahern 2018-05-09 6564 BPF_CALL_4(bpf_skb_fib_lookup, struct sk_buff *, skb, 87f5fc7e48dd31 David Ahern 2018-05-09 6565 struct bpf_fib_lookup *, params, int, plen, u32, flags) 87f5fc7e48dd31 David Ahern 2018-05-09 6566 { 4f74fede40df8d David Ahern 2018-05-21 @6567 struct net *net = dev_net(skb->dev); f392520e15094e Avinash Duduskar 2026-06-23 6568 struct net_device *fwd_dev = NULL; 4c79579b44b187 David Ahern 2018-06-26 6569 int rc = -EAFNOSUPPORT; 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6570 bool check_mtu = false; 4f74fede40df8d David Ahern 2018-05-21 6571 87f5fc7e48dd31 David Ahern 2018-05-09 6572 if (plen < sizeof(*params)) 87f5fc7e48dd31 David Ahern 2018-05-09 6573 return -EINVAL; 87f5fc7e48dd31 David Ahern 2018-05-09 6574 31de4105f00d64 Martin KaFai Lau 2023-02-17 6575 if (flags & ~BPF_FIB_LOOKUP_MASK) 9ce64f192d161a David Ahern 2018-05-29 6576 return -EINVAL; 9ce64f192d161a David Ahern 2018-05-29 6577 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6578 if (params->tot_len) 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6579 check_mtu = true; 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6580 87f5fc7e48dd31 David Ahern 2018-05-09 6581 switch (params->family) { 87f5fc7e48dd31 David Ahern 2018-05-09 6582 #if IS_ENABLED(CONFIG_INET) 87f5fc7e48dd31 David Ahern 2018-05-09 6583 case AF_INET: f392520e15094e Avinash Duduskar 2026-06-23 6584 rc = bpf_ipv4_fib_lookup(net, params, flags, check_mtu, f392520e15094e Avinash Duduskar 2026-06-23 6585 &fwd_dev); 4f74fede40df8d David Ahern 2018-05-21 6586 break; 87f5fc7e48dd31 David Ahern 2018-05-09 6587 #endif 87f5fc7e48dd31 David Ahern 2018-05-09 6588 #if IS_ENABLED(CONFIG_IPV6) 87f5fc7e48dd31 David Ahern 2018-05-09 6589 case AF_INET6: f392520e15094e Avinash Duduskar 2026-06-23 6590 rc = bpf_ipv6_fib_lookup(net, params, flags, check_mtu, f392520e15094e Avinash Duduskar 2026-06-23 6591 &fwd_dev); 4f74fede40df8d David Ahern 2018-05-21 6592 break; 87f5fc7e48dd31 David Ahern 2018-05-09 6593 #endif 87f5fc7e48dd31 David Ahern 2018-05-09 6594 } 4f74fede40df8d David Ahern 2018-05-21 6595 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6596 if (rc == BPF_FIB_LKUP_RET_SUCCESS && !check_mtu) { f392520e15094e Avinash Duduskar 2026-06-23 6597 /* without tot_len, check the skb against the FIB-result f392520e15094e Avinash Duduskar 2026-06-23 6598 * device's MTU 2c0a10af688c02 Jesper Dangaard Brouer 2021-02-09 6599 */ f392520e15094e Avinash Duduskar 2026-06-23 6600 if (!is_skb_forwardable(fwd_dev, skb)) 4c79579b44b187 David Ahern 2018-06-26 6601 rc = BPF_FIB_LKUP_RET_FRAG_NEEDED; e1850ea9bd9eca Jesper Dangaard Brouer 2021-02-09 6602 f392520e15094e Avinash Duduskar 2026-06-23 6603 params->mtu_result = fwd_dev->mtu; /* union with tot_len */ 4f74fede40df8d David Ahern 2018-05-21 6604 } 4f74fede40df8d David Ahern 2018-05-21 6605 4c79579b44b187 David Ahern 2018-06-26 6606 return rc; 87f5fc7e48dd31 David Ahern 2018-05-09 6607 } 87f5fc7e48dd31 David Ahern 2018-05-09 6608 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki

