summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorIdo Schimmel <idosch@mellanox.com>2019-08-21 10:19:32 +0300
committerDavid S. Miller <davem@davemloft.net>2019-08-21 12:58:39 -0700
commit6a44bae3b2b9b03c03712c0460f674efaf684131 (patch)
treeea60054111ea3988d56970308717e762a2596a8e /drivers
parentb7bf027087cb81b4673515ea8a0e3850ab2f9055 (diff)
downloadlinux-6a44bae3b2b9b03c03712c0460f674efaf684131.tar.bz2
mlxsw: reg: Add new trap actions
Subsequent patches will add discard traps support in mlxsw. The driver cannot configure such traps with a normal trap action, but needs to use exception trap action, which also increments an error counter. On the other hand, when these traps are initialized or set to drop action, they should use the default drop action set by the firmware. This guarantees that when the feature is disabled we get the exact same behavior as before the feature was introduced. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/reg.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/reg.h b/drivers/net/ethernet/mellanox/mlxsw/reg.h
index ead36702549a..59e296562b5a 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/reg.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/reg.h
@@ -5559,6 +5559,8 @@ enum mlxsw_reg_hpkt_action {
MLXSW_REG_HPKT_ACTION_DISCARD,
MLXSW_REG_HPKT_ACTION_SOFT_DISCARD,
MLXSW_REG_HPKT_ACTION_TRAP_AND_SOFT_DISCARD,
+ MLXSW_REG_HPKT_ACTION_TRAP_EXCEPTION_TO_CPU,
+ MLXSW_REG_HPKT_ACTION_SET_FW_DEFAULT = 15,
};
/* reg_hpkt_action
@@ -5569,6 +5571,8 @@ enum mlxsw_reg_hpkt_action {
* 3 - Discard.
* 4 - Soft discard (allow other traps to act on the packet).
* 5 - Trap and soft discard (allow other traps to overwrite this trap).
+ * 6 - Trap to CPU (CPU receives sole copy) and count it as error.
+ * 15 - Restore the firmware's default action.
* Access: RW
*
* Note: Must be set to 0 (forward) for event trap IDs, as they are already