diff options
author | Stephen Hemminger <shemminger@osdl.org> | 2006-07-14 19:34:22 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2006-07-14 19:34:22 -0400 |
commit | 0610d11b53ad15200618e38e4511373e3ed09e8a (patch) | |
tree | 73229c61c29f0a6690c3f29abd3966a4637a8835 /include/linux/if_vlan.h | |
parent | b3a6251915df9e3d80d4a0d32bd8d24223906688 (diff) |
[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 <shemminger@osdl.org>
Acked-by: Ben Greear <greearb@candelatech.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/if_vlan.h')
-rw-r--r-- | include/linux/if_vlan.h | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/linux/if_vlan.h b/include/linux/if_vlan.h index eef0876d8307..383627ad328f 100644 --- a/include/linux/if_vlan.h +++ b/include/linux/if_vlan.h | |||
@@ -23,8 +23,8 @@ struct vlan_collection; | |||
23 | struct vlan_dev_info; | 23 | struct vlan_dev_info; |
24 | struct hlist_node; | 24 | struct hlist_node; |
25 | 25 | ||
26 | #include <linux/proc_fs.h> /* for proc_dir_entry */ | ||
27 | #include <linux/netdevice.h> | 26 | #include <linux/netdevice.h> |
27 | #include <linux/etherdevice.h> | ||
28 | 28 | ||
29 | #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) | 29 | #define VLAN_HLEN 4 /* The additional bytes (on top of the Ethernet header) |
30 | * that VLAN requires. | 30 | * that VLAN requires. |
@@ -185,7 +185,8 @@ static inline int __vlan_hwaccel_rx(struct sk_buff *skb, | |||
185 | * This allows the VLAN to have a different MAC than the underlying | 185 | * This allows the VLAN to have a different MAC than the underlying |
186 | * device, and still route correctly. | 186 | * device, and still route correctly. |
187 | */ | 187 | */ |
188 | if (!memcmp(eth_hdr(skb)->h_dest, skb->dev->dev_addr, ETH_ALEN)) | 188 | if (!compare_ether_addr(eth_hdr(skb)->h_dest, |
189 | skb->dev->dev_addr)) | ||
189 | skb->pkt_type = PACKET_HOST; | 190 | skb->pkt_type = PACKET_HOST; |
190 | break; | 191 | break; |
191 | }; | 192 | }; |