mbox series

[net-next,0/6] mlxsw: Reorganize trap data

Message ID 20200516224310.877237-1-idosch@idosch.org
Headers show
Series mlxsw: Reorganize trap data | expand

Message

Ido Schimmel May 16, 2020, 10:43 p.m. UTC
From: Ido Schimmel <idosch@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(-)

Comments

David Miller May 16, 2020, 11:42 p.m. UTC | #1
From: Ido Schimmel <idosch@idosch.org>
Date: Sun, 17 May 2020 01:43:04 +0300

> From: Ido Schimmel <idosch@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.

Series applied, thanks.