net/mlx5: Eswitch, enable RoCE loopback traffic
authorMaor Gottlieb <maorg@mellanox.com>
Mon, 29 Apr 2019 18:14:16 +0000 (18:14 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Mon, 29 Apr 2019 23:55:32 +0000 (16:55 -0700)
commit80f09dfc237f181e92968a72d97b7a4202baa453
tree73b695aa819dab88e035c8f22b23d4e6b8ca24a7
parentf6f7d6b5bd818cc84eebb55ba6bcba38cfd3b385
net/mlx5: Eswitch, enable RoCE loopback traffic

When in switchdev mode, we would like to treat loopback RoCE
traffic (on eswitch manager) as RDMA and not as regular
Ethernet traffic
In order to enable it we add flow steering rule that forward RoCE
loopback traffic to the HW RoCE filter (by adding allow rule).
In addition we add RoCE address in GID index 0, which will be
set in the RoCE loopback packet.

Signed-off-by: Maor Gottlieb <maorg@mellanox.com>
Reviewed-by: Mark Bloch <markb@mellanox.com>
Acked-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/net/ethernet/mellanox/mlx5/core/Makefile
drivers/net/ethernet/mellanox/mlx5/core/eswitch_offloads.c
drivers/net/ethernet/mellanox/mlx5/core/rdma.c [new file with mode: 0644]
drivers/net/ethernet/mellanox/mlx5/core/rdma.h [new file with mode: 0644]
include/linux/mlx5/driver.h