Re: include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct idpf_xdp_rx_desc) == sizeof(struct virtchnl2_rx_flex_desc_adv_nic_3)"
From: Alexander Lobakin
Date: Fri Apr 10 2026 - 09:26:23 EST
From: Kernel Test Robot <lkp@xxxxxxxxx>
Date: Fri, 10 Apr 2026 19:24:55 +0800
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 9a9c8ce300cd3859cc87b408ef552cd697cc2ab7
> commit: 88ca0c738c4159ce87893782b6dd964b5aa01f6e idpf: add XDP RSS hash hint
> date: 7 months ago
> config: arm-randconfig-001-20260410 (https://download.01.org/0day-ci/archive/20260410/202604101931.fN8gVxZI-lkp@xxxxxxxxx/config)
> compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260410/202604101931.fN8gVxZI-lkp@xxxxxxxxx/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
> | Fixes: 88ca0c738c41 ("idpf: add XDP RSS hash hint")
> | Reported-by: kernel test robot <lkp@xxxxxxxxx>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202604101931.fN8gVxZI-lkp@xxxxxxxxx/
>
> All errors (new ones prefixed by >>):
>
> In file included from include/linux/minmax.h:5,
> from include/linux/jiffies.h:8,
> from include/net/pkt_sched.h:5,
> from drivers/net/ethernet/intel/idpf/idpf.h:12,
> from drivers/net/ethernet/intel/idpf/idpf_txrx.c:4:
>>> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct idpf_xdp_rx_desc) == sizeof(struct virtchnl2_rx_flex_desc_adv_nic_3)"
> #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
BTW this might be a real issue. The size of idpf_xdp_rx_desc is always
the same as in the HW specs of idpf (it's just 4 u64s == 32 bytes).
If this assertion fails, this means that the size of
virtchnl2_rx_flex_desc_adv_nic_3 could be incorrect on this setup.
I remember that on ARM32, the compiler sometimes aligns small fields
(u16 etc.) weirdly. If that's the case, we might need to mark
virtchnl2_rx_flex_desc_adv_nic_3 as
`__packed __aligned(something_that_works)`.
+ adding Kees, this is triggered on GCC, not Clang/LLVM, but maybe he
remembers ARM32 alignment issues better than me (if you have time and
don't mind, of course ;)).
> ^~~~~~~~~~~~~~
> include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
> #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
> ^~~~~~~~~~~~~~~
> drivers/net/ethernet/intel/idpf/xdp.h:118:1: note: in expansion of macro 'static_assert'
> static_assert(sizeof(struct idpf_xdp_rx_desc) ==
> ^~~~~~~~~~~~~
> --
> In file included from include/linux/minmax.h:5,
> from include/linux/jiffies.h:8,
> from include/net/pkt_sched.h:5,
> from idpf.h:12,
> from idpf_txrx.c:4:
>>> include/linux/build_bug.h:78:41: error: static assertion failed: "sizeof(struct idpf_xdp_rx_desc) == sizeof(struct virtchnl2_rx_flex_desc_adv_nic_3)"
> #define __static_assert(expr, msg, ...) _Static_assert(expr, msg)
> ^~~~~~~~~~~~~~
> include/linux/build_bug.h:77:34: note: in expansion of macro '__static_assert'
> #define static_assert(expr, ...) __static_assert(expr, ##__VA_ARGS__, #expr)
> ^~~~~~~~~~~~~~~
> xdp.h:118:1: note: in expansion of macro 'static_assert'
> static_assert(sizeof(struct idpf_xdp_rx_desc) ==
Thanks,
Olek