In article
<OFA69E1A86.43DC582D-ON88256E37.0016A3A7-88256E37.00195210@xxxxxxxxxx> (at Tue,
10 Feb 2004 21:39:15 -0700), David Stevens <dlstevens@xxxxxxxxxx> says:
> "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?
David, they produce different assembly code.
If we say
deliver = likely(!(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI))) ||
ipv6_chk_mcast_addr(skb->dev, &skb->nh.ipv6h->daddr, NULL);
then we can run the next code without breaking pipeline in the CPU
if !(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) is true.
This condition is true with good device and driver.
If you say
deliver = !(skb->dev->flags & (IFF_PROMISC|IFF_ALLMULTI)) ||
ipv6_chk_mcast_addr(skb->dev, &skb->nh.ipv6h->daddr, NULL);
then you brean the pipeline.
objdump -d will help you. :-)
--
Hideaki YOSHIFUJI @ USAGI Project <yoshfuji@xxxxxxxxxxxxxx>
GPG FP: 9022 65EB 1ECF 3AD1 0BDF 80D8 4807 F894 E062 0EEA
|