OpenCloudOS-Kernel/include/linux/mlx5
Arnd Bergmann 5233794b17 net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create
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: 10caabdaad ("net/mlx5e: Use termination table for VLAN push actions")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Acked-by: Saeed Mahameed <saeedm@mellanox.com>
Acked-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
2019-06-28 16:03:59 -07:00
..
accel.h net/mlx5: IPSec, Add support for ESN 2018-03-07 15:54:36 -08:00
cmd.h
cq.h net/mlx5: Remove spinlock support from mlx5_write64 2019-04-02 12:49:37 -07:00
device.h net/mlx5: Issue SW reset on FW assert 2019-06-13 13:23:18 -07:00
doorbell.h net/mlx5: Remove spinlock support from mlx5_write64 2019-04-02 12:49:37 -07:00
driver.h Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2019-06-28 16:03:54 -07:00
eq.h net/mlx5: Add EQ enable/disable API 2019-06-13 10:59:49 -07:00
eswitch.h Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux 2019-06-28 16:03:54 -07:00
fs.h net/mlx5e: reduce stack usage in mlx5_eswitch_termtbl_create 2019-06-28 16:03:59 -07:00
fs_helpers.h {net,IB}/mlx5: Add ipsec helper 2018-04-04 12:06:27 -06:00
mlx5_ifc.h net/mlx5: Introduce vport metadata matching bits and enum constants 2019-06-26 12:01:28 -07:00
mlx5_ifc_fpga.h net/mlx5: Accel, add TLS rx offload routines 2018-07-16 00:13:11 -07:00
port.h net/mlx5e: ethtool, Add support for EEPROM high pages query 2019-05-01 14:39:16 -07:00
qp.h net/mlx5: Convert mkey_table to XArray 2019-06-24 16:44:40 -07:00
transobj.h net/mlx5: Introduce new TIR creation core API 2019-04-24 12:33:37 -07:00
vport.h net/mlx5: Remove unused mlx5_query_nic_vport_vlans 2019-05-01 14:39:16 -07:00