1
0
Fork 0
mirror of synced 2025-03-06 20:59:54 +01:00
linux/drivers/net/ethernet/sfc
Íñigo Huguet e84a1e1e68 sfc: fix XDP queues mode with legacy IRQ
In systems without MSI-X capabilities, xdp_txq_queues_mode is calculated
in efx_allocate_msix_channels, but when enabling MSI-X fails, it was not
changed to a proper default value. This was leading to the driver
thinking that it has dedicated XDP queues, when it didn't.

Fix it by setting xdp_txq_queues_mode to the correct value if the driver
fallbacks to MSI or legacy IRQ mode. The correct value is
EFX_XDP_TX_QUEUES_BORROWED because there are no XDP dedicated queues.

The issue can be easily visible if the kernel is started with pci=nomsi,
then a call trace is shown. It is not shown only with sfc's modparam
interrupt_mode=2. Call trace example:
 WARNING: CPU: 2 PID: 663 at drivers/net/ethernet/sfc/efx_channels.c:828 efx_set_xdp_channels+0x124/0x260 [sfc]
 [...skip...]
 Call Trace:
  <TASK>
  efx_set_channels+0x5c/0xc0 [sfc]
  efx_probe_nic+0x9b/0x15a [sfc]
  efx_probe_all+0x10/0x1a2 [sfc]
  efx_pci_probe_main+0x12/0x156 [sfc]
  efx_pci_probe_post_io+0x18/0x103 [sfc]
  efx_pci_probe.cold+0x154/0x257 [sfc]
  local_pci_probe+0x42/0x80

Fixes: 6215b608a8 ("sfc: last resort fallback for lack of xdp tx queues")
Reported-by: Yanghang Liu <yanghliu@redhat.com>
Signed-off-by: Íñigo Huguet <ihuguet@redhat.com>
Acked-by: Martin Habets <habetsm.xilinx@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2023-06-15 11:43:31 +01:00
..
falcon sfc: falcon: Drop redundant pci_enable_pcie_error_reporting() 2023-03-08 23:34:39 -08:00
siena sfc: fix XDP queues mode with legacy IRQ 2023-06-15 11:43:31 +01:00
bitfield.h sfc: extend bitfield macros to 19 fields 2020-11-13 15:33:03 -08:00
ef10.c sfc: ef10: don't overwrite offload features at NIC reset 2023-03-24 14:48:17 -07:00
ef10_regs.h
ef10_sriov.c sfc: move table locking into filter_table_{probe,remove} methods 2022-07-29 21:22:06 -07:00
ef10_sriov.h ethernet: constify references to netdev->dev_addr in drivers 2021-10-14 09:22:11 -07:00
ef100.c sfc_ef100: Drop redundant pci_disable_pcie_error_reporting() 2023-03-08 23:34:39 -08:00
ef100.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_ethtool.c sfc: remove 'log-tc-errors' ethtool private flag 2022-10-19 13:00:05 -07:00
ef100_ethtool.h sfc: skeleton EF100 PF driver 2020-07-27 12:26:55 -07:00
ef100_netdev.c sfc: disable RXFCS and RXALL features by default 2023-05-12 10:00:48 +01:00
ef100_netdev.h sfc: hook up ef100 representor TX 2022-07-22 12:50:06 +01:00
ef100_nic.c sfc: use IS_ENABLED() checks for CONFIG_SFC_SRIOV 2023-02-20 10:49:30 +00:00
ef100_nic.h sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01:00
ef100_regs.h sfc: update EF100 register descriptions 2022-07-22 12:50:06 +01:00
ef100_rep.c sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01:00
ef100_rep.h sfc: add support for devlink port_function_hw_addr_get in ef100 2023-02-16 12:03:13 +01:00
ef100_rx.c sfc: add ability for extra channels to receive raw RX buffers 2022-11-16 09:07:02 +00:00
ef100_rx.h sfc: check hash is valid before using it 2020-08-14 14:07:16 -07:00
ef100_sriov.c sfc: add skeleton ef100 VF representors 2022-07-22 12:50:06 +01:00
ef100_sriov.h sfc: add skeleton ef100 VF representors 2022-07-22 12:50:06 +01:00
ef100_tx.c sfc (gcc13): synchronize ef100_enqueue_skb()'s return type 2022-11-02 20:38:17 -07:00
ef100_tx.h sfc: support passing a representor to the EF100 TX path 2022-07-22 12:50:06 +01:00
efx.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2023-04-20 16:29:51 -07:00
efx.h sfc: attach/detach EF100 representors along with their owning PF 2022-07-22 12:50:06 +01:00
efx_channels.c sfc: fix XDP queues mode with legacy IRQ 2023-06-15 11:43:31 +01:00
efx_channels.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2022-05-12 16:15:30 -07:00
efx_common.c sfc: Fix use-after-free due to selftest_work 2023-04-17 08:22:26 +01:00
efx_common.h sfc: attach/detach EF100 representors along with their owning PF 2022-07-22 12:50:06 +01:00
efx_devlink.c sfc: fix devlink info error handling 2023-05-19 08:55:56 +01:00
efx_devlink.h sfc: add devlink port support for ef100 2023-02-16 12:03:12 +01:00
enum.h sfc: Remove duplicate argument 2021-04-14 13:55:07 -07:00
ethtool.c sfc: Encapsulate access to netdev_priv() 2022-06-29 13:40:47 +01:00
ethtool_common.c sfc: remove 'log-tc-errors' ethtool private flag 2022-10-19 13:00:05 -07:00
ethtool_common.h sfc: remove 'log-tc-errors' ethtool private flag 2022-10-19 13:00:05 -07:00
farch_regs.h
filter.h sfc: include vport_id in filter spec hash and equal() 2022-10-19 17:08:43 -07:00
io.h sfc_ef100: register accesses on EF100 2020-07-27 12:26:55 -07:00
Kconfig sfc: add devlink support for ef100 2023-02-16 12:03:12 +01:00
mae.c sfc: add offloading of 'foreign' TC (decap) rules 2023-03-29 09:06:08 +01:00
mae.h sfc: add offloading of 'foreign' TC (decap) rules 2023-03-29 09:06:08 +01:00
mae_counter_format.h sfc: add extra RX channel to receive MAE counter updates on ef100 2022-11-16 09:07:02 +00:00
Makefile sfc: add devlink support for ef100 2023-02-16 12:03:12 +01:00
mcdi.c sfc: add devlink info support for ef100 2023-02-16 12:03:12 +01:00
mcdi.h sfc: support offloading TC VLAN push/pop actions to the MAE 2023-03-10 21:28:59 -08:00
mcdi_filters.c sfc: use a dynamic m-port for representor RX and set it promisc 2022-07-29 21:22:07 -07:00
mcdi_filters.h sfc: move table locking into filter_table_{probe,remove} methods 2022-07-29 21:22:06 -07:00
mcdi_functions.c sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
mcdi_functions.h sfc: de-indirect TSO handling 2020-09-11 17:15:22 -07:00
mcdi_mon.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
mcdi_pcol.h sfc: update MCDI protocol headers 2022-07-19 13:37:04 -07:00
mcdi_pcol_mae.h sfc: insert default MAE rules to connect VFs to representors 2022-07-29 21:22:06 -07:00
mcdi_port.c sfc: Encapsulate access to netdev_priv() 2022-06-29 13:40:47 +01:00
mcdi_port.h sfc: move NIC-specific mcdi_port declarations out of common header 2020-06-30 13:09:09 -07:00
mcdi_port_common.c sfc: Fix module EEPROM reporting for QSFP modules 2023-05-01 07:34:04 +01:00
mcdi_port_common.h sfc: coding style cleanups in mcdi_port_common.c 2020-09-08 20:14:33 -07:00
mtd.c
net_driver.h sfc: add devlink port support for ef100 2023-02-16 12:03:12 +01:00
nic.c net: ethernet: move from strlcpy with unused retval to strscpy 2022-08-31 14:11:26 -07:00
nic.h sfc: Disable Siena support 2022-05-04 11:18:08 +01:00
nic_common.h sfc: The size of the RX recycle ring should be more flexible 2022-02-01 20:34:59 -08:00
ptp.c sfc: remove expired unicast PTP filters 2023-04-03 19:02:51 -07:00
ptp.h net: sfc: fix memory leak due to ptp channel 2022-05-09 10:01:48 +01:00
rx.c bpf: Let bpf_warn_invalid_xdp_action() report more info 2021-12-13 22:28:27 +01:00
rx_common.c sfc: add ability for an RXQ to grant credits on refill 2022-11-16 09:07:02 +00:00
rx_common.h sfc: The size of the RX recycle ring should be more flexible 2022-02-01 20:34:59 -08:00
selftest.c sfc: define inner/outer csum offload TXQ types 2020-09-11 17:15:22 -07:00
selftest.h sfc: decouple TXQ type from label 2020-09-11 17:15:22 -07:00
sriov.c sfc: Encapsulate access to netdev_priv() 2022-06-29 13:40:47 +01:00
sriov.h
tc.c sfc: fix error unwinds in TC offload 2023-05-31 22:30:27 -07:00
tc.h sfc: add offloading of 'foreign' TC (decap) rules 2023-03-29 09:06:08 +01:00
tc_bindings.c sfc: bind indirect blocks for TC offload on EF100 2022-09-28 09:43:22 +01:00
tc_bindings.h sfc: bind indirect blocks for TC offload on EF100 2022-09-28 09:43:22 +01:00
tc_counters.c sfc: ensure type is valid before updating seen_gen 2022-11-23 13:47:51 +00:00
tc_counters.h sfc: implement counters readout to TC stats 2022-11-16 09:07:03 +00:00
tx.c sfc: Use kmap_local_page() instead of kmap_atomic() 2022-11-25 10:44:01 +00:00
tx.h sfc: select inner-csum-offload TX queues for skbs that need it 2020-09-11 17:15:22 -07:00
tx_common.c sfc: support passing a representor to the EF100 TX path 2022-07-22 12:50:06 +01:00
tx_common.h sfc: support passing a representor to the EF100 TX path 2022-07-22 12:50:06 +01:00
tx_tso.c net: vlan: introduce skb_vlan_eth_hdr() 2023-04-23 14:16:44 +01:00
vfdi.h
workarounds.h