From: Stephen Hemminger Date: Fri, 14 Jul 2006 23:34:22 +0000 (-0700) Subject: [VLAN]: __vlan_hwaccel_rx can use the faster ether_compare_addr X-Git-Tag: v2.6.18-rc2~8^2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0610d11b53ad15200618e38e4511373e3ed09e8a;p=linux-2.6 [VLAN]: __vlan_hwaccel_rx can use the faster ether_compare_addr The inline function compare_ether_addr is faster than memcmp. Also, don't need to drag in proc_fs.h, the only reference to proc_dir_entry is a pointer so the declaration is needed here. Signed-off-by: Stephen Hemminger Acked-by: Ben Greear Signed-off-by: David S. Miller --- diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index eef0876d83..383627ad32 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h @@ -23,8 +23,8 @@ struct vlan_collection; struct vlan_dev_info; struct hlist_node; -#include /* for proc_dir_entry */ #include +#include #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) * that VLAN requires. @@ -185,7 +185,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, * This allows the VLAN to have a different MAC than the underlying * device, and still route correctly. */ - if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) + if (!compare_ether_addr(eth_hdr(skb)->h_dest, + skb->dev->dev_addr)) skb->pkt_type = PACKET_HOST; break; };