diff options
author | dingtianhong <dingtianhong@huawei.com> | 2013-12-30 15:40:50 +0800 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2013-12-31 16:48:31 -0500 |
commit | 4012dda3c160f2d5c615413a224bdb6333698e2c (patch) | |
tree | e98c0aafe5c66dde460f36a175232ccb0410c380 /drivers/net/ethernet/intel/ixgbe | |
parent | 887fa9d8f4b9d0a37af7ffaa64b7b4d02cfa19ef (diff) | |
download | op-kernel-dev-4012dda3c160f2d5c615413a224bdb6333698e2c.zip op-kernel-dev-4012dda3c160f2d5c615413a224bdb6333698e2c.tar.gz |
net: ixgbe: 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: Bruce Allan <bruce.w.allan@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/ixgbe')
-rw-r--r-- | drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index d6f0c0d..9ce07f3 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c @@ -715,8 +715,7 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter, } if (adapter->vfinfo[vf].pf_set_mac && - memcmp(adapter->vfinfo[vf].vf_mac_addresses, new_mac, - ETH_ALEN)) { + !ether_addr_equal(adapter->vfinfo[vf].vf_mac_addresses, new_mac)) { e_warn(drv, "VF %d attempted to override administratively set MAC address\n" "Reload the VF driver to resume operations\n", |