1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/intel
Brett Creeley f28cd5ce1a ice: Save VF's MAC across reboot
If a VM reboots and/or VF driver is unloaded, its cached hardware MAC
address (hw_lan_addr.addr) is cleared in some cases. If the VF is
trusted, then the PF driver allows the VF to clear its old MAC address
even if this MAC was configured by a host administrator. If the VF is
untrusted, then the PF driver allows the VF to clear its old MAC
address only if the host admin did not set it.

For the trusted VF case, this is unexpected and will cause issues
because the host configured MAC (i.e. via XML) will be cleared on VM
reboot. For the untrusted VF case, this is done to be consistent and it
will allow the VF to keep the same MAC across VM reboot.

Fix this by introducing dev_lan_addr to the VF structure. This will be
the VF's MAC address when it's up and running and in most cases will be
the same as the hw_lan_addr. However, to address the VM reboot and
unload/reload problem, the driver will never allow the hw_lan_addr to be
cleared via VIRTCHNL_OP_DEL_ETH_ADDR. When the VF's MAC is changed, the
dev_lan_addr and hw_lan_addr will always be updated with the same value.
The only ways the VF's MAC can change are the following:

- Set the VF's MAC administratively on the host via iproute2.
- If the VF is trusted and changes/sets its own MAC.
- If the VF is untrusted and the host has not set the MAC via iproute2.

Signed-off-by: Brett Creeley <brett.creeley@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2021-06-07 08:30:58 -07:00
..
e1000 intel: remove checker warning 2021-05-26 09:11:40 -07:00
e1000e net: e1000e: fix misspell word "retreived" 2021-05-19 12:23:25 -07:00
fm10k fm10k: move error check 2021-05-26 09:11:41 -07:00
i40e i40e: Register auxiliary devices to provide RDMA 2021-05-28 20:11:13 -07:00
iavf iavf: redefine the magic number for FDIR GTP-U header fields 2021-04-23 09:34:19 -07:00
ice ice: Save VF's MAC across reboot 2021-06-07 08:30:58 -07:00
igb igb: Fix -Wunused-const-variable warning 2021-06-01 17:00:51 -07:00
igbvf igbvf: convert to strongly typed descriptors 2021-05-26 09:11:41 -07:00
igc igc: Enable HW VLAN Insertion and HW VLAN Stripping 2021-06-04 09:14:39 -07:00
ixgb intel: handle unused assignments 2020-09-25 16:28:59 -07:00
ixgbe ixgbe: Fix out-bounds warning in ixgbe_host_interface_command() 2021-05-27 16:10:00 -07:00
ixgbevf intel: call csum functions with well formatted arguments 2021-05-26 09:11:41 -07:00
e100.c e100: handle eeprom as little endian 2021-05-26 09:11:40 -07:00
Kconfig i40e: Register auxiliary devices to provide RDMA 2021-05-28 20:11:13 -07:00
Makefile igc: Add skeletal frame for Intel(R) 2.5G Ethernet Controller support 2018-10-17 12:14:54 -07:00