IB/mlx5: Listen to netdev register/unresiter events in switchdev mode
authorMark Bloch <markb@mellanox.com>
Tue, 16 Jan 2018 15:02:36 +0000 (15:02 +0000)
committerSaeed Mahameed <saeedm@mellanox.com>
Fri, 23 Feb 2018 20:36:39 +0000 (12:36 -0800)
commitbcf87f1dbbec0d9abaf89073dd761a41876bc6c1
tree104eb13580ced40e47e50277e4ed368804054794
parent018a94eec0efc04c678f694f903e621622fd0bcf
IB/mlx5: Listen to netdev register/unresiter events in switchdev mode

Currently we listen to netdev register/unregister event based on PCI
device. When in switchdev mode PF and representors share the same PCI
device, so in order to pair ib device and netdev in switchdev mode
compare the netdev that triggered the event to that of the representor.

Expose a function that lets you receive the netdev associated what
a given representor.

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