Skip to content

Commit

Permalink
net/mlx5: E-Switch, Reduce ingress acl modify metadata stack usage
Browse files Browse the repository at this point in the history
Fix the following compiler warning:
In function ‘esw_vport_add_ingress_acl_modify_metadata’:
the frame size of 1084 bytes is larger than 1024 bytes [-Wframe-larger-than=]

Since the structure is never written to, we can statically allocate
it to avoid the stack usage.

Fixes: 7445cfb ("net/mlx5: E-Switch, Tag packet with vport number in VF vports and uplink ingress ACLs")
Signed-off-by: Saeed Mahameed <[email protected]>
Reviewed-by: Jianbo Liu <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
Saeed Mahameed authored and davem330 committed Jul 11, 2019
1 parent 2f1f5a7 commit 9446d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
Original file line number Diff line number Diff line change
Expand Up @@ -1785,8 +1785,8 @@ static int esw_vport_add_ingress_acl_modify_metadata(struct mlx5_eswitch *esw,
struct mlx5_vport *vport)
{
u8 action[MLX5_UN_SZ_BYTES(set_action_in_add_action_in_auto)] = {};
static const struct mlx5_flow_spec spec = {};
struct mlx5_flow_act flow_act = {};
struct mlx5_flow_spec spec = {};
int err = 0;

MLX5_SET(set_action_in, action, action_type, MLX5_ACTION_TYPE_SET);
Expand Down

0 comments on commit 9446d17

Please sign in to comment.