Commit 4012dda3 authored by dingtianhong's avatar dingtianhong Committed by David S. Miller

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: default avatarDing Tianhong <dingtianhong@huawei.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 887fa9d8
...@@ -715,8 +715,7 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter, ...@@ -715,8 +715,7 @@ static int ixgbe_set_vf_mac_addr(struct ixgbe_adapter *adapter,
} }
if (adapter->vfinfo[vf].pf_set_mac && if (adapter->vfinfo[vf].pf_set_mac &&
memcmp(adapter->vfinfo[vf].vf_mac_addresses, new_mac, !ether_addr_equal(adapter->vfinfo[vf].vf_mac_addresses, new_mac)) {
ETH_ALEN)) {
e_warn(drv, e_warn(drv,
"VF %d attempted to override administratively set MAC address\n" "VF %d attempted to override administratively set MAC address\n"
"Reload the VF driver to resume operations\n", "Reload the VF driver to resume operations\n",
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment