* [rfc] bridge: is PACKET_LOOPBACK unlikely()?
@ 2010-08-23 3:35 Simon Horman
2010-08-23 4:14 ` David Miller
0 siblings, 1 reply; 2+ messages in thread
From: Simon Horman @ 2010-08-23 3:35 UTC (permalink / raw)
To: netdev, bridge; +Cc: Jiri Pirko, Stephen Hemminger, Jesse Gross
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))
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2010-08-23 4:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-08-23 3:35 [rfc] bridge: is PACKET_LOOPBACK unlikely()? Simon Horman
2010-08-23 4:14 ` David Miller
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).