[openib-general] Re: [RFC] [PATCH 2/2 v2] ipoib: convert to use new multicast interface

Sean Hefty mshefty at ichips.intel.com
Tue Apr 11 13:07:44 PDT 2006


Michael S. Tsirkin wrote:
>>>void ipoib_mcast_join_task(void *dev_ptr)
>>>@@ -553,7 +539,8 @@ void ipoib_mcast_join_task(void *dev_ptr
>>>		spin_unlock_irq(&priv->lock);
>>>	}
>>>
>>>-	if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
>>>+	if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags) &&
>>>+	    !test_bit(IPOIB_MCAST_FLAG_BUSY, &priv->broadcast->flags)) {
>>>		ipoib_mcast_join(dev, priv->broadcast, 0);
>>>		return;
>>>	}
>>
>>The change above needs to be:
>>
>>	if (!test_bit(IPOIB_MCAST_FLAG_ATTACHED, &priv->broadcast->flags)) {
>>		if (!test_bit(IPOIB_MCAST_FLAG_BUSY, 
>>		&priv->broadcast->flags))
>>			ipoib_mcast_join(dev, priv->broadcast, 0);
>>  		return;
>>  	}
>>
>>Or additional join requests will start before we've finished joining the 
>>broadcast group.
>>
>>- Sean
> 
> 
> Hmm, but this seems like 2.6.17 material.
> It should have the same effect with or without multicast group patch. Right?

I'm not sure if the code has the same effect with or without the rest of the 
multicast changes.  In theory, it seems like adding this change would work, but 
I don't know that it's necessary.  The original code keyed entirely off of the 
ATTACHED flag.

I added a check for the BUSY flag to prevent issuing multiple join requests for 
the broadcast group, which is necessary for proper interaction with 
ib_multicast, since every join request must be followed by a call to free.

- Sean



More information about the general mailing list