linux-stable/drivers/net
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
..
appletalk
arcnet arcnet: restoring support for multiple Sohard Arcnet cards 2023-12-13 18:39:07 +01:00
bonding bonding: remove print in bond_verify_device_path 2024-02-05 20:13:03 +00:00
caif
can can: netlink: Fix TDCO calculation using the old data bittiming 2024-02-23 09:12:47 +01:00
dsa net: dsa: mt7530: fix handling of all link-local frames 2024-03-26 18:21:02 -04:00
ethernet ice: use relative VSI index for VFs instead of PF VSI number 2024-04-13 13:05:02 +02:00
fddi
fjes fjes: fix memleaks in fjes_hw_setup 2024-01-31 16:17:06 -08:00
hamradio
hippi
hyperv hv_netvsc: Register VF in netvsc_probe if NET_DEVICE_REGISTER missed 2024-02-23 09:12:46 +01:00
ieee802154 net: ieee802154: adf7242: Fix some potential buffer overflow in adf7242_stats_show() 2023-11-02 09:35:27 +01:00
ipa
ipvlan ipvlan: add ipvlan_route_v6_outbound() helper 2023-11-28 17:07:04 +00:00
mctp
mdio
netdevsim netdevsim: avoid potential loop in nsim_dev_trap_report_work() 2024-02-16 19:06:25 +01:00
pcs net: pcs: xpcs: Return EINVAL in the internal methods 2024-04-13 13:04:58 +02:00
phy net: phy: micrel: Fix potential null pointer dereference 2024-04-10 16:28:26 +02:00
plip
ppp ppp_async: limit MRU to 64K 2024-02-16 19:06:27 +01:00
pse-pd
slip
team team: Fix use-after-free when an option instance allocation fails 2023-12-20 17:00:25 +01:00
usb drivers: net: convert to boolean for the mac_managed_pm flag 2024-04-10 16:28:29 +02:00
vmxnet3
vxlan
wan
wireguard wireguard: netlink: access device through ctx instead of peer 2024-04-03 15:19:38 +02:00
wireless wifi: ath11k: decrease MHI channel buffer length to 8KB 2024-04-13 13:04:59 +02:00
wwan net: wwan: t7xx: Split 64bit accesses to fix alignment issues 2024-04-10 16:28:22 +02:00
xen-netback xen-netback: properly sync TX responses 2024-02-23 09:12:38 +01:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c amt: do not use overwrapped cb area 2024-01-25 15:27:49 -08:00
bareudp.c
dummy.c
eql.c
geneve.c geneve: make sure to pull inner header in geneve_rx() 2024-03-15 10:48:14 -04:00
gtp.c gtp: fix use-after-free and null-ptr-deref in gtp_newlink() 2024-03-06 14:45:10 +00:00
ifb.c
loopback.c
macsec.c net: add DEV_STATS_READ() helper 2023-11-20 11:51:55 +01:00
macvlan.c macvlan: Don't propagate promisc change to lower dev in passthru 2023-11-28 17:07:06 +00:00
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
thunderbolt.c
tun.c tun: Fix xdp_rxq_info's queue_index when detaching 2024-03-06 14:45:06 +00:00
veth.c net: veth: do not manipulate GRO when using XDP 2024-03-26 18:21:00 -04: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:12:59 +00:00
vrf.c
vsockmon.c
xen-netfront.c xen-netfront: Add missing skb_mark_for_recycle 2024-04-10 16:28:24 +02:00