linux/drivers/net
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
..
appletalk Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-05-27 09:55:10 -07:00
arcnet
bonding bonding: remove redundant initialization of variable ret 2021-06-03 15:25:29 -07:00
caif Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-05-27 09:55:10 -07:00
can can: m_can: fix whitespace in a few comments 2021-05-27 09:42:24 +02:00
dsa net: dsa: xrs700x: allow HSR/PRP supervision dupes for node_table 2021-06-04 14:49:28 -07:00
ethernet ice: Save VF's MAC across reboot 2021-06-07 08:30:58 -07:00
fddi net: fddi: skfp: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
fjes fjes: Use DEFINE_RES_MEM() and DEFINE_RES_IRQ() to simplify code 2021-06-01 15:20:47 -07:00
hamradio hamradio: bpqether: Fix -Wunused-const-variable warning 2021-06-01 17:00:51 -07:00
hippi
hyperv hv_netvsc: Make netvsc/VF binding check both MAC and serial number 2021-04-25 18:19:23 -07:00
ieee802154
ipa Revert "net: ipa: disable checksum offload for IPA v4.5+" 2021-06-03 15:09:40 -07:00
ipvlan
mdio net: mdio: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
mhi
netdevsim netdevsim: Fix unsigned being compared to less than zero 2021-06-03 15:33:17 -07:00
pcs net: pcs: xpcs: convert to phylink_pcs_ops 2021-06-03 13:30:43 -07:00
phy net: phy: marvell: use phy_modify_changed() for marvell_set_polarity() 2021-06-03 15:24:34 -07:00
plip
ppp net: ppp: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
slip net: slip: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
team
usb net: usb: Fix spelling mistakes 2021-06-01 17:05:05 -07:00
vmxnet3
wan net: hdlc_x25: fix the alignment issue 2021-06-04 14:34:17 -07:00
wireguard
wireless Networking fixes for 5.13-rc4, including fixes from bpf, netfilter, 2021-05-26 17:44:49 -10:00
wwan net: wwan: core: Add WWAN device index sysfs attribute 2021-05-25 15:51:37 -07:00
xen-netback
bareudp.c
dummy.c
eql.c
geneve.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-04-26 12:00:00 -07:00
gtp.c gtp: Fix a typo 2021-06-01 17:05:04 -07:00
ifb.c ifb: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
Kconfig net: Add a WWAN subsystem 2021-04-16 15:31:02 -07:00
LICENSE.SRC
loopback.c
macsec.c
macvlan.c macvlan: Fix a typo 2021-06-01 17:05:04 -07:00
macvtap.c
Makefile net: Add a WWAN subsystem 2021-04-16 15:31:02 -07:00
mdio.c
mii.c mii: remove leading spaces before tabs 2021-05-20 15:10:57 -07:00
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
Space.c
sungem_phy.c
tap.c
thunderbolt.c
tun.c tun: use DEVICE_ATTR_RO macro 2021-05-19 12:01:44 -07:00
veth.c veth: check for NAPI instead of xdp_prog before xmit of XDP frame 2021-04-16 15:42:07 -07:00
virtio_net.c virtio-net: Add validation for used length 2021-05-31 21:53:36 -07:00
vrf.c vrf: Fix a typo 2021-06-01 17:05:04 -07:00
vsockmon.c
vxlan.c
xen-netfront.c