net/mlx5e: XDP, Let XDP checker function get the params as input
authorTariq Toukan <tariqt@nvidia.com>
Mon, 17 Apr 2023 12:18:56 +0000 (15:18 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 19 Apr 2023 07:59:26 +0000 (08:59 +0100)
commitabd3f84ecab3ab90161c9ba49052ac4ca33a0ed3
tree933b069d59007e9413096f64d9d1ee9c7c839cac
parent7fc06dd2ae7b42fc5093f76878b77c74006b4fd5
net/mlx5e: XDP, Let XDP checker function get the params as input

Change mlx5e_xdp_allowed() so it gets the params structure with the
xdp_prog applied, rather than creating a local copy based on the current
params in priv.

This reduces the amount of memory on the stack, and acts on the exact
params instance that's about to be applied.

Reviewed-by: Saeed Mahameed <saeedm@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlx5/core/en_main.c