[openib-general] [PATCH 1/5] ib_addr: retrieve MGID from device address

Sean Hefty sean.hefty at intel.com
Fri Jun 9 14:40:45 PDT 2006


Extract the MGID used by ipoib for broadcast traffic from the device
address.

Signed-off-by: Sean Hefty <sean.hefty at intel.com>
---
This will be used to get the MCMemberRecord for the ipoib broadcast group.

--- svn3/gen2/trunk/src/linux-kernel/infiniband/include/rdma/ib_addr.h	2006-05-25 11:18:47.000000000 -0700
+++ svn/gen2/trunk/src/linux-kernel/infiniband/include/rdma/ib_addr.h	2006-06-06 16:14:11.000000000 -0700
@@ -89,6 +89,11 @@ static inline void ib_addr_set_pkey(stru
 	dev_addr->broadcast[9] = (unsigned char) pkey;
 }
 
+static inline union ib_gid *ib_addr_get_mgid(struct rdma_dev_addr *dev_addr)
+{
+	return 	(union ib_gid *) (dev_addr->broadcast + 4);
+}
+
 static inline union ib_gid *ib_addr_get_sgid(struct rdma_dev_addr *dev_addr)
 {
 	return 	(union ib_gid *) (dev_addr->src_dev_addr + 4);





More information about the general mailing list