linux-stable/drivers/net/ethernet
Jacob Keller 5693dd6d3d ice: use relative VSI index for VFs instead of PF VSI number
[ Upstream commit 11fbb1bfb5 ]

When initializing over virtchnl, the PF is required to pass a VSI ID to the
VF as part of its capabilities exchange. The VF driver reports this value
back to the PF in a variety of commands. The PF driver validates that this
value matches the value it sent to the VF.

Some hardware families such as the E700 series could use this value when
reading RSS registers or communicating directly with firmware over the
Admin Queue.

However, E800 series hardware does not support any of these interfaces and
the VF's only use for this value is to report it back to the PF. Thus,
there is no requirement that this value be an actual VSI ID value of any
kind.

The PF driver already does not trust that the VF sends it a real VSI ID.
The VSI structure is always looked up from the VF structure. The PF does
validate that the VSI ID provided matches a VSI associated with the VF, but
otherwise does not use the VSI ID for any purpose.

Instead of reporting the VSI number relative to the PF space, report a
fixed value of 1. When communicating with the VF over virtchnl, validate
that the VSI number is returned appropriately.

This avoids leaking information about the firmware of the PF state.
Currently the ice driver only supplies a VF with a single VSI. However, it
appears that virtchnl has some support for allowing multiple VSIs. I did
not attempt to implement this. However, space is left open to allow further
relative indexes if additional VSIs are provided in future feature
development. For this reason, keep the ice_vc_isvalid_vsi_id function in
place to allow extending it for multiple VSIs in the future.

This change will also simplify handling of live migration in a future
series. Since we no longer will provide a real VSI number to the VF, there
will be no need to keep track of this number when migrating to a new host.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Tested-by: Rafal Romanowski <rafal.romanowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-04-13 13:05:02 +02:00
..
3com 3c589_cs: Fix an error handling path in tc589_probe() 2023-05-30 14:03:33 +01:00
8390
actions
adaptec
adi net: ethernet: adi: adin1110: Fix uninitialized variable 2023-11-02 09:35:27 +01:00
aeroflex ethernet: aeroflex: fix potential skb leak in greth_init_rings() 2022-12-07 11:45:52 +01:00
agere
alacritech
allwinner
alteon
altera net: altera_tse: release phylink resources in tse_shutdown() 2022-11-24 09:34:43 +01:00
amazon net: ena: Remove ena_select_queue 2024-03-26 18:20:36 -04:00
amd amd-xgbe: propagate the correct speed and duplex status 2023-12-03 07:32:08 +01:00
apm drivers: net: xgene: disable napi when register irq failed in xgene_enet_open() 2022-11-08 15:15:55 +01:00
apple net: apple: bmac: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:27 +01:00
aquantia net: atlantic: Fix DMA mapping for PTP hwts ring 2024-02-16 19:06:26 +01:00
arc
asix
atheros ethernet: atheros: fix a memleak in atl1e_setup_ring_resources 2024-01-01 12:38:56 +00:00
broadcom bnx2x: Fix firmware version string character counts 2024-04-13 13:04:52 +02:00
brocade
cadence net: macb: fix sleep inside spinlock 2023-09-19 12:28:10 +02:00
calxeda
cavium net: thunderx: Fix missing destroy_workqueue of nicvf_rx_mode_wq 2022-12-06 12:41:46 +01:00
chelsio chtls: fix tp->rcv_tstamp initialization 2023-11-20 11:51:54 +01:00
cirrus
cisco
cortina net: ethernet: cortina: Fix MTU max setting 2023-11-28 17:07:05 +00:00
davicom net: dm9051: Fix missing dev_kfree_skb() in dm9051_loop_rx() 2022-11-23 12:43:14 +00:00
dec
dlink
emulex net: vlan: introduce skb_vlan_eth_hdr() 2023-12-20 17:00:16 +01:00
engleder tsnep: Fix tsnep_request_irq() format-overflow warning 2023-11-28 17:06:56 +00:00
ezchip
faraday
freescale net: fec: Set mac_managed_pm during probe 2024-04-10 16:28:29 +02:00
fujitsu
fungible
google gve: Fix use-after-free vulnerability 2024-02-05 20:13:02 +00:00
hisilicon net: hns3: mark unexcuted loopback test result as UNEXECUTED 2024-04-10 16:28:22 +02:00
huawei net: hinic: Fix error handling in hinic_module_init() 2022-11-11 19:57:37 -08:00
i825xx i825xx: sni_82596: use eth_hw_addr_set() 2023-03-22 13:33:50 +01:00
ibm ibmveth: Remove condition to recompute TCP header checksum. 2023-10-10 22:00:43 +02:00
intel ice: use relative VSI index for VFs instead of PF VSI number 2024-04-13 13:05:02 +02:00
litex net: ethernet: litex: add support for 64 bit stats 2023-07-27 08:50:35 +02:00
marvell octeontx2-af: Add array index check 2024-04-10 16:28:28 +02:00
mediatek net: ethernet: mtk_eth_soc: fix PPE hanging issue 2024-03-26 18:20:59 -04:00
mellanox mlxbf_gige: stop interface during shutdown 2024-04-10 16:28:27 +02:00
micrel net: ks8851: Fix TX stall caused by TX buffer overrun 2024-01-01 12:39:04 +00:00
microchip net: lan743x: Add set RFE read fifo threshold for PCI1x1x chips 2024-04-10 16:28:23 +02:00
microsoft net: mana: select PAGE_POOL 2024-01-01 12:38:57 +00:00
moxa
mscc net: mscc: ocelot: fix eMAC TX RMON stats for bucket 256-511 and above 2024-01-01 12:38:56 +00:00
myricom myri10ge: Fix an error handling path in myri10ge_probe() 2022-12-31 13:32:56 +01:00
natsemi net/sonic: use dma_mapping_error() for error check 2023-03-30 12:49:09 +02:00
neterion ethernet: s2io: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:26 +01:00
netronome nfp: flower: handle acti_netdevs allocation failure 2024-03-26 18:20:43 -04:00
ni net: ethernet: nixge: fix NULL dereference 2022-11-28 11:09:51 +00:00
nvidia forcedeth: Fix an error handling path in nv_probe() 2023-05-30 14:03:32 +01:00
nxp
oki-semi net: pch_gbe: fix pci device refcount leak while module exiting 2022-11-18 19:40:14 -08:00
packetengines
pasemi net: pasemi: Fix return type of pasemi_mac_start_tx() 2023-05-24 17:32:37 +01:00
pensando ionic: set adminq irq affinity 2024-04-13 13:04:55 +02:00
qlogic net/qla3xxx: fix potential memleak in ql_alloc_buffer_queues 2024-01-10 17:10:25 +01:00
qualcomm net: qualcomm: rmnet: fix global oob in rmnet_policy 2024-01-25 15:27:49 -08:00
rdc r6040: Fix kmemleak in probe and remove 2022-12-31 13:32:54 +01:00
realtek drivers: net: convert to boolean for the mac_managed_pm flag 2024-04-10 16:28:29 +02:00
renesas net: ravb: Always update error counters 2024-04-10 16:28:30 +02:00
rocker
samsung
seeq
sfc sfc: fix a double-free bug in efx_probe_filters 2024-01-10 17:10:24 +01:00
sgi
silan
sis
smsc smsc911x: avoid PHY being resumed when interface is not up 2023-04-06 12:10:47 +02:00
socionext net: netsec: Ignore 'phy-mode' on SynQuacer in DT mode 2023-08-11 12:08:16 +02:00
stmicro net: stmmac: fix rx queue priority assignment 2024-04-10 16:28:26 +02:00
sun cassini: Fix a memory leak in the error handling path of cas_init_one() 2023-05-24 17:32:47 +01:00
sunplus eth: sp7021: drop free_netdev() from spl2sw_init_netdev() 2022-11-10 16:27:33 -08:00
synopsys
tehuti
ti net: ethernet: ti: cpsw_new: enable mac_managed_pm to fix mdio 2024-02-23 09:12:46 +01:00
toshiba net: spider_net: Use size_add() in call to struct_size() 2023-11-20 11:51:52 +01:00
tundra ethernet: tundra: free irq when alloc ring failed in tsi108_open() 2022-11-10 15:39:08 +01:00
vertexcom
via
wangxun
wiznet
xilinx net: ll_temac: platform_get_resource replaced by wrong function 2024-04-03 15:19:49 +02:00
xircom xirc2ps_cs: Fix use after free bug in xirc2ps_detach 2023-03-30 12:49:04 +02:00
xscale
dnet.c net: ethernet: dnet: don't call dev_kfree_skb() under spin_lock_irqsave() 2022-12-31 13:32:27 +01:00
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
Kconfig net: restore alpha order to Ethernet devices in config 2024-03-06 14:45:04 +00:00
korina.c net: korina: handle clk prepare error in korina_probe() 2023-08-11 12:08:16 +02:00
lantiq_etop.c
lantiq_xrx200.c
Makefile