[openib-general] [RFC/PATCH] rdma/cma: port rdma_cm multicast code to the UDP/IPOIB port space framework

Or Gerlitz ogerlitz at voltaire.com
Tue Jan 23 07:39:37 PST 2007


Allow rdma_cm/ipoib multicast inter operability for RDMA_PS_IPOIB IDs. This is implemented by
having the rdma cm use the --same-- qkey and multicast gid used by ipoib where for RDMA_UD_UDP
IDs the rdma cm uses a qkey of its own and adds a signature byte to the multicast gid.

Signed-off-by: Or Gerlitz <ogerlitz at voltaire.com>

Index: rdma-dev/drivers/infiniband/core/cma.c
===================================================================
--- rdma-dev.orig/drivers/infiniband/core/cma.c	2007-01-23 15:56:01.000000000 +0200
+++ rdma-dev/drivers/infiniband/core/cma.c	2007-01-23 15:56:23.000000000 +0200
@@ -2473,7 +2473,10 @@ static int cma_join_ib_multicast(struct
 		return ret;

 	ip_ib_mc_map(sin->sin_addr.s_addr, mc_map);
-	mc_map[7] = 0x01;			/* Use RDMA CM signature */
+	if (id_priv->id.ps == RDMA_PS_UDP) {
+		rec.qkey  = RDMA_UD_QKEY;	/* Use RDMA CM QKEY	 */
+		mc_map[7] = 0x01;		/* Use RDMA CM signature */
+	}
 	mc_map[8] = ib_addr_get_pkey(dev_addr) >> 8;
 	mc_map[9] = (unsigned char) ib_addr_get_pkey(dev_addr);






More information about the general mailing list