mirror of https://gitee.com/openkylin/linux.git
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: Ding Tianhong <dingtianhong@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
887fa9d8f4
commit
4012dda3c1
|
@ -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",
|
||||
|
|
Loading…
Reference in New Issue