net/mlx5e: Add support for XDP_REDIRECT in device-out side
authorTariq Toukan <tariqt@mellanox.com>
Tue, 22 May 2018 13:48:48 +0000 (16:48 +0300)
committerSaeed Mahameed <saeedm@mellanox.com>
Thu, 26 Jul 2018 22:23:57 +0000 (15:23 -0700)
commit58b99ee3e3ebecfaccc5641a4014d92a818494a5
tree70fd5d0e18fb8ac82f294f50f0ac0d814fd5afaa
parentdac0d15fff6f825e93aafa6ba8bf24fd77ecb2ae
net/mlx5e: Add support for XDP_REDIRECT in device-out side

Add implementation for the ndo_xdp_xmit callback.

Dedicate a new set of XDP-SQ instances to satisfy the XDP_REDIRECT
requests.  These instances are totally separated from the existing
XDP-SQ objects that satisfy local XDP_TX actions.

Performance tests:

xdp_redirect_map from ConnectX-5 to ConnectX-5.
CPU: Intel(R) Xeon(R) CPU E5-2680 v3 @ 2.50GHz
Packet-rate of 64B packets.

Single queue: 7 Mpps.
Multi queue: 55 Mpps.

Signed-off-by: Tariq Toukan <tariqt@mellanox.com>
Signed-off-by: Eugenia Emantayev <eugenia@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/en.h
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.h
drivers/net/ethernet/mellanox/mlx5/core/en_main.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.c
drivers/net/ethernet/mellanox/mlx5/core/en_stats.h
drivers/net/ethernet/mellanox/mlx5/core/en_txrx.c