From: dingtianhong Date: Mon, 30 Dec 2013 07:40:50 +0000 (+0800) Subject: net: ixgbe: slight optimization of addr compare X-Git-Tag: MMI-PSA29.97-13-9~12877^2~340^2~12 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=4012dda3c160f2d5c615413a224bdb6333698e2c;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git net: ixgbe: slight optimization of addr compare Use possibly more efficient ether_addr_equal to instead of memcmp. Cc: Jeff Kirsher Cc: Jesse Brandeburg Cc: Bruce Allan Signed-off-by: Ding Tianhong Signed-off-by: David S. Miller --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c index d6f0c0d8cf11..9ce07f3ef62d 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",