From: Simon Horman <horms@verge.net.au>
To: netdev@vger.kernel.org, bridge@lists.linux-foundation.org
Cc: Jiri Pirko <jpirko@redhat.com>,
Stephen Hemminger <shemminger@linux-foundation.org>,
Jesse Gross <jesse@nicira.com>
Subject: [rfc] bridge: is PACKET_LOOPBACK unlikely()?
Date: Mon, 23 Aug 2010 12:35:32 +0900 [thread overview]
Message-ID: <20100823033532.GA28463@verge.net.au> (raw)
While looking at using netdev_rx_handler_register for openvswitch Jesse
Gross suggested that an unlikely() might be worthwhile in that code.
I'm interested to see if its appropriate for the bridge code.
Cc: Jesse Gross <jesse@nicira.com>
Signed-off-by: Simon Horman <horms@verge.net.au>
Index: net-next-2.6/net/bridge/br_input.c
===================================================================
--- net-next-2.6.orig/net/bridge/br_input.c 2010-08-23 12:17:58.000000000 +0900
+++ net-next-2.6/net/bridge/br_input.c 2010-08-23 12:19:46.000000000 +0900
@@ -141,7 +141,7 @@ struct sk_buff *br_handle_frame(struct s
const unsigned char *dest = eth_hdr(skb)->h_dest;
int (*rhook)(struct sk_buff *skb);
- if (skb->pkt_type == PACKET_LOOPBACK)
+ if (unlikely(skb->pkt_type == PACKET_LOOPBACK))
return skb;
if (!is_valid_ether_addr(eth_hdr(skb)->h_source))
next reply other threads:[~2010-08-23 3:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-23 3:35 Simon Horman [this message]
2010-08-23 4:14 ` [rfc] bridge: is PACKET_LOOPBACK unlikely()? David Miller
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=20100823033532.GA28463@verge.net.au \
--to=horms@verge.net.au \
--cc=bridge@lists.linux-foundation.org \
--cc=jesse@nicira.com \
--cc=jpirko@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=shemminger@linux-foundation.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).