From: Alexander Lobakin <aleksander.lobakin@intel.com>
To: Arnd Bergmann <arnd@kernel.org>
Cc: Tony Nguyen <anthony.l.nguyen@intel.com>,
Przemek Kitszel <przemyslaw.kitszel@intel.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
"Jakub Kicinski" <kuba@kernel.org>,
Paolo Abeni <pabeni@redhat.com>, Arnd Bergmann <arnd@arndb.de>,
Aleksandr Loktionov <aleksandr.loktionov@intel.com>,
"Simon Horman" <horms@kernel.org>,
<intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>
Subject: Re: [Intel-wired-lan] [PATCH] ethernet: intel: fix building with large NR_CPUS
Date: Fri, 20 Jun 2025 15:46:49 +0200 [thread overview]
Message-ID: <b1a1979a-424a-4590-9f44-236d4f9a2f58@intel.com> (raw)
In-Reply-To: <20250620111141.3365031-1-arnd@kernel.org>
From: Arnd Bergmann <arnd@kernel.org>
Date: Fri, 20 Jun 2025 13:11:17 +0200
> From: Arnd Bergmann <arnd@arndb.de>
>
> 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>
> ---
> drivers/net/ethernet/intel/fm10k/fm10k.h | 2 +-
> drivers/net/ethernet/intel/i40e/i40e.h | 2 +-
> drivers/net/ethernet/intel/ixgbe/ixgbe.h | 2 +-
> 3 files changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/ethernet/intel/fm10k/fm10k.h b/drivers/net/ethernet/intel/fm10k/fm10k.h
> index 6119a4108838..757a6fd81b7b 100644
> --- a/drivers/net/ethernet/intel/fm10k/fm10k.h
> +++ b/drivers/net/ethernet/intel/fm10k/fm10k.h
> @@ -187,6 +187,7 @@ struct fm10k_q_vector {
> u32 __iomem *itr; /* pointer to ITR register for this vector */
> u16 v_idx; /* index of q_vector within interface array */
> struct fm10k_ring_container rx, tx;
> + struct rcu_head rcu; /* to avoid race with update stats on free */
>
> struct napi_struct napi;
I'd place it *after* ::napi as the latter is hot and better to still be
near rx/tx etc.
Same for the rest of the drivers.
Thanks,
Olek
prev parent reply other threads:[~2025-06-20 13:46 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-20 11:11 [PATCH] ethernet: intel: fix building with large NR_CPUS Arnd Bergmann
2025-06-20 11:14 ` Loktionov, Aleksandr
2025-06-20 13:46 ` 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=b1a1979a-424a-4590-9f44-236d4f9a2f58@intel.com \
--to=aleksander.lobakin@intel.com \
--cc=aleksandr.loktionov@intel.com \
--cc=andrew+netdev@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=arnd@arndb.de \
--cc=arnd@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=przemyslaw.kitszel@intel.com \
/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;
as well as URLs for NNTP newsgroup(s).