[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100823033532.GA28463@verge.net.au>
Date: Mon, 23 Aug 2010 12:35:32 +0900
From: Simon Horman <horms@...ge.net.au>
To: netdev@...r.kernel.org, bridge@...ts.linux-foundation.org
Cc: Jiri Pirko <jpirko@...hat.com>,
Stephen Hemminger <shemminger@...ux-foundation.org>,
Jesse Gross <jesse@...ira.com>
Subject: [rfc] bridge: is PACKET_LOOPBACK unlikely()?
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@...ira.com>
Signed-off-by: Simon Horman <horms@...ge.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))
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists