From 6a4d00be08334f15502f2fbec08eabbdddc2e64a Mon Sep 17 00:00:00 2001 From: Mark Bloch Date: Thu, 28 Mar 2019 15:27:37 +0200 Subject: RDMA/mlx5: Move rep into port struct In preparation of moving into a model of single IB device multiple ports move rep to be part of the port structure. We mark a representor device by setting is_rep, no functional change with this patch. Signed-off-by: Mark Bloch Signed-off-by: Leon Romanovsky Signed-off-by: Jason Gunthorpe --- drivers/infiniband/hw/mlx5/ib_rep.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/infiniband/hw/mlx5/ib_rep.c') diff --git a/drivers/infiniband/hw/mlx5/ib_rep.c b/drivers/infiniband/hw/mlx5/ib_rep.c index 14ac728b460c..64256dc1d1de 100644 --- a/drivers/infiniband/hw/mlx5/ib_rep.c +++ b/drivers/infiniband/hw/mlx5/ib_rep.c @@ -69,7 +69,8 @@ mlx5_ib_vport_rep_load(struct mlx5_core_dev *dev, struct mlx5_eswitch_rep *rep) return -ENOMEM; } - ibdev->rep = rep; + ibdev->is_rep = true; + ibdev->port[0].rep = rep; ibdev->mdev = dev; ibdev->num_ports = num_ports; @@ -151,12 +152,12 @@ int create_flow_rule_vport_sq(struct mlx5_ib_dev *dev, struct mlx5_flow_handle *flow_rule; struct mlx5_eswitch *esw = dev->mdev->priv.eswitch; - if (!dev->rep) + if (!dev->is_rep) return 0; flow_rule = mlx5_eswitch_add_send_to_vport_rule(esw, - dev->rep->vport, + dev->port[0].rep->vport, sq->base.mqp.qpn); if (IS_ERR(flow_rule)) return PTR_ERR(flow_rule); -- cgit