[ofw] [Patch][IPoIB_NDIS6_CM] Subnet Prefix dynamic setting
Alex Naslednikov
xalex at mellanox.co.il
Wed Dec 1 02:34:58 PST 2010
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;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: subnet_prefix_ofw.patch
Type: application/octet-stream
Size: 1187 bytes
Desc: subnet_prefix_ofw.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20101201/07bc4b96/attachment.obj>
More information about the ofw
mailing list