[ofa-general] [PATCHv2 RESEND] IB/IPoIB: Don't let a bad muticast address in the join list stop subsequent joins

Moni Shoua monis at Voltaire.COM
Wed Sep 2 08:43:07 PDT 2009


Roland Dreier wrote:
>  > Illegal multicast address can be handed for IPoIB from userspace. For example
>  > the command ip maddr add 33:33:00:00:00:01 dev ib0 injects an illegal muticast
>  > address to IPoIB that will start a join task for this address. However, whenever
>  > an illegal multicast address is passed to IPoIB it stops all subsequent
>  > requests from join attempts. That happens because IPoIB joins to multicast
>  > addresses in the order they arrived and doesn't handle the next address until the 
>  > current address join finishes with success. 
>  > 
>  > This patch moves the multicast address to the end of the list after a join attempt.
>  > Even if the join fails the next attempt will be with a different address.
>  > 
>  > Signed-off-by: Moni Shoua <monis at voltaire.com>
> 
> Was a consensus ever reached on this patch?
Not yet. I got a comment from Jason which I intend to refer to soon.
> 
>  > -	if (test_bit(IPOIB_MCAST_RUN, &priv->flags))
>  > -		queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
>  > -				   mcast->backoff * HZ);
>  > +	if (test_bit(IPOIB_MCAST_RUN, &priv->flags)) {
>  > +		list_for_each_entry(next_mcast, &priv->multicast_list, list) {
>  > +			if (!test_bit(IPOIB_MCAST_FLAG_SENDONLY, &next_mcast->flags)
>  > +			    && !test_bit(IPOIB_MCAST_FLAG_BUSY, &next_mcast->flags)
>  > +			    && !test_bit(IPOIB_MCAST_FLAG_ATTACHED, &next_mcast->flags))
>  > +				break;
>  > +		}
>  > +		if (&next_mcast->list != &priv->multicast_list)
>  > +			queue_delayed_work(ipoib_workqueue, &priv->mcast_task,
>  > +				next_mcast->backoff * HZ);
>  > +	}
> 
> I have to admit this duplicated loop doesn't look that attractive to
> me... maybe factor it out into a helper or something?
I'll take this comment to into the next version of the patch. thanks
> 
>  - R.
> _______________________________________________
> general mailing list
> general at lists.openfabrics.org
> http://lists.openfabrics.org/cgi-bin/mailman/listinfo/general
> 
> To unsubscribe, please visit http://openib.org/mailman/listinfo/openib-general
> 




More information about the general mailing list