[Top] [All Lists]

Re: Source Specific Query of MLDv2 [PATCH]

To: YOSHIFUJI Hideaki / 吉藤英明 <yoshfuji@xxxxxxxxxxxxxx>
Subject: Re: Source Specific Query of MLDv2 [PATCH]
From: David Stevens <dlstevens@xxxxxxxxxx>
Date: Tue, 10 Feb 2004 21:39:15 -0700
Cc: davem@xxxxxxxxxx, hibi665@xxxxxxx, netdev@xxxxxxxxxxx, "Hideaki YOSHIFUJI" <yoshfuji@xxxxxxxxxxxxxxxxxxxxxxxxx>, yoshfuji@xxxxxxxxxxxxxx
In-reply-to: <>
Sender: netdev-bounce@xxxxxxxxxxx

"Hideaki YOSHIFUJI" <yoshfuji@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote on 02/10/2004 07:02:34 PM:

> My point is, !(skb->dev->flags & IFF_PROMISC|IFF_ALLMULTI) is likely true.

Yes, "deliver" is set to the _expression_ that includes the check
"!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))" and it is likely
true, which is why the patch I sent has "if (likely(deliver)) {"
in it.

I don't understand what you're suggesting. If you aren't suggesting
that I remove the "deliver" variable (which is needed again when you
enable the "#if 0" part), then I think your suggestion is already
in the patch. Can you explain?

> And, let's concentrate on fixing the original bug:

I put these in to clean up the code, because Dave Miller
asked me to in the first patch. He was talking about removing
"deliver," which is needed in this revision because of your comments,
but "discard" is not. The stuff within the "#if 0" may need to be
rewritten (certainly needs to be tested), but I didn't want to
leave "discard" references, or code that is definitely incorrect.
So I modified the code within the "#if 0" to also remove the
unneeded "discard".
The host-only path doesn't need "discard" because it is
always the same as "!deliver", but the declaration should go
away or it'll result in a warning. It could be "#if 0" too, but
I didn't want to leave it as:
int discard = 1;
if(deliver) {

because "discard" is completely pointless without any multicast
routing code, and it's unnecessary when the "#if 0" is changed
the way I did.

In other words, removing "discard" is code-cleanup, and editing
within the "#if 0" is just so it won't leave an obvious bug when
it becomes not "#if 0".


<Prev in Thread] Current Thread [Next in Thread>