Re: [PATCH net v9 2/2] virtio-net: correct hdr_len handling for tunnel gso
From: kernel test robot <hidden>
Date: 2026-03-12 14:29:40
Also in:
oe-kbuild-all, virtualization
Hi Xuan, kernel test robot noticed the following build warnings: [auto build test WARNING on net/main] url: https://github.com/intel-lab-lkp/linux/commits/Xuan-Zhuo/virtio-net-correct-hdr_len-handling-for-VIRTIO_NET_F_GUEST_HDRLEN/20260311-200042 base: net/main patch link: https://lore.kernel.org/r/20260311115414.31243-3-xuanzhuo%40linux.alibaba.com patch subject: [PATCH net v9 2/2] virtio-net: correct hdr_len handling for tunnel gso config: i386-randconfig-061-20260312 (https://download.01.org/0day-ci/archive/20260312/202603122214.8Anoxrmq-lkp@intel.com/config) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 sparse: v0.6.5-rc1 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260312/202603122214.8Anoxrmq-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 [off-list ref] | Closes: https://lore.kernel.org/oe-kbuild-all/202603122214.8Anoxrmq-lkp@intel.com/ (local) sparse warnings: (new ones prefixed by >>) drivers/net/virtio_net.c: note: in included file:
quoted
include/linux/virtio_net.h:238:22: sparse: sparse: incorrect type in assignment (different base types) @@ expected restricted __virtio16 [usertype] hdr_len @@ got restricted __le16 [usertype] @@
include/linux/virtio_net.h:238:22: sparse: expected restricted __virtio16 [usertype] hdr_len
include/linux/virtio_net.h:238:22: sparse: got restricted __le16 [usertype]
vim +238 include/linux/virtio_net.h
225
226 static inline void virtio_net_set_tnl_hdrlen(const struct sk_buff *skb,
227 struct virtio_net_hdr *hdr)
228 {
229 u16 hdr_len;
230
231 hdr_len = skb_inner_transport_offset(skb);
232
233 if (hdr->gso_type == VIRTIO_NET_HDR_GSO_UDP_L4)
234 hdr_len += sizeof(struct udphdr);
235 else
236 hdr_len += inner_tcp_hdrlen(skb);
237
> 238 hdr->hdr_len = cpu_to_le16(hdr_len);
239 }
240
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki