[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <lumrrt47kax45kmx37jw4w652f6biunsfnlkkthxsebbcfpso6@tuyiykihlisc>
Date: Fri, 20 Jun 2025 13:33:36 +0000
From: Dragos Tatulea <dtatulea@...dia.com>
To: Arnd Bergmann <arnd@...nel.org>, Saeed Mahameed <saeedm@...dia.com>,
Leon Romanovsky <leon@...nel.org>, Tariq Toukan <tariqt@...dia.com>,
Andrew Lunn <andrew+netdev@...n.ch>, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Eli Cohen <elic@...dia.com>, Shay Drory <shayd@...dia.com>,
Jacob Keller <jacob.e.keller@...el.com>, moshe@...dia.com
Cc: Arnd Bergmann <arnd@...db.de>, Erez Shitrit <erezsh@...dia.com>,
Cosmin Ratiu <cratiu@...dia.com>, Yevgeny Kliteynik <kliteyn@...dia.com>, netdev@...r.kernel.org,
linux-rdma@...r.kernel.org, linux-kernel@...r.kernel.org, mbloch@...dia.com
Subject: Re: [PATCH] [RFC] net/mlx5: don't build with CONFIG_CPUMASK_OFFSTACK
On Fri, Jun 20, 2025 at 01:10:04PM +0200, Arnd Bergmann wrote:
> From: Arnd Bergmann <arnd@...db.de>
>
> Local cpumask_t variables must be wrapped with alloc_cpumask_var() or
> similar helpers, to allow building with ridiculous values of CONFIG_NR_CPUS:
>
> drivers/net/ethernet/mellanox/mlx5/core/eq.c: In function ‘comp_irq_request_sf’:
> drivers/net/ethernet/mellanox/mlx5/core/eq.c:897:1: error: the frame size of 8560 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
> drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c: In function ‘mlx5_ctrl_irq_request’:
> drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:494:1: error: the frame size of 8544 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
> drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c: In function ‘mlx5_irq_request_vector’:
> drivers/net/ethernet/mellanox/mlx5/core/pci_irq.c:561:1: error: the frame size of 8560 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
> drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c: In function ‘irq_pool_request_irq’:
> drivers/net/ethernet/mellanox/mlx5/core/irq_affinity.c:74:1: error: the frame size of 8544 bytes is larger than 1536 bytes [-Werror=frame-larger-than=]
>
> The mlx5 driver used to do this correctly in the past, but was changed
> to use local 'irq_affinity_desc' structures in at least four places,
> which ends up having the mask on the stack again.
>
> It is not easily possible to use alloc_cpumask_var() again without
> reverting that patch, so work around this by disallowing this drivers
> on kernels that rely on CONFIG_CPUMASK_OFFSTACK.
>
> Fixes: bbac70c74183 ("net/mlx5: Use newer affinity descriptor")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> ---
> This is probably not a great idea since most enterprise distros do
> enable both CPUMASK_OFFSTACK and MLX5, and any ideas for how to sort
> this out better would be helpful.
>
> I mainly tried setting CONFIG_NR_CPUS to an unrealistic value for my
> own compile testing, to see which files run into this problem. I have
> managed to come up with better fixes for the other three I found, but
> not this one.
> ---
> drivers/net/ethernet/mellanox/mlx5/core/Kconfig | 1 +
> 1 file changed, 1 insertion(+)
>
Thanks for the catch! We will look into this and provide a proper patch.
Thanks,
Dragos
Powered by blists - more mailing lists