1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Stefan Assmann 9e05229190 iavf: remove current MAC address filter on VF reset
Currently MAC filters are not altered during a VF reset event. This may
lead to a stale filter when an administratively set MAC is forced by the
PF.

For an administratively set MAC the PF driver deletes the VFs filters,
overwrites the VFs MAC address and triggers a VF reset. However
the VF driver itself is not aware of the filter removal, which is what
the VF reset is for.
The VF reset queues all filters present in the VF driver to be re-added
to the PF filter list (including the filter for the now stale VF MAC
address) and triggers a VIRTCHNL_OP_GET_VF_RESOURCES event, which
provides the new MAC address to the VF.

When this happens i40e will complain and reject the stale MAC filter,
at least in the untrusted VF case.
i40e 0000:08:00.0: Setting MAC 3c:fa:fa:fa:fa:01 on VF 0
iavf 0000:08:02.0: Reset warning received from the PF
iavf 0000:08:02.0: Scheduling reset task
i40e 0000:08:00.0: Bring down and up the VF interface to make this change effective.
i40e 0000:08:00.0: VF attempting to override administratively set MAC address, bring down and up the VF interface to resume normal operation
i40e 0000:08:00.0: VF 0 failed opcode 10, retval: -1
iavf 0000:08:02.0: Failed to add MAC filter, error IAVF_ERR_NVM

To avoid re-adding the stale MAC filter it needs to be removed from the
VF driver's filter list before queuing the existing filters. Then during
the VIRTCHNL_OP_GET_VF_RESOURCES event the correct filter needs to be
added again, at which point the MAC address has been updated.

As a bonus this change makes bringing the VF down and up again
superfluous for the administratively set MAC case.

Signed-off-by: Stefan Assmann <sassmann@kpanic.de>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
2020-01-09 09:21:40 -08:00
..
3com
8390
adaptec
aeroflex
agere
alacritech
allwinner drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
alteon
altera net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
amazon net: ena: fix issues in setting interrupt moderation params in ethtool 2019-12-20 21:43:08 -08:00
amd treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
apm
apple
aquantia net: atlantic: remove duplicate entries 2020-01-06 14:06:11 -08:00
arc net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
atheros net: ag71xx: fix compile warnings 2019-12-17 22:38:50 -08:00
aurora net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
broadcom drivers/net/b44: Change to non-atomic bit operations on pwol_mask 2020-01-05 14:21:23 -08:00
brocade
cadence macb: Don't unregister clks unconditionally 2020-01-05 15:09:58 -08:00
calxeda net/ethernet: xgmac don't set .driver twice 2019-10-09 21:09:59 -07:00
cavium treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
chelsio cxgb4/cxgb4vf: fix flow control display for auto negotiation 2019-12-30 14:40:42 -08:00
cirrus net: ep93xx_eth: fix mismatch of request_mem_region in remove 2019-11-15 12:42:09 -08:00
cisco
cortina net: gemini: Fix memory leak in gmac_setup_txqs 2019-12-16 16:26:54 -08:00
davicom
dec
dlink
emulex treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
ezchip
faraday Here's the main documentation changes for 5.5: 2019-12-02 11:51:02 -08:00
freescale net: freescale: fec: Fix ethtool -d runtime PM 2020-01-02 16:38:09 -08:00
fujitsu
google net: Google gve: Remove dma_wmb() before ringing doorbell 2020-01-03 12:40:53 -08:00
hisilicon Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
huawei treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
i825xx net: i82596: fix dma_alloc_attr for sni_82596 2019-10-15 20:50:05 -07:00
ibm net/ibmvnic: Fix typo in retry check 2019-12-13 17:23:10 -08:00
intel iavf: remove current MAC address filter on VF reset 2020-01-09 09:21:40 -08:00
marvell Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
mediatek net: phylink: rename mac_link_state() op to mac_pcs_get_state() 2019-11-23 16:13:39 -08:00
mellanox mlxsw: spectrum_qdisc: Ignore grafting of invisible FIFO 2020-01-08 12:45:52 -08:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-09-18 12:34:53 -07:00
microchip Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
moxa
mscc net: mscc: ocelot: unregister the PTP clock on deinit 2019-12-03 11:27:00 -08:00
myricom
natsemi net: sonic: replace dev_kfree_skb in sonic_send_packet 2019-09-11 09:14:01 +01:00
neterion
netronome Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
ni net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
nvidia net: forcedeth: add xmit_more support 2019-11-06 10:22:31 -08:00
nxp lpc_eth: kernel BUG on remove 2019-12-06 20:51:19 -08:00
oki-semi treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
packetengines
pasemi
pensando Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-08 13:28:11 -08:00
qlogic Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
qualcomm Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-22 16:27:24 -08:00
rdc
realtek treewide: Use sizeof_field() macro 2019-12-09 10:36:44 -08:00
renesas Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-11-16 21:51:42 -08:00
rocker net: fib_notifier: propagate extack down to the notifier block callback 2019-10-04 11:10:56 -07:00
samsung net: ethernet: sxgbe: Rename Samsung to lowercase 2020-01-06 13:33:14 -08:00
seeq
sfc sfc: Include XDP packet headroom in buffer step size. 2019-12-20 21:56:48 -08:00
sgi net: sgi: ioc3-eth: ensure tx ring is 16k aligned. 2019-11-04 11:30:14 -08:00
silan
sis
smsc
socionext net: of_get_phy_mode: Change API to solve int/unit warnings 2019-11-04 11:21:25 -08:00
stmicro net: stmmac: dwmac-sun8i: Allow all RGMII modes 2020-01-08 12:31:25 -08:00
sun
synopsys PCI: Add PCI_STD_NUM_BARS for the number of standard BARs 2019-10-14 10:22:26 -05:00
tehuti
ti Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-12-22 09:54:33 -08:00
toshiba
tundra
via
wiznet
xilinx net: phylink: rename mac_link_state() op to mac_pcs_get_state() 2019-11-23 16:13:39 -08:00
xircom
xscale
Kconfig hp100: Move 100BaseVG AnyLAN driver to staging 2019-10-31 14:49:52 -07:00
Makefile hp100: Move 100BaseVG AnyLAN driver to staging 2019-10-31 14:49:52 -07:00
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c pci-v5.4-changes 2019-09-23 19:16:01 -07:00
jme.h
korina.c
lantiq_etop.c
lantiq_xrx200.c