]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: Simplify traps creation
authorIdo Schimmel <idosch@mellanox.com>
Thu, 15 Oct 2015 15:43:27 +0000 (17:43 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 16 Oct 2015 06:27:55 +0000 (23:27 -0700)
commitc5634341036e4f2169050b071c0ecc90020ace87
tree8e62a8779a3b5e8868745b8c9f82071a7d076628
parentf6d227736fd9f95b9babc6cd7517186e1c0a6386
mlxsw: Simplify traps creation

The Host Trap Group Table (HTGT) register configures trap groups, which
are populated with trap IDs using the Host PacKet Trap (HPKT) register.
However, a trap ID can only be present inside one trap group (the last
configured).

Instead of passing both the trap group and ID for the function that
packs HPKT, pass only the trap ID and derive from it the trap group.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/core.c
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/switchx2.c