linux-stable/drivers/net
Corinna Vinschen 6fe8c74fc9 net: stmmac: fix up RX flow hash indirection table when setting channels
[ Upstream commit 218c597325 ]

stmmac_reinit_queues() fails to fix up the RX hash.  Even if the number
of channels gets restricted, the output of `ethtool -x' indicates that
all RX queues are used:

  $ ethtool -l enp0s29f2
  Channel parameters for enp0s29f2:
  Pre-set maximums:
  RX:		8
  TX:		8
  Other:		n/a
  Combined:	n/a
  Current hardware settings:
  RX:		8
  TX:		8
  Other:		n/a
  Combined:	n/a
  $ ethtool -x enp0s29f2
  RX flow hash indirection table for enp0s29f2 with 8 RX ring(s):
      0:      0     1     2     3     4     5     6     7
      8:      0     1     2     3     4     5     6     7
  [...]
  $ ethtool -L enp0s29f2 rx 3
  $ ethtool -x enp0s29f2
  RX flow hash indirection table for enp0s29f2 with 3 RX ring(s):
      0:      0     1     2     3     4     5     6     7
      8:      0     1     2     3     4     5     6     7
  [...]

Fix this by setting the indirection table according to the number
of specified queues.  The result is now as expected:

  $ ethtool -L enp0s29f2 rx 3
  $ ethtool -x enp0s29f2
  RX flow hash indirection table for enp0s29f2 with 3 RX ring(s):
      0:      0     1     2     0     1     2     0     1
      8:      2     0     1     2     0     1     2     0
  [...]

Tested on Intel Elkhart Lake.

Fixes: 0366f7e06a ("net: stmmac: add ethtool support for get/set channels")
Signed-off-by: Corinna Vinschen <vinschen@redhat.com>
Link: https://lore.kernel.org/r/20230403121120.489138-1-vinschen@redhat.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-04-13 17:02:40 +02:00
..
appletalk
arcnet
bonding bonding: restore bond's IFF_SLAVE flag if a non-eth dev enslave fails 2023-03-22 13:37:54 +01:00
caif
can can: esd_usb: Make use of can_change_state() and relocate checking skb for NULL 2023-03-10 09:28:23 +01:00
dsa net: dsa: mv88e6xxx: Reset mv88e6393x force WD event bit 2023-04-13 17:02:38 +02:00
ethernet net: stmmac: fix up RX flow hash indirection table when setting channels 2023-04-13 17:02:40 +02:00
fddi net: defxx: Fix missing err handling in dfx_init() 2022-12-09 10:44:27 +00:00
fjes
hamradio Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-12-13 09:49:29 +01:00
hippi
hyperv hv_netvsc: Check status in SEND_RNDIS_PKT completion message 2023-03-10 09:29:13 +01:00
ieee802154 ca8210: Fix unsigned mac_len comparison with zero in ca8210_skb_tx() 2023-04-06 12:12:31 +02:00
ipa net: ipa: compute DMA pool size properly 2023-04-06 12:12:38 +02:00
ipvlan ipvlan: Make skb->skb_iif track skb->dev for l3s mode 2023-03-22 13:37:46 +01:00
mctp mctp: serial: Fix starting value for frame check sequence 2022-12-19 12:38:45 +00:00
mdio net: mdio: thunder: Add missing fwnode_handle_put() 2023-03-30 12:51:23 +02:00
netdevsim
pcs
phy net: phylink: add phylink_expects_phy() method 2023-04-13 17:02:37 +02:00
plip
ppp Networking changes for 6.2. 2022-12-13 15:47:48 -08:00
pse-pd
slip
team Revert "net: team: use IFF_NO_ADDRCONF flag to prevent ipv6 addrconf" 2023-01-18 20:32:44 -08:00
usb net: usb: qmi_wwan: add Telit 0x1080 composition 2023-03-30 12:51:30 +02:00
vmxnet3 vmxnet3: use gro callback when UPT is enabled 2023-04-06 12:12:42 +02:00
vxlan vxlan: Fix memory leaks in error path 2023-01-02 13:37:33 +00:00
wan net: wan: Add checks for NULL for utdm in undo_uhdlc_init and unmap_si_regs 2023-01-13 21:34:31 -08:00
wireguard cpumask: fix incorrect cpumask scanning result checks 2023-03-30 12:51:28 +02:00
wireless wifi: brcmfmac: Fix SDIO suspend/resume regression 2023-04-13 17:02:37 +02:00
wwan net: wwan: iosm: fixes 7560 modem crash 2023-04-06 12:12:38 +02:00
xen-netback xen/netback: don't do grant copy across page boundary 2023-04-06 12:12:43 +02:00
Kconfig
LICENSE.SRC
Makefile
Space.c
amt.c
bareudp.c
dummy.c
eql.c
geneve.c
gtp.c
ifb.c
loopback.c
macsec.c net: macsec: fix net device access prior to holding a lock 2022-12-13 18:58:08 -08:00
macvlan.c
macvtap.c
mdio.c
mhi_net.c
mii.c
net_failover.c net/net_failover: fix txq exceeding warning 2023-04-06 12:12:35 +02:00
netconsole.c
nlmon.c
ntb_netdev.c ntb_netdev: Use dev_kfree_skb_any() in interrupt context 2022-12-12 12:56:37 -08:00
rionet.c
sb1000.c
sungem_phy.c
tap.c tap: tap_open(): correctly initialize socket uid 2023-03-10 09:28:16 +01:00
thunderbolt.c
tun.c tun: tun_chr_open(): correctly initialize socket uid 2023-03-10 09:28:16 +01:00
veth.c veth: Fix use after free in XDP_REDIRECT 2023-03-22 13:37:52 +01:00
virtio_net.c virtio-net: Keep stop() to follow mirror sequence of open() 2023-02-02 10:10:53 -08:00
vrf.c net: vrf: determine the dst using the original ifindex for multicast 2022-12-21 17:47:37 -08:00
vsockmon.c
xen-netfront.c xen: branch for v6.2-rc4 2023-01-12 17:02:20 -06:00