mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-29 05:55:02 +08:00
f28cd5ce1a
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> |
||
---|---|---|
.. | ||
ice_adminq_cmd.h | ||
ice_arfs.c | ||
ice_arfs.h | ||
ice_base.c | ||
ice_base.h | ||
ice_common.c | ||
ice_common.h | ||
ice_controlq.c | ||
ice_controlq.h | ||
ice_dcb_lib.c | ||
ice_dcb_lib.h | ||
ice_dcb_nl.c | ||
ice_dcb_nl.h | ||
ice_dcb.c | ||
ice_dcb.h | ||
ice_devids.h | ||
ice_devlink.c | ||
ice_devlink.h | ||
ice_ethtool_fdir.c | ||
ice_ethtool.c | ||
ice_fdir.c | ||
ice_fdir.h | ||
ice_flex_pipe.c | ||
ice_flex_pipe.h | ||
ice_flex_type.h | ||
ice_flow.c | ||
ice_flow.h | ||
ice_fltr.c | ||
ice_fltr.h | ||
ice_fw_update.c | ||
ice_fw_update.h | ||
ice_hw_autogen.h | ||
ice_idc_int.h | ||
ice_idc.c | ||
ice_lag.c | ||
ice_lag.h | ||
ice_lan_tx_rx.h | ||
ice_lib.c | ||
ice_lib.h | ||
ice_main.c | ||
ice_nvm.c | ||
ice_nvm.h | ||
ice_osdep.h | ||
ice_protocol_type.h | ||
ice_sched.c | ||
ice_sched.h | ||
ice_sriov.c | ||
ice_sriov.h | ||
ice_status.h | ||
ice_switch.c | ||
ice_switch.h | ||
ice_txrx_lib.c | ||
ice_txrx_lib.h | ||
ice_txrx.c | ||
ice_txrx.h | ||
ice_type.h | ||
ice_virtchnl_allowlist.c | ||
ice_virtchnl_allowlist.h | ||
ice_virtchnl_fdir.c | ||
ice_virtchnl_fdir.h | ||
ice_virtchnl_pf.c | ||
ice_virtchnl_pf.h | ||
ice_xsk.c | ||
ice_xsk.h | ||
ice.h | ||
Makefile |