1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net
Anatolii Gerasymenko ccfee18220 ice: Set txq_teid to ICE_INVAL_TEID on ring creation
When VF is freshly created, but not brought up, ring->txq_teid
value is by default set to 0.
But 0 is a valid TEID. On some platforms the Root Node of
Tx scheduler has a TEID = 0. This can cause issues as shown below.

The proper way is to set ring->txq_teid to ICE_INVAL_TEID (0xFFFFFFFF).

Testing Hints:
echo 1 > /sys/class/net/ens785f0/device/sriov_numvfs
ip link set dev ens785f0v0 up
ip link set dev ens785f0v0 down

If we have freshly created VF and quickly turn it on and off, so there
would be no time to reach VIRTCHNL_OP_CONFIG_VSI_QUEUES stage, then
VIRTCHNL_OP_DISABLE_QUEUES stage will fail with error:
[  639.531454] disable queue 89 failed 14
[  639.532233] Failed to disable LAN Tx queues, error: ICE_ERR_AQ_ERROR
[  639.533107] ice 0000:02:00.0: Failed to stop Tx ring 0 on VSI 5

The reason for the fail is that we are trying to send AQ command to
delete queue 89, which has never been created and receive an "invalid
argument" error from firmware.

As this queue has never been created, it's teid and ring->txq_teid
have default value 0.
ice_dis_vsi_txq has a check against non-existent queues:

node = ice_sched_find_node_by_teid(pi->root, q_teids[i]);
if (!node)
	continue;

But on some platforms the Root Node of Tx scheduler has a teid = 0.
Hence, ice_sched_find_node_by_teid finds a node with teid = 0 (it is
pi->root), and we go further to submit an erroneous request to firmware.

Fixes: 37bb839012 ("ice: Move common functions out of ice_main.c part 7/7")
Signed-off-by: Anatolii Gerasymenko <anatolii.gerasymenko@intel.com>
Reviewed-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Tested-by: Konrad Jankowski <konrad0.jankowski@intel.com>
Signed-off-by: Alice Michael <alice.michael@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
2022-04-05 12:50:25 +02:00
..
appletalk
arcnet net: arcnet: com20020: Fix null-ptr-deref in com20020pci_probe() 2022-03-03 10:29:13 +00:00
bonding net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
caif net: caif: Use netif_rx(). 2022-03-04 12:02:19 +00:00
can can: gs_usb: gs_make_candev(): fix memory leak for devices with extended bit timing configuration 2022-03-31 09:55:27 +02:00
dsa net: dsa: felix: fix possible NULL pointer dereference 2022-03-30 12:07:38 -07:00
ethernet ice: Set txq_teid to ICE_INVAL_TEID on ring creation 2022-04-05 12:50:25 +02:00
fddi
fjes
hamradio hamradio: Fix wrong assignment of 'bbc->cfg.loopback' 2022-03-16 19:17:49 -07:00
hippi
hyperv Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-17 13:56:58 -07:00
ieee802154 spi: Updates for v5.18 2022-03-21 18:33:57 -07:00
ipa net: ipa: use struct_size() for the interconnect array 2022-03-11 22:50:07 -08:00
ipvlan net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
mctp mctp i2c: correct mctp_i2c_header_create result 2022-04-01 12:04:15 +01:00
mdio net: mdio: mscc-miim: add lan966x internal phy reset support 2022-03-21 22:33:02 -07:00
netdevsim devlink: hold the instance lock during eswitch_mode callbacks 2022-03-21 14:11:38 +00:00
pcs
phy net: phy: micrel: Remove DT option lan8814,ignore-ts 2022-04-04 12:40:42 +01:00
plip slip/plip: Use netif_rx(). 2022-03-06 11:05:31 +00:00
ppp
slip slip/plip: Use netif_rx(). 2022-03-06 11:05:31 +00:00
team teaming: deliver link-local packets with the link they arrive on 2022-02-18 11:40:52 +00:00
usb net: usb: ax88179_178a: add Allied Telesis AT-UMCs 2022-03-24 18:32:14 -07:00
vmxnet3
vxlan vxlan: do not feed vxlan_vnifilter_dump_dev with non vxlan devices 2022-03-31 08:53:01 -07:00
wan Networking changes for 5.18. 2022-03-24 13:13:26 -07:00
wireguard wireguard: socket: ignore v6 endpoints when ipv6 is disabled 2022-03-30 19:14:09 -07:00
wireless iwlwifi: mvm: Don't fail if PPAG isn't supported 2022-03-22 16:18:27 -07:00
wwan Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-03-23 10:53:49 -07:00
xen-netback Revert "xen-netback: Check for hotplug-status existence before watching" 2022-02-24 08:58:37 -08:00
amt.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
bareudp.c bareudp: use ipv6_mod_enabled to check if IPv6 enabled 2022-03-16 19:16:57 -07:00
dummy.c
eql.c
geneve.c net: geneve: add missing netlink policy and size for IFLA_GENEVE_INNER_PROTO_INHERIT 2022-03-22 22:19:46 -07:00
gtp.c gtp: Fix inconsistent indenting 2022-03-16 08:47:02 -07:00
ifb.c
Kconfig
LICENSE.SRC
loopback.c net: Add skb_clear_tstamp() to keep the mono delivery_time 2022-03-03 14:38:48 +00:00
macsec.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
macvlan.c net: macvlan: add net device refcount tracker 2022-03-14 10:06:54 +00:00
macvtap.c macvtap: advertise link netns via netlink 2022-03-01 17:59:28 -08:00
Makefile vxlan: move to its own directory 2022-03-01 08:38:01 +00:00
mdio.c
mhi_net.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
mii.c
net_failover.c net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
netconsole.c
nlmon.c
ntb_netdev.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
rionet.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
sb1000.c net: dev: Makes sure netif_rx() can be invoked in any context. 2022-02-14 13:38:35 +00:00
Space.c
sungem_phy.c
tap.c net: tap: track dropped skb via kfree_skb_reason() 2022-03-06 11:04:01 +00:00
thunderbolt.c
tun.c net: add per-cpu storage and net->core_stats 2022-03-11 23:17:24 -08:00
veth.c veth: Allow jumbo frames in xdp mode 2022-03-17 20:33:52 +01:00
virtio_net.c virtio_net: Fix code indent error 2022-02-15 14:27:17 +00:00
vrf.c vrf: fix packet sniffing for traffic originating from ip tunnels 2022-04-01 11:56:55 +01:00
vsockmon.c
xen-netfront.c xen/grant-table: remove readonly parameter from functions 2022-03-15 20:34:40 -05:00