From: Ido Schimmel <ido...@mellanox.com> This patch set does not include any functional changes. It merely reworks the internal storage of traps, trap groups and trap policers in mlxsw to each use a single array.
These changes allow us to get rid of the multiple arrays we currently have for traps, which make the trap data easier to validate and extend with more per-trap information in the future. It will also allow us to more easily add per-ASIC traps in future submissions. Last two patches include minor changes to devlink-trap selftests. Tested with existing devlink-trap selftests. Ido Schimmel (6): mlxsw: spectrum_trap: Move struct definition out of header file mlxsw: spectrum_trap: Store all trap policer data in one array mlxsw: spectrum_trap: Store all trap group data in one array mlxsw: spectrum_trap: Store all trap data in one array selftests: devlink_lib: Remove double blank line selftests: mlxsw: Do not hard code trap group name .../ethernet/mellanox/mlxsw/spectrum_trap.c | 763 ++++++++++++------ .../ethernet/mellanox/mlxsw/spectrum_trap.h | 16 +- .../net/mlxsw/devlink_trap_acl_drops.sh | 4 +- .../net/mlxsw/devlink_trap_l2_drops.sh | 33 +- .../net/mlxsw/devlink_trap_l3_drops.sh | 35 +- .../net/mlxsw/devlink_trap_l3_exceptions.sh | 20 +- .../net/mlxsw/devlink_trap_tunnel_ipip.sh | 6 +- .../net/mlxsw/devlink_trap_tunnel_vxlan.sh | 9 +- .../selftests/net/forwarding/devlink_lib.sh | 9 +- 9 files changed, 572 insertions(+), 323 deletions(-) -- 2.26.2