net/mlx5: E-switch, Introduce flag to indicate if vport acl namespace is created
authorChris Mi <cmi@nvidia.com>
Thu, 10 Feb 2022 07:22:04 +0000 (09:22 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Sat, 2 Jul 2022 18:58:25 +0000 (11:58 -0700)
commitea5872dd6b052dc0dcb4974b314ffac739c535c4
treed8e4333c05bd999990d1753513291cf55ef00704
parent8e755f7a8cef6c3b64c5bdac2c8a3d6efb9f916c
net/mlx5: E-switch, Introduce flag to indicate if vport acl namespace is created

Eswitch vport acl namespace is needed when loading vfs. There is
no need to free and reallocate it when switching eswitch mode.
Introduce flag to indicate if it is created or not. When needed,
create it. Only free it when the driver is unloaded or in bare
metal mode.

Signed-off-by: Chris Mi <cmi@nvidia.com>
Reviewed-by: Mark Bloch <mbloch@nvidia.com>
Reviewed-by: Roi Dayan <roid@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/eswitch.h