# \[PATCH for-next V1\] RDMA/cma: Fix multicast joins of the IPoIB port space to be consistent

- From: Or Gerlitz \<hidden\>
- Date: 2012-08-30 09:09:55 
- List: linux-rdma
- Page: https://ratatoskr.run/linux-rdma/2012/08/15419082
- Thread: https://ratatoskr.run/linux-rdma/2012/08/15419082/t.md

```text
From: Dotan Barak <redacted>

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 <redacted>
Reviewed-by: Jack Morgenstein <redacted>
Acked-by: Sean Hefty <redacted>
Signed-off-by: Or Gerlitz <redacted>
---

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 majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
```
