linux/drivers/net/ethernet/mellanox
Yotam Gigi 98d0f7b9ac 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>
2017-01-24 13:44:28 -05:00
..
mlx4 net/mlx4: use rb_entry() 2017-01-22 16:46:13 -05:00
mlx5/core net/mlx5e: Reorder update stats 2017-01-19 23:20:04 +02:00
mlxsw mlxsw: spectrum: Add packet sample offloading support 2017-01-24 13:44:28 -05:00
Kconfig mlxsw: Introduce Mellanox switch driver core 2015-07-30 00:04:59 -07:00
Makefile mlxsw: Introduce Mellanox switch driver core 2015-07-30 00:04:59 -07:00