aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/mellanox/mlxsw/trap.h
diff options
context:
space:
mode:
authorYotam Gigi <yotamg@mellanox.com>2017-01-23 11:07:11 +0100
committerDavid S. Miller <davem@davemloft.net>2017-01-24 13:44:28 -0500
commit98d0f7b9acda0cf15259f83ca1758ad6017c0942 (patch)
treee6a1795a19f0932aaec4e74d4d06731a8ba3f6ee /drivers/net/ethernet/mellanox/mlxsw/trap.h
parentmlxsw: reg: add the Monitoring Packet Sampling Configuration Register (diff)
downloadlinux-dev-98d0f7b9acda0cf15259f83ca1758ad6017c0942.tar.xz
linux-dev-98d0f7b9acda0cf15259f83ca1758ad6017c0942.zip
mlxsw: spectrum: Add packet sample offloading support
Using the MPSC register, add the functions that configure port-based packet sampling in hardware and the necessary datatypes in the mlxsw_sp_port struct. In addition, add the necessary trap for sampled packets and integrate with matchall offloading to allow offloading of the sample tc action. The current offload support is for the tc command: tc filter add dev <DEV> parent ffff: \ matchall skip_sw \ action sample rate <RATE> group <GROUP> [trunc <SIZE>] Where only ingress qdiscs are supported, and only a combination of matchall classifier and sample action will lead to activating hardware packet sampling. Signed-off-by: Yotam Gigi <yotamg@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Reviewed-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/trap.h')
-rw-r--r--drivers/net/ethernet/mellanox/mlxsw/trap.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/trap.h b/drivers/net/ethernet/mellanox/mlxsw/trap.h
index 7ab275deacac..02ea48b15eb5 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/trap.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/trap.h
@@ -54,6 +54,7 @@ enum {
MLXSW_TRAP_ID_IGMP_V2_REPORT = 0x32,
MLXSW_TRAP_ID_IGMP_V2_LEAVE = 0x33,
MLXSW_TRAP_ID_IGMP_V3_REPORT = 0x34,
+ MLXSW_TRAP_ID_PKT_SAMPLE = 0x38,
MLXSW_TRAP_ID_ARPBC = 0x50,
MLXSW_TRAP_ID_ARPUC = 0x51,
MLXSW_TRAP_ID_MTUERROR = 0x52,