IB/mlx4: Don't update QP1 in native mode
authorJack Morgenstein <jackm@dev.mellanox.co.il>
Thu, 11 Sep 2014 11:11:18 +0000 (14:11 +0300)
committerRoland Dreier <roland@purestorage.com>
Mon, 22 Sep 2014 16:46:53 +0000 (09:46 -0700)
For native functions (non-SR-IOV), there's no reason to update
the smac_index, as QP1 is a GSI QP.

Signed-off-by: Jack Morgenstein <jackm@dev.mellanox.co.il>
Signed-off-by: Or Gerlitz <ogerlitz@mellanox.com>
Signed-off-by: Roland Dreier <roland@purestorage.com>
drivers/infiniband/hw/mlx4/main.c

index 657ce0f810fd9e412b7c3c4358346384207f5cb7..6ad7f7a0e4646b663e7554ff800ee94391ccb924 100644 (file)
@@ -1645,6 +1645,10 @@ static void mlx4_ib_update_qps(struct mlx4_ib_dev *ibdev,
 
        atomic64_set(&ibdev->iboe.mac[port - 1], new_smac);
 
+       /* no need for update QP1 and mac registration in non-SRIOV */
+       if (!mlx4_is_mfunc(ibdev->dev))
+               return;
+
        mutex_lock(&ibdev->qp1_proxy_lock[port - 1]);
        qp = ibdev->qp1_proxy[port - 1];
        if (qp) {