linux-stable/drivers/net
Jacob Keller c926393dc3 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:07:33 +02:00
..
appletalk
arcnet arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-13 18:45:05 +01:00
bonding xdp, bonding: Fix feature flags when there are no slave devs anymore 2024-03-15 10:48:18 -04:00
caif
can can: m_can: Start/Cancel polling timer together with interrupts 2024-03-26 18:19:29 -04:00
dsa net: dsa: mv88e6xxx: fix usable ports on 88e6020 2024-04-10 16:35:52 +02:00
ethernet ice: use relative VSI index for VFs instead of PF VSI number 2024-04-13 13:07:33 +02:00
fddi
fjes fjes: fix memleaks in fjes_hw_setup 2024-01-31 16:19:05 -08:00
hamradio
hippi
hyperv hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed 2024-02-23 09:25:16 +01:00
ieee802154
ipa net: ipa: don't overrun IPA suspend interrupt registers 2024-03-01 13:35:08 +01:00
ipvlan
mctp
mdio
netdevsim netdevsim: avoid potential loop in nsim_dev_trap_report_work() 2024-02-16 19:10:47 +01:00
pcs net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:07:31 +02:00
phy net: phy: phy_device: Prevent nullptr exceptions on ISR 2024-04-13 13:07:29 +02:00
plip
ppp ppp_async: limit MRU to 64K 2024-02-16 19:10:50 +01:00
pse-pd
slip
team team: Fix use-after-free when an option instance allocation fails 2023-12-20 17:02:02 +01:00
thunderbolt
usb net: usb: ax88179_178a: avoid the interface always configured as random address 2024-04-10 16:35:49 +02:00
vmxnet3 vmxnet3: Fix missing reserved tailroom 2024-03-26 18:20:08 -04:00
vxlan net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
wan
wireguard wireguard: netlink: access device through ctx instead of peer 2024-04-03 15:28:36 +02:00
wireless wifi: iwlwifi: Add missing MODULE_FIRMWARE() for *.pnvm 2024-04-13 13:07:32 +02:00
wwan net: wwan: t7xx: Split 64bit accesses to fix alignment issues 2024-04-10 16:35:42 +02:00
xen-netback xen-netback: properly sync TX responses 2024-02-23 09:25:03 +01:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c amt: do not use overwrapped cb area 2024-01-25 15:35:56 -08:00
bareudp.c
dummy.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
eql.c
geneve.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
gtp.c gtp: fix use-after-free and null-ptr-deref in gtp_newlink() 2024-03-06 14:48:39 +00:00
ifb.c
loopback.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
macsec.c
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c
netconsole.c
nlmon.c
ntb_netdev.c
rionet.c
sb1000.c
sungem_phy.c
tap.c
tun.c tun: Fix xdp_rxq_info's queue_index when detaching 2024-03-06 14:48:34 +00:00
veth.c net: add netdev_lockdep_set_classes() to virtual drivers 2024-04-13 13:07:30 +02:00
virtio_net.c virtio_net: Fix "‘%d’ directive writing between 1 and 11 bytes into a region of size 10" warnings 2024-02-05 20:14:33 +00:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: Add missing skb_mark_for_recycle 2024-04-10 16:35:49 +02:00