1
0
Fork 0
alistair23-linux/drivers/net/ethernet
Stefan Assmann 7790a471e8 iavf: remove current MAC address filter on VF reset
[ Upstream commit 9e05229190 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-05 21:22:45 +00:00
..
3com net: 3com: 3c59x: Use dev_get_drvdata 2019-07-23 13:02:41 -07:00
8390 net: 8390: Fix manufacturer name in Kconfig help text 2019-08-01 13:45:48 -04:00
adaptec
aeroflex Build fixes for skb_frag_size conversion 2019-07-24 11:46:03 -07:00
agere Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-06 18:44:57 -07:00
alacritech treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 235 2019-06-19 17:09:07 +02:00
allwinner drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
alteon treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
altera treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 201 2019-05-30 11:29:52 -07:00
amazon net: ena: fix napi handler misbehavior when the napi budget is zero 2020-01-04 19:19:17 +01:00
amd Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-02 11:20:17 -07:00
apm net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
apple net: delete "register" keyword 2019-08-08 18:03:42 -07:00
aquantia net: aquantia: add an error handling in aq_nic_set_multicast_list 2019-10-19 12:16:38 -07:00
arc net: ethernet: arc: add the missed clk_disable_unprepare 2019-11-01 10:25:39 -07:00
atheros net: ag71xx: fix mdio subnode support 2019-10-01 10:19:19 -07:00
aurora net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
broadcom drivers/net/b44: Change to non-atomic bit operations on pwol_mask 2020-02-01 09:34:44 +00:00
brocade net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
cadence macb: Don't unregister clks unconditionally 2020-01-12 12:21:50 +01:00
calxeda net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
cavium net: thunderx: start phy before starting autonegotiation 2019-12-18 16:08:29 +01:00
chelsio net: cxgb3_main: Add CAP_NET_ADMIN check to CHELSIO_GET_MEM 2020-01-29 16:45:20 +01: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-31 16:41:18 +01:00
davicom net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00
dec SPDX update for 5.2-rc3, round 1 2019-05-31 08:34:32 -07:00
dlink treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 152 2019-05-30 11:26:32 -07:00
emulex drivers: net: Fix Kconfig indentation 2019-09-26 08:56:17 +02:00
ezchip ezchip: nps_enet: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:13 -07:00
faraday net: ethernet: ftgmac100: Fix DMA coherency issue with SW checksum 2019-10-28 16:22:50 -07:00
freescale dpaa_eth: avoid timestamp read on error paths 2020-01-26 10:01:05 +01:00
fujitsu
google net: Google gve: Remove dma_wmb() before ringing doorbell 2020-02-01 09:34:44 +00:00
hisilicon net: hns: fix soft lockup when there is not enough memory 2020-01-23 08:22:50 +01:00
hp treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 86 2019-05-24 17:37:52 +02:00
huawei net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
i825xx net: i82596: fix dma_alloc_attr for sni_82596 2019-10-15 20:50:05 -07:00
ibm ibmvnic: Fix completion structure initialization 2019-12-31 16:45:49 +01:00
intel iavf: remove current MAC address filter on VF reset 2020-02-05 21:22:45 +00:00
marvell net: marvell: mvpp2: phylink requires the link interrupt 2020-01-04 19:19:07 +01:00
mediatek net: ethernet: mediatek: Fix MT7629 missing GMII mode support 2019-10-15 18:03:35 -07:00
mellanox mlxsw: minimal: Fix an error handling path in 'mlxsw_m_port_create()' 2020-02-01 09:34:39 +00:00
micrel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net-next 2019-09-18 12:34:53 -07:00
microchip net: reject PTP periodic output requests with unsupported flags 2019-11-15 12:48:32 -08:00
moxa
mscc net: mscc: ocelot: unregister the PTP clock on deinit 2019-12-18 16:09:14 +01:00
myricom Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-08-19 11:54:03 -07:00
natsemi net/sonic: Prevent tx watchdog timeout 2020-01-29 16:45:33 +01:00
neterion ethernet: remove redundant memset 2019-07-15 11:06:27 -07:00
netronome nfp: flower: fix stats id allocation 2019-12-31 16:41:30 +01:00
ni net: nixge: Fix a signedness bug in nixge_probe() 2019-09-27 10:20:36 +02:00
nvidia Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2019-09-15 14:17:27 +02:00
nxp net: lpc_eth: avoid resetting twice 2019-10-13 11:15:25 -07:00
oki-semi treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 340 2019-06-05 17:37:07 +02:00
packetengines ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
pasemi net: pasemi: fix an use-after-free in pasemi_mac_phy_init() 2019-07-08 16:33:02 -07:00
pensando ionic: keep users rss hash across lif reset 2019-12-18 16:09:12 +01:00
qlogic qede: Fix multicast mac configuration 2019-12-31 16:41:33 +01:00
qualcomm net: qca_spi: Move reset_count to struct qcaspi 2019-11-20 12:42:23 -08:00
rdc
realtek r8169: respect EEE user setting when restarting network 2019-12-31 16:45:22 +01:00
renesas sh_eth: check sh_eth_cpu_data::dual_port when dumping registers 2020-01-23 08:22:53 +01:00
rocker rocker: add missing init_net check in FIB notifier 2019-09-05 12:14:10 +02:00
samsung net: sxgbe: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:12 -07:00
seeq net: seeq: Fix the function used to release some memory in an error handling path 2019-09-01 12:10:11 -07:00
sfc sfc: Only cancel the PPS workqueue if it exists 2019-11-21 12:06:06 -08:00
sgi net: sgi: ioc3-eth: no need to stop queue set_multicast_list 2019-08-30 13:54:36 -07:00
silan
sis sis900: add support for ethtool's EEPROM dump 2019-07-26 14:24:48 -07:00
smsc ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
socionext net: socionext: fix xdp_result initialization in netsec_process_rx 2020-02-01 09:34:39 +00:00
stmicro stmmac: debugfs entry name is not be changed when udev rename device name. 2020-02-01 09:34:46 +00:00
sun ethernet: Delete unnecessary checks before the macro call “dev_kfree_skb” 2019-08-22 16:22:04 -07:00
synopsys net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
tehuti net: Use skb accessors in network drivers 2019-07-22 20:47:56 -07:00
ti net: ethernet: ti: ale: clean ale tbl on init and intf restart 2019-12-31 16:45:42 +01:00
toshiba net: spider_net: Use struct_size() helper 2019-08-29 17:53:59 -07:00
tundra net: tundra: tsi108: use spin_lock_irqsave instead of spin_lock_irq in IRQ context 2019-08-08 22:43:34 -07:00
via via-rhine: use devm_platform_ioremap_resource() to simplify code 2019-08-21 13:42:12 -07:00
wiznet net: ethernet: wiznet: w5X00 add device tree support 2019-06-12 09:52:04 -07:00
xilinx net: axienet: Fix error return code in axienet_probe() 2020-01-26 10:01:06 +01:00
xircom
xscale net: ixp4xx: Spelling s/XSacle/XScale/ 2019-08-01 13:45:49 -04:00
Kconfig net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00
Makefile net: remove netx ethernet driver 2019-09-21 19:08:31 -07:00
dnet.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
dnet.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
ec_bhf.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 282 2019-06-05 17:36:37 +02:00
ethoc.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 500 2019-06-19 17:09:55 +02:00
fealnx.c
jme.c pci-v5.4-changes 2019-09-23 19:16:01 -07:00
jme.h treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 195 2019-05-30 11:29:22 -07:00
korina.c
lantiq_etop.c treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 234 2019-06-19 17:09:07 +02:00
lantiq_xrx200.c net: Remove dev_err() usage after platform_get_irq() 2019-07-30 14:37:35 -07:00