diff options
author | Parav Pandit <parav@mellanox.com> | 2018-05-02 06:18:59 -0400 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2018-05-03 15:45:18 -0400 |
commit | 9aa169213d1166d30ae357a44abbeae93459339d (patch) | |
tree | b35ccb9608e39c512f72dff462aec7dda4431c60 | |
parent | b03bcde962606d2ee59a4e9dd470db9ad53c5418 (diff) |
RDMA/cma: Do not query GID during QP state transition to RTR
When commit [1] was added, SGID was queried to derive the SMAC address.
Then, later on during a refactor [2], SMAC was no longer needed. However,
the now useless GID query remained. Then during additional code changes
later on, the GID query was being done in such a way that it caused iWARP
queries to start breaking. Remove the useless GID query and resolve the
iWARP breakage at the same time.
This is discussed in [3].
[1] commit dd5f03beb4f7 ("IB/core: Ethernet L2 attributes in verbs/cm structures")
[2] commit 5c266b2304fb ("IB/cm: Remove the usage of smac and vid of qp_attr and cm_av")
[3] https://www.spinics.net/lists/linux-rdma/msg63951.html
Suggested-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Parav Pandit <parav@mellanox.com>
Signed-off-by: Leon Romanovsky <leonro@mellanox.com>
Signed-off-by: Doug Ledford <dledford@redhat.com>
-rw-r--r-- | drivers/infiniband/core/cma.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c index 8364223422d0..a693fcd4c513 100644 --- a/drivers/infiniband/core/cma.c +++ b/drivers/infiniband/core/cma.c | |||
@@ -868,7 +868,6 @@ static int cma_modify_qp_rtr(struct rdma_id_private *id_priv, | |||
868 | { | 868 | { |
869 | struct ib_qp_attr qp_attr; | 869 | struct ib_qp_attr qp_attr; |
870 | int qp_attr_mask, ret; | 870 | int qp_attr_mask, ret; |
871 | union ib_gid sgid; | ||
872 | 871 | ||
873 | mutex_lock(&id_priv->qp_mutex); | 872 | mutex_lock(&id_priv->qp_mutex); |
874 | if (!id_priv->id.qp) { | 873 | if (!id_priv->id.qp) { |
@@ -891,12 +890,6 @@ static int cma_modify_qp_rtr(struct rdma_id_private *id_priv, | |||
891 | if (ret) | 890 | if (ret) |
892 | goto out; | 891 | goto out; |
893 | 892 | ||
894 | ret = ib_query_gid(id_priv->id.device, id_priv->id.port_num, | ||
895 | rdma_ah_read_grh(&qp_attr.ah_attr)->sgid_index, | ||
896 | &sgid, NULL); | ||
897 | if (ret) | ||
898 | goto out; | ||
899 | |||
900 | BUG_ON(id_priv->cma_dev->device != id_priv->id.device); | 893 | BUG_ON(id_priv->cma_dev->device != id_priv->id.device); |
901 | 894 | ||
902 | if (conn_param) | 895 | if (conn_param) |