diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-30 15:40:46 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 16:48:31 -0500 |
commit | 887fa9d8f4b9d0a37af7ffaa64b7b4d02cfa19ef (patch) | |
tree | 38e30c4ad099e2085148637ff1ee511b246ea217 /drivers/net/ethernet/intel/igbvf/netdev.c | |
parent | 61d23e9f3d60347dd05475b35a7837f4e7fcbd7a (diff) | |
download | blackbird-op-linux-887fa9d8f4b9d0a37af7ffaa64b7b4d02cfa19ef.tar.gz blackbird-op-linux-887fa9d8f4b9d0a37af7ffaa64b7b4d02cfa19ef.zip |
net: igbvf: slight optimization of addr compare
Use possibly more efficient ether_addr_equal
to instead of memcmp.
Cc: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: Jesse Brandeburg <jesse.brandeburg@intel.com>
Cc: Carolyn Wyborny <carolyn.wyborny@intel.com>
Cc: Don Skidmore <donald.c.skidmore@intel.com>
Signed-off-by: Ding Tianhong <dingtianhong@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/intel/igbvf/netdev.c')
-rw-r--r-- | drivers/net/ethernet/intel/igbvf/netdev.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igbvf/netdev.c b/drivers/net/ethernet/intel/igbvf/netdev.c index 04bf22e5ee31..675435fc2e53 100644 --- a/drivers/net/ethernet/intel/igbvf/netdev.c +++ b/drivers/net/ethernet/intel/igbvf/netdev.c @@ -1745,7 +1745,7 @@ static int igbvf_set_mac(struct net_device *netdev, void *p) hw->mac.ops.rar_set(hw, hw->mac.addr, 0); - if (memcmp(addr->sa_data, hw->mac.addr, 6)) + if (!ether_addr_equal(addr->sa_data, hw->mac.addr)) return -EADDRNOTAVAIL; memcpy(netdev->dev_addr, addr->sa_data, netdev->addr_len); |