IB/mlx5: Unify e-switch representors load approach between uplink and VFs
authorMark Bloch <markb@mellanox.com>
Thu, 13 Dec 2018 03:11:37 +0000 (19:11 -0800)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 14 Dec 2018 17:58:57 +0000 (09:58 -0800)
commit06cc74af05c33091a9877b54f1821966b446003c
tree836a7c610ed0cb91ad905426af6d57d2e47eda3d
parent4c8b85187c22ee65637035efd2ae0cb10836d8e8
IB/mlx5: Unify e-switch representors load approach between uplink and VFs

When in switchdev mode and the add function is called by the core
level driver, make sure we only register the callbacks, but don't
create the mlx5 IB device or initialize anything. With this change
all the IB devices in switchdev mode are created only once the load
callback is invoked by the e-switch core sub-module. This follows
the design paradigm under which the all the Eth representors must
be loaded before any of IB reprs is loaded.

Signed-off-by: Mark Bloch <markb@mellanox.com>
Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Reviewed-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
drivers/infiniband/hw/mlx5/ib_rep.c
drivers/infiniband/hw/mlx5/main.c
drivers/infiniband/hw/mlx5/mlx5_ib.h