aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/infiniband/hw/mlx5/ib_rep.c
diff options
context:
space:
mode:
authorMark Bloch <markb@mellanox.com>2019-03-28 15:27:39 +0200
committerJason Gunthorpe <jgg@mellanox.com>2019-04-10 15:05:39 -0300
commit35b0aa67b29867cdeaee32f920da3cb300dbb851 (patch)
tree228e1aaa257cc77a25b2322dfe24c57b2ee28752 /drivers/infiniband/hw/mlx5/ib_rep.c
parentRDMA/mlx5: Move default representors SQ steering to rule to modify QP (diff)
downloadlinux-dev-35b0aa67b29867cdeaee32f920da3cb300dbb851.tar.xz
linux-dev-35b0aa67b29867cdeaee32f920da3cb300dbb851.zip
RDMA/mlx5: Refactor netdev affinity code
The design of representors is such that once an IB representor is created, the netdev of representor already exists, we can use that fact to simplify the netdev affinity code. Signed-off-by: Mark Bloch <markb@mellanox.com> Signed-off-by: Leon Romanovsky <leonro@mellanox.com> Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
Diffstat (limited to 'drivers/infiniband/hw/mlx5/ib_rep.c')
-rw-r--r--drivers/infiniband/hw/mlx5/ib_rep.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/infiniband/hw/mlx5/ib_rep.c b/drivers/infiniband/hw/mlx5/ib_rep.c
index d3988f6ae2ae..7946cf26421b 100644
--- a/drivers/infiniband/hw/mlx5/ib_rep.c
+++ b/drivers/infiniband/hw/mlx5/ib_rep.c
@@ -71,6 +71,8 @@ mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep)
ibdev->is_rep = true;
ibdev->port[0].rep = rep;
+ ibdev->port[0].roce.netdev =
+ mlx5_ib_get_rep_netdev(dev->priv.eswitch, rep->vport);
ibdev->mdev = dev;
ibdev->num_ports = num_ports;