net: ixgbe: slight optimization of addr compare
Subsystems (3)
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]>
Signed-off-by Ding Tianhong <[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
@@ -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
Quoted 10 lines · Ding Tianhong
Use possibly more efficient
ether_addr_equalto instead of memcmp.Cc Jeff Kirsher <[email protected]>Cc Jesse Brandeburg <[email protected]>Cc Bruce Allan <[email protected]>Signed-off-by Ding Tianhong <[email protected]>--- drivers/net/ethernet/intel/ixgbe/ixgbe_sriov.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-)
Thanks Ding, I have added this patch to my queue.