[ofw] RE: Patch: [ipoib] Make sure that the dlid is zero ifitisnot in the list.

Tzachi Dar tzachid at mellanox.co.il
Wed Nov 12 08:54:46 PST 2008


After some more consulting with Fab, I have came to the following patch.

(please note that this patch is not a must and if there won't be another
rc this will go to the trunk only) .

Thanks
Tzachi

Index: ulp/ipoib/kernel/ipoib_endpoint.c
===================================================================
--- ulp/ipoib/kernel/ipoib_endpoint.c	(revision 1724)
+++ ulp/ipoib/kernel/ipoib_endpoint.c	(working copy)
@@ -183,7 +183,7 @@
 		return status;
 	}
 	p_endpt->h_mcast = p_mcast_rec->h_mcast;
-	p_endpt->dlid = p_mcast_rec->p_member_rec->mlid;
+	CL_ASSERT(p_endpt->dlid == 0);
 
 	IPOIB_EXIT( IPOIB_DBG_ENDPT );
 	return IB_SUCCESS;
Index: ulp/ipoib/kernel/ipoib_port.c
===================================================================
--- ulp/ipoib/kernel/ipoib_port.c	(revision 1747)
+++ ulp/ipoib/kernel/ipoib_port.c	(working copy)
@@ -5066,7 +5066,7 @@
 
 	/* Allocate the broadcast endpoint. */
 	p_endpt = ipoib_endpt_create( &p_mcast_rec->p_member_rec->mgid,
-		p_mcast_rec->p_member_rec->mlid, CL_HTON32(0x00FFFFFF)
);
+		0 , CL_HTON32(0x00FFFFFF) );
 	if( !p_endpt )
 	{
 		IPOIB_PRINT_EXIT( TRACE_LEVEL_ERROR, IPOIB_DBG_ERROR,
@@ -6064,7 +6064,6 @@
 	ib_api_status_t		status;
 	ipoib_port_t		*p_port;
 	cl_fmap_item_t		*p_item;
-	cl_map_item_t		*p_qitem;
 	ipoib_endpt_t		*p_endpt;
 
 	IPOIB_ENTER( IPOIB_DBG_MCAST );
@@ -6146,22 +6145,9 @@
 
 	/*
 	 * The endpoint is already in the GID and MAC maps.
-	 * Add it to the LID map if it has local scope.
+	 * mast endpoint are not used in the LID map.
 	 */
-	if( p_endpt->dlid )
-	{
-		while( p_port->endpt_rdr )
-			;
-    
-		p_qitem = cl_qmap_insert(
-			&p_port->endpt_mgr.lid_endpts, p_endpt->dlid,
&p_endpt->lid_item );
-		CL_ASSERT( p_qitem == &p_endpt->lid_item );
-		if (p_qitem != &p_endpt->lid_item) {
-			// Since we failed to insert into the list, make
sure it is not removed
-			p_endpt->dlid =0;
-		}
-		
-	}
+	CL_ASSERT(p_endpt->dlid == 0);
 	/* set flag that endpoint is use */
 	p_endpt->is_in_use = TRUE;
 	cl_obj_unlock( &p_port->obj );

> -----Original Message-----
> From: ofw-bounces at lists.openfabrics.org 
> [mailto:ofw-bounces at lists.openfabrics.org] On Behalf Of Tzachi Dar
> Sent: Tuesday, November 11, 2008 7:06 PM
> To: Fab Tillier; Sean Hefty; Alex Estrin; ofw at lists.openfabrics.org
> Subject: RE: [ofw] RE: Patch: [ipoib] Make sure that the dlid 
> is zero ifitisnot in the list.
> 
> Hi Fab,
> 
> I have tried creating a patch based on the suggestion you 
> have mentioned.
> 
> On line 186 of  ipoib_endpoint.c I have changed the code from 
> 
> p_endpt->dlid1 = p_mcast_rec->p_member_rec->mlid;
> 
> To CL_ASSERT(p_endpt->dlid1 == 0);
> 
> However this assert has happened as soon as I have loaded the driver.
> 
> This might be because of a broadcast call, or something else, 
> I'll debug it tomorrow.
> 
> Please also note that if the dlid is not zero, this means 
> that we will crash, since we will try to remove things from the lists.
> 
> Thanks
> Tzachi
> 
> > -----Original Message-----
> > From: Fab Tillier [mailto:ftillier at windows.microsoft.com]
> > Sent: Tuesday, November 11, 2008 1:56 AM
> > To: Sean Hefty; Tzachi Dar; Alex Estrin; ofw at lists.openfabrics.org
> > Subject: RE: [ofw] RE: Patch: [ipoib] Make sure that the 
> dlid is zero 
> > if itisnot in the list.
> > 
> > >> So multicast endpoints shouldn't need to be in the LID
> > map, though I
> > >> can't imagine a reason why that would be problematic
> > (unless multiple
> > >> groups map to the same LID - though is that even possible?)
> > >
> > > I think multiple multicast groups can map to the same MLID,
> > and this
> > > is needed to support IPv6.
> > 
> > Ok, then line 186 of ipoib_endpoint.c needs to go away, and lines 
> > 6084-6096 of ipoib_port.c probably do too (multicast 
> endpoints should 
> > never go in the LID map).
> > 
> > -Fab
> > 
> _______________________________________________
> ofw mailing list
> ofw at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/ofw
> 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ipoib_dlid.patch
Type: application/octet-stream
Size: 1885 bytes
Desc: ipoib_dlid.patch
URL: <http://lists.openfabrics.org/pipermail/ofw/attachments/20081112/add03b2d/attachment.obj>


More information about the ofw mailing list