[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <6eae69d099b2818f03e661e489f87b3adb94bf17.camel@mellanox.com>
Date: Tue, 18 Jun 2019 20:05:56 +0000
From: Saeed Mahameed <saeedm@...lanox.com>
To: "arnd@...db.de" <arnd@...db.de>,
"leon@...nel.org" <leon@...nel.org>
CC: "linux-rdma@...r.kernel.org" <linux-rdma@...r.kernel.org>,
Or Gerlitz <ogerlitz@...lanox.com>,
Oz Shlomo <ozsh@...lanox.com>,
Paul Blakey <paulb@...lanox.com>,
Mark Bloch <markb@...lanox.com>,
Maor Gottlieb <maorg@...lanox.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"davem@...emloft.net" <davem@...emloft.net>,
Eli Britstein <elibr@...lanox.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>
Subject: Re: [PATCH] [v2] net/mlx5e: reduce stack usage in
mlx5_eswitch_termtbl_create
On Tue, 2019-06-18 at 13:15 +0200, Arnd Bergmann wrote:
> Putting an empty 'mlx5_flow_spec' structure on the stack is a bit
> wasteful and causes a warning on 32-bit architectures when building
> with clang -fsanitize-coverage:
>
> drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c:
> In function 'mlx5_eswitch_termtbl_create':
> drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads_termtbl.c:90
> :1: error: the frame size of 1032 bytes is larger than 1024 bytes [-
> Werror=frame-larger-than=]
>
> Since the structure is never written to, we can statically allocate
> it to avoid the stack usage. To be on the safe side, mark all
> subsequent function arguments that we pass it into as 'const'
> as well.
>
> Fixes: 10caabdaad5a ("net/mlx5e: Use termination table for VLAN push
> actions")
> Signed-off-by: Arnd Bergmann <arnd@...db.de>
> Acked-by: Saeed Mahameed <saeedm@...lanox.com>
> Acked-by: Mark Bloch <markb@...lanox.com>
Applied to net-next-mlx5 and will be submitted to net-next soon.
Thanks,
Saeed.
Powered by blists - more mailing lists