OSDN Git Service

net/mlx5: E-Switch, Initialize eswitch acls ns when eswitch is enabled
authorParav Pandit <parav@nvidia.com>
Mon, 1 Mar 2021 12:12:13 +0000 (14:12 +0200)
committerSaeed Mahameed <saeedm@nvidia.com>
Wed, 14 Apr 2021 18:02:43 +0000 (11:02 -0700)
commit57b92bdd9e14f969de85d25cefc10abc3f73defd
treefc38e982601f9d86fa837336b8af0cd309e53132
parentb55b35382e51c84bcddc45bd87cf8fa16621452b
net/mlx5: E-Switch, Initialize eswitch acls ns when eswitch is enabled

Currently eswitch flow steering (FS) namespace of vport's ingress and
egress ACL are enabled when FS layer is initialized. This is done even
when eswitch is diabled. This demands that total eswitch ports to be
known to FS layer without eswitch in use.

Given the FS core is not dependent on eswitch, make namespace init and
cleanup routines as helper routines to be invoked only when eswitch is
needed.

With this change, ingress and egress ACL namespaces are created only
when eswitch legacy/offloads mode is enabled.

Signed-off-by: Parav Pandit <parav@nvidia.com>
Signed-off-by: Saeed Mahameed <saeedm@nvidia.com>
drivers/net/ethernet/mellanox/mlx5/core/eswitch.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.c
drivers/net/ethernet/mellanox/mlx5/core/fs_core.h