public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Tony Nguyen <anthony.l.nguyen@intel.com>, Kees Cook <kees@kernel.org>
Cc: <oe-kbuild-all@lists.linux.dev>, <linux-kernel@vger.kernel.org>,
	"kernel test robot" <lkp@intel.com>
Subject: 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)"
Date: Fri, 10 Apr 2026 15:24:19 +0200	[thread overview]
Message-ID: <cefe3913-960d-47a1-aa80-084c6aea09e5@intel.com> (raw)
In-Reply-To: <202604101931.fN8gVxZI-lkp@intel.com>

From: Kernel Test Robot <lkp@intel.com>
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@intel.com/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@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
> | Fixes: 88ca0c738c41 ("idpf: add XDP RSS hash hint")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202604101931.fN8gVxZI-lkp@intel.com/
> 
> 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

      reply	other threads:[~2026-04-10 13:26 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-10 11:24 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)" kernel test robot
2026-04-10 13:24 ` Alexander Lobakin [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cefe3913-960d-47a1-aa80-084c6aea09e5@intel.com \
    --to=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=kees@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox