IB/mlx5: Add proper representors support
authorMark Bloch <markb@mellanox.com>
Tue, 23 Jan 2018 11:16:30 +0000 (11:16 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 23 Feb 2018 20:36:39 +0000 (12:36 -0800)
commitb5ca15ad7e6189f39dff73d786e41d2a507f7b8b
tree4d270e35e0efd102ccbbfe4573770c33f9b47347
parentb96c9dde17359520d6a5a8eb6d56d91f22c5a413
IB/mlx5: Add proper representors support

This commit adds full support for IB representor:

1) Representors profile, We add two new profiles:
   nic_rep_profile - This profile will be used to create an IB device that
   represents the PF/UPLINK.
   rep_profile - This profile will be used to create an IB device that
   represents VFs. Each VF will be its own representor.
2) Proper load/unload callbacks, Those are called by the E-Switch when
   moving to/from switchdev mode.
3) Different flow DB handling for when we in switchdev mode.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/ib_rep.h
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h