forked from luck/tmp_suning_uos_patched
mlxsw: spectrum_trap: Move layer 3 exceptions to exceptions trap group
The layer 3 exceptions are still subject to the same trap policer, so nothing changes, but user space can choose to assign a different one. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
678eb199cc
commit
1e292f5c11
|
@ -5552,6 +5552,7 @@ enum mlxsw_reg_htgt_trap_group {
|
|||
MLXSW_REG_HTGT_TRAP_GROUP_SP_DUMMY,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_L2_DISCARDS,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_L3_DISCARDS,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_L3_EXCEPTIONS,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_TUNNEL_DISCARDS,
|
||||
MLXSW_REG_HTGT_TRAP_GROUP_SP_ACL_DISCARDS,
|
||||
|
||||
|
|
|
@ -212,6 +212,11 @@ static const struct mlxsw_sp_trap_group_item mlxsw_sp_trap_group_items_arr[] = {
|
|||
.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_L3_DISCARDS,
|
||||
.priority = 0,
|
||||
},
|
||||
{
|
||||
.group = DEVLINK_TRAP_GROUP_GENERIC(L3_EXCEPTIONS, 1),
|
||||
.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_L3_EXCEPTIONS,
|
||||
.priority = 2,
|
||||
},
|
||||
{
|
||||
.group = DEVLINK_TRAP_GROUP_GENERIC(TUNNEL_DROPS, 1),
|
||||
.hw_group_id = MLXSW_REG_HTGT_TRAP_GROUP_SP_TUNNEL_DISCARDS,
|
||||
|
@ -332,56 +337,59 @@ static const struct mlxsw_sp_trap_item mlxsw_sp_trap_items_arr[] = {
|
|||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(MTU_ERROR, L3_DROPS),
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(MTU_ERROR, L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(MTUERROR, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(MTUERROR, L3_EXCEPTIONS,
|
||||
TRAP_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(TTL_ERROR, L3_DROPS),
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(TTL_ERROR, L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(TTLERROR, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(TTLERROR, L3_EXCEPTIONS,
|
||||
TRAP_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(RPF, L3_DROPS),
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(RPF, L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(RPF, L3_DISCARDS, TRAP_TO_CPU),
|
||||
MLXSW_SP_RXL_EXCEPTION(RPF, L3_EXCEPTIONS, TRAP_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(REJECT_ROUTE, L3_DROPS),
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(REJECT_ROUTE, L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(RTR_INGRESS1, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(RTR_INGRESS1, L3_EXCEPTIONS,
|
||||
TRAP_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(UNRESOLVED_NEIGH, L3_DROPS),
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(UNRESOLVED_NEIGH,
|
||||
L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(HOST_MISS_IPV4, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(HOST_MISS_IPV4, L3_EXCEPTIONS,
|
||||
TRAP_TO_CPU),
|
||||
MLXSW_SP_RXL_EXCEPTION(HOST_MISS_IPV6, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(HOST_MISS_IPV6, L3_EXCEPTIONS,
|
||||
TRAP_TO_CPU),
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER3, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER3, L3_EXCEPTIONS,
|
||||
TRAP_EXCEPTION_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(IPV4_LPM_UNICAST_MISS,
|
||||
L3_DROPS),
|
||||
L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER_LPM4, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER_LPM4,
|
||||
L3_EXCEPTIONS,
|
||||
TRAP_EXCEPTION_TO_CPU),
|
||||
},
|
||||
},
|
||||
{
|
||||
.trap = MLXSW_SP_TRAP_EXCEPTION(IPV6_LPM_UNICAST_MISS,
|
||||
L3_DROPS),
|
||||
L3_EXCEPTIONS),
|
||||
.listeners_arr = {
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER_LPM6, L3_DISCARDS,
|
||||
MLXSW_SP_RXL_EXCEPTION(DISCARD_ROUTER_LPM6,
|
||||
L3_EXCEPTIONS,
|
||||
TRAP_EXCEPTION_TO_CPU),
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue
Block a user