netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Johannes Berg <johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
To: Julian Anastasov <ja-FgGsKACvmQM@public.gmane.org>
Cc: linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast
Date: Wed, 04 Nov 2015 22:35:58 +0100	[thread overview]
Message-ID: <1446672958.13649.4.camel@sipsolutions.net> (raw)
In-Reply-To: <alpine.LFD.2.11.1511042215570.2194-c1lBKlETG9EWAawoAK+ZAw@public.gmane.org>

On Wed, 2015-11-04 at 22:59 +0200, Julian Anastasov wrote:
> 
>         Patches 1 and 3 look correct to me,
> 
> Reviewed-by: Julian Anastasov <ja-FgGsKACvmQM@public.gmane.org>

Thanks for checking!

>         If the patches are lost in the merge window you
> can also consider one minor optimization, see below...

Oh, yeah, they probably are - sorry Dave.

> > -     } else if (rt->rt_type == RTN_BROADCAST)
> > +     } else if (rt->rt_type == RTN_BROADCAST) {
> >               IP_UPD_PO_STATS_BH(net, IPSTATS_MIB_INBCAST, skb-
> >len);
> > +     } else {
> 
>         } else if (unlikely(skb->pkt_type != PACKET_HOST)) {
> 
>         May be such check can save some cycles because
> it is more common to see PACKET_HOST packets...

I had thought about that based on your earlier comments, but then I
didn't quite see the point. However, perhaps we could invert the check
below to check the pkt_type first, hoping it'll have some kind of cache
effect?

johannes
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  parent reply	other threads:[~2015-11-04 21:35 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04 16:22 [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast Johannes Berg
     [not found] ` <1446654127-26826-1-git-send-email-johannes-cdvu00un1VgdHxzADdlk8Q@public.gmane.org>
2015-11-04 16:22   ` [PATCH v2 2/4] ipv6: " Johannes Berg
2015-11-04 16:22   ` [PATCH v2 3/4] ipv4: add option to drop gratuitous ARP packets Johannes Berg
2015-11-04 16:22 ` [PATCH v2 4/4] ipv6: add option to drop unsolicited neighbor advertisements Johannes Berg
2015-11-04 20:59 ` [PATCH v2 1/4] ipv4: add option to drop unicast encapsulated in L2 multicast Julian Anastasov
     [not found]   ` <alpine.LFD.2.11.1511042215570.2194-c1lBKlETG9EWAawoAK+ZAw@public.gmane.org>
2015-11-04 21:35     ` Johannes Berg [this message]
2015-11-05  8:25       ` Julian Anastasov

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1446672958.13649.4.camel@sipsolutions.net \
    --to=johannes-cdvu00un1vgdhxzaddlk8q@public.gmane.org \
    --cc=ja-FgGsKACvmQM@public.gmane.org \
    --cc=linux-wireless-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=netdev-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).