Skip to contentSkip to conversation

net: ixgbe: slight optimization of addr compare

PATCH Superseded Ding Tianhong 2 participants 2 messages Dec 27, 2013

Subsystems (3)

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 7/20 net: ixgbe: slight optimization of addr compare

Use possibly more efficient ether_addr_equal to instead of memcmp.

Cc Jeff Kirsher <[email protected]>
Cc Jesse Brandeburg <[email protected]>
Cc Bruce Allan <[email protected]>
---
 drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c +1 -2
index d6f0c0d..9ce07f3 100644
@@ -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",
Signature · 1 line
1.8.0