[ofw] [Patch][IPoIB_NDIS6_CM] Subnet Prefix dynamic setting
Alex Naslednikov
xalex at mellanox.co.il
Wed Dec 22 02:06:45 PST 2010
Applied at 3033
-----Original Message-----
From: Alex Naslednikov
Sent: Wednesday, December 01, 2010 12:35 PM
To: ofw at lists.openfabrics.org
Subject: [ofw][Patch][IPoIB_NDIS6_CM] Subnet Prefix dynamic setting
SUBNET_PREFIX is set by subnet manager and is subject to change.
Latest OFED (Linux) distribution has other than IB_DEFAULT_SUBNET_PREFIX prefix So, this value should be set dynamically
Signed-off by: Alexander Naslednikov (xalex at mellanox.co.il)
Index: ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp
===================================================================
--- ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp (revision 3007)
+++ ulp/ipoib_NDIS6_CM/kernel/ipoib_port.cpp (working copy)
@@ -7399,6 +7399,7 @@
{
ib_api_status_t status;
ib_mcast_req_t mcast_req;
+ ib_ca_attr_t * p_ca_attrs;
IPOIB_ENTER( IPOIB_DBG_INIT );
@@ -7423,8 +7424,21 @@
cl_memclr( &mcast_req, sizeof(mcast_req) );
/* Copy the results of the Get to use as parameters. */
mcast_req.member_rec = *p_member_rec;
+
/* We specify our port GID for the join operation. */
- mcast_req.member_rec.port_gid.unicast.prefix = IB_DEFAULT_SUBNET_PREFIX;
+ status =__port_query_ca_attrs( p_port, &p_ca_attrs);
+ if ( status == IB_SUCCESS )
+ {
+ mcast_req.member_rec.port_gid.unicast.prefix =
+ p_ca_attrs->p_port_attr->p_gid_table[0].unicast.prefix;
+ cl_free ( p_ca_attrs );
+ }
+ else
+ {
+ ASSERT ( status != IB_SUCCESS );
+ mcast_req.member_rec.port_gid.unicast.prefix = IB_DEFAULT_SUBNET_PREFIX;
+ }
+
mcast_req.member_rec.port_gid.unicast.interface_id =
p_port->p_adapter->guids.port_guid.guid;
More information about the ofw
mailing list