]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ethernet: intel: fix building with large NR_CPUS
authorArnd Bergmann <arnd@arndb.de>
Fri, 20 Jun 2025 17:31:24 +0000 (19:31 +0200)
committerTony Nguyen <anthony.l.nguyen@intel.com>
Tue, 15 Jul 2025 20:01:15 +0000 (13:01 -0700)
commit24171a5a4a952c26568ff0d2a0bc8c4708a95e1d
tree8ef427bf8f2f4e2ed9be6b64ed2b0e5be221fadb
parent0e9418961f897be59b1fab6e31ae1b09a0bae902
ethernet: intel: fix building with large NR_CPUS

With large values of CONFIG_NR_CPUS, three Intel ethernet drivers fail to
compile like:

In function ‘i40e_free_q_vector’,
    inlined from ‘i40e_vsi_alloc_q_vectors’ at drivers/net/ethernet/intel/i40e/i40e_main.c:12112:3:
  571 |         _compiletime_assert(condition, msg, __compiletime_assert_, __COUNTER__)
include/linux/rcupdate.h:1084:17: note: in expansion of macro ‘BUILD_BUG_ON’
 1084 |                 BUILD_BUG_ON(offsetof(typeof(*(ptr)), rhf) >= 4096);    \
drivers/net/ethernet/intel/i40e/i40e_main.c:5113:9: note: in expansion of macro ‘kfree_rcu’
 5113 |         kfree_rcu(q_vector, rcu);
      |         ^~~~~~~~~

The problem is that the 'rcu' member in 'q_vector' is too far from the start
of the structure. Move this member before the CPU mask instead, in all three
drivers.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: David S. Miller <davem@davemloft.net>
Reviewed-by: Aleksandr Loktionov <aleksandr.loktionov@intel.com>
Reviewed-by: Alexander Lobakin <aleksander.lobakin@intel.com>
Tested-by: Sunitha Mekala <sunithax.d.mekala@intel.com> (A Contingent worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
drivers/net/ethernet/intel/fm10k/fm10k.h
drivers/net/ethernet/intel/i40e/i40e.h
drivers/net/ethernet/intel/ixgbe/ixgbe.h