]> asedeno.scripts.mit.edu Git - linux.git/commit
net/mlx5: Refactor ingress acl configuration
authorParav Pandit <parav@mellanox.com>
Mon, 28 Oct 2019 23:35:26 +0000 (23:35 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 1 Nov 2019 21:40:27 +0000 (14:40 -0700)
commit10652f39943ec19d32a6fa44a8523b0d40abcbcf
treeddb768c3877b4bf4b8f1f09678180ede943a043e
parenta962d7a61e2404cda6a89bfa5cc193c62223bb5e
net/mlx5: Refactor ingress acl configuration

Drop, untagged, spoof check and untagged spoof check flow groups are
limited to legacy mode only.

Therefore, following refactoring is done to
(a) improve code readability
(b) have better code split between legacy and offloads mode

1. Move legacy flow groups under legacy structure
2. Add validity check for group deletion
3. Restrict scope of esw_vport_disable_ingress_acl to legacy mode
4. Rename esw_vport_enable_ingress_acl() to
esw_vport_create_ingress_acl_table() and limit its scope to
table creation
5. Introduce legacy flow groups creation helper
esw_legacy_create_ingress_acl_groups() and keep its scope to legacy mode
6. Reduce offloads ingress groups from 4 to just 1 metadata group
per vport
7. Removed redundant IS_ERR_OR_NULL as entries are marked NULL on free.
8. Shortern error message to remove redundant 'E-switch'

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