From: Dotan Barak <[email protected]>

CMA multicast joins done under the ipoib port state must be carried
out using the same component mask used by ipoib. Otherwise, its possible
for the CMA to create a group to which a join made by ipoib will fail,
or vise-versa. So far this wasn't the case, since some of the component
mask fields set by ipoib weren't set by the CMA, fix that.

Signed-off-by: Dotan Barak <[email protected]>
Reviewed-by: Jack Morgenstein <[email protected]>
Acked-by: Sean Hefty <[email protected]>
Signed-off-by: Or Gerlitz <[email protected]>
---

changes from V0:
 - removed setting of the multicast record fields, since they are kept
   in the ib sa client data base, only deal with the component mask fields.


 drivers/infiniband/core/cma.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/infiniband/core/cma.c b/drivers/infiniband/core/cma.c
index 7172559..af3565c 100644
--- a/drivers/infiniband/core/cma.c
+++ b/drivers/infiniband/core/cma.c
@@ -3056,9 +3056,12 @@ static int cma_join_ib_multicast(struct rdma_id_private 
*id_priv,
                    IB_SA_MCMEMBER_REC_FLOW_LABEL |
                    IB_SA_MCMEMBER_REC_TRAFFIC_CLASS;
 
-       if (id_priv->id.ps == RDMA_PS_IPOIB)
+       if (id_priv->id.ps == RDMA_PS_IPOIB)
                comp_mask |= IB_SA_MCMEMBER_REC_RATE |
-                            IB_SA_MCMEMBER_REC_RATE_SELECTOR;
+                            IB_SA_MCMEMBER_REC_RATE_SELECTOR |
+                            IB_SA_MCMEMBER_REC_MTU_SELECTOR |
+                            IB_SA_MCMEMBER_REC_MTU |
+                            IB_SA_MCMEMBER_REC_HOP_LIMIT;
 
        mc->multicast.ib = ib_sa_join_multicast(&sa_client, id_priv->id.device,
                                                id_priv->id.port_num, &rec,
-- 
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to