diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-30 08:40:35 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 22:48:30 +0100 |
commit | 4c1120b623758fd2f2dee9b8995d0e8cba1c2365 (patch) | |
tree | fe758be5878cec6aea838e092a096c46be29ef00 /drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | |
parent | net: bnx2x: slight optimization of addr compare (diff) | |
download | linux-4c1120b623758fd2f2dee9b8995d0e8cba1c2365.tar.xz linux-4c1120b623758fd2f2dee9b8995d0e8cba1c2365.zip |
net: cxgb3: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Santosh Raspatur <santosh@chelsio.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c')
-rw-r--r-- | drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c index 76ae09999b5b..c0a9dd55f4e5 100644 --- a/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c +++ b/drivers/net/ethernet/chelsio/cxgb3/cxgb3_offload.c @@ -182,7 +182,7 @@ static struct net_device *get_iff_from_mac(struct adapter *adapter, for_each_port(adapter, i) { struct net_device *dev = adapter->port[i]; - if (!memcmp(dev->dev_addr, mac, ETH_ALEN)) { + if (ether_addr_equal(dev->dev_addr, mac)) { rcu_read_lock(); if (vlan && vlan != VLAN_VID_MASK) { dev = __vlan_find_dev_deep(dev, htons(ETH_P_8021Q), vlan); |