Skip to content

Commit

Permalink
vlan: use use ether_addr_equal_64bits to instead of ether_addr_equal
Browse files Browse the repository at this point in the history
Ether_addr_equal_64bits is more efficient than ether_addr_equal, and
can be used when each argument is an array within a structure that
contains at least two bytes of data beyond the array, so it is safe
to use it for vlan, and make sense for fast path.

Cc: Joe Perches <[email protected]>
Cc: Patrick McHardy <[email protected]>
Cc: David S. Miller <[email protected]>
Signed-off-by: Ding Tianhong <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
  • Loading branch information
dingtianhong authored and davem330 committed Mar 9, 2014
1 parent 375f67d commit be14cc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion net/8021q/vlan_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ bool vlan_do_receive(struct sk_buff **skbp)
/* Our lower layer thinks this is not local, let's make sure.
* This allows the VLAN to have a different MAC than the
* underlying device, and still route correctly. */
if (ether_addr_equal(eth_hdr(skb)->h_dest, vlan_dev->dev_addr))
if (ether_addr_equal_64bits(eth_hdr(skb)->h_dest, vlan_dev->dev_addr))
skb->pkt_type = PACKET_HOST;
}

Expand Down

0 comments on commit be14cc9

Please sign in to comment.