From 4012dda3c160f2d5c615413a224bdb6333698e2c Mon Sep 17 00:00:00 2001 From: dingtianhong Date: Mon, 30 Dec 2013 15:40:50 +0800 Subject: [PATCH] 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 --- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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", -- GitLab