linux/drivers/net/ethernet/intel/ice
Jakub Kicinski 88be092224 Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue
Tony Nguyen says:

====================
ice: fix Rx data path for heavy 9k MTU traffic

Maciej Fijalkowski says:

This patchset fixes a pretty nasty issue that was reported by RedHat
folks which occurred after ~30 minutes (this value varied, just trying
here to state that it was not observed immediately but rather after a
considerable longer amount of time) when ice driver was tortured with
jumbo frames via mix of iperf traffic executed simultaneously with
wrk/nginx on client/server sides (HTTP and TCP workloads basically).

The reported splats were spanning across all the bad things that can
happen to the state of page - refcount underflow, use-after-free, etc.
One of these looked as follows:

[ 2084.019891] BUG: Bad page state in process swapper/34  pfn:97fcd0
[ 2084.025990] page:00000000a60ee772 refcount:-1 mapcount:0 mapping:0000000000000000 index:0x0 pfn:0x97fcd0
[ 2084.035462] flags: 0x17ffffc0000000(node=0|zone=2|lastcpupid=0x1fffff)
[ 2084.041990] raw: 0017ffffc0000000 dead000000000100 dead000000000122 0000000000000000
[ 2084.049730] raw: 0000000000000000 0000000000000000 ffffffffffffffff 0000000000000000
[ 2084.057468] page dumped because: nonzero _refcount
[ 2084.062260] Modules linked in: bonding tls sunrpc intel_rapl_msr intel_rapl_common intel_uncore_frequency intel_uncore_frequency_common i10nm_edac nfit libnvdimm x86_pkg_temp_thermal intel_powerclamp coretemp kvm_intel kvm mgag200 irqd
[ 2084.137829] CPU: 34 PID: 0 Comm: swapper/34 Kdump: loaded Not tainted 5.14.0-427.37.1.el9_4.x86_64 #1
[ 2084.147039] Hardware name: Dell Inc. PowerEdge R750/0216NK, BIOS 1.13.2 12/19/2023
[ 2084.154604] Call Trace:
[ 2084.157058]  <IRQ>
[ 2084.159080]  dump_stack_lvl+0x34/0x48
[ 2084.162752]  bad_page.cold+0x63/0x94
[ 2084.166333]  check_new_pages+0xb3/0xe0
[ 2084.170083]  rmqueue_bulk+0x2d2/0x9e0
[ 2084.173749]  ? ktime_get+0x35/0xa0
[ 2084.177159]  rmqueue_pcplist+0x13b/0x210
[ 2084.181081]  rmqueue+0x7d3/0xd40
[ 2084.184316]  ? xas_load+0x9/0xa0
[ 2084.187547]  ? xas_find+0x183/0x1d0
[ 2084.191041]  ? xa_find_after+0xd0/0x130
[ 2084.194879]  ? intel_iommu_iotlb_sync_map+0x89/0xe0
[ 2084.199759]  get_page_from_freelist+0x11f/0x530
[ 2084.204291]  __alloc_pages+0xf2/0x250
[ 2084.207958]  ice_alloc_rx_bufs+0xcc/0x1c0 [ice]
[ 2084.212543]  ice_clean_rx_irq+0x631/0xa20 [ice]
[ 2084.217111]  ice_napi_poll+0xdf/0x2a0 [ice]
[ 2084.221330]  __napi_poll+0x27/0x170
[ 2084.224824]  net_rx_action+0x233/0x2f0
[ 2084.228575]  __do_softirq+0xc7/0x2ac
[ 2084.232155]  __irq_exit_rcu+0xa1/0xc0
[ 2084.235821]  common_interrupt+0x80/0xa0
[ 2084.239662]  </IRQ>
[ 2084.241768]  <TASK>

The fix is mostly about reverting what was done in commit 1dc1a7e7f4
("ice: Centrallize Rx buffer recycling") followed by proper timing on
page_count() storage and then removing the ice_rx_buf::act related logic
(which was mostly introduced for purposes from cited commit).

Special thanks to Xu Du for providing reproducer and Jacob Keller for
initial extensive analysis.

* '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue:
  ice: stop storing XDP verdict within ice_rx_buf
  ice: gather page_count()'s of each frag right before XDP prog call
  ice: put Rx buffers after being done with current frame
====================

Link: https://patch.msgid.link/20250131185415.3741532-1-anthony.l.nguyen@intel.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2025-02-03 13:18:44 -08:00
..
devlink ice: Add check for devm_kzalloc() 2025-02-01 16:57:50 -08:00
Makefile ice: add Tx hang devlink health reporter 2024-12-17 11:32:46 -08:00
ice.h ice: add Tx hang devlink health reporter 2024-12-17 11:32:46 -08:00
ice_adapter.c ice: Use ice_adapter for PTP shared data instead of auxdev 2024-10-01 11:11:38 -07:00
ice_adapter.h ice: Use ice_adapter for PTP shared data instead of auxdev 2024-10-01 11:11:38 -07:00
ice_adminq_cmd.h ice: remove invalid parameter of equalizer 2025-01-24 10:49:42 -08:00
ice_arfs.c net: introduce include/net/rps.h 2024-03-07 21:12:43 -08:00
ice_arfs.h
ice_base.c ice: move prefetch enable to ice_setup_rx_ctx 2024-12-11 20:13:01 -08:00
ice_base.h ice: make ice_vsi_cfg_txq() static 2024-02-02 09:13:13 -08:00
ice_cgu_regs.h ice: Add support for E825-C TS PLL handling 2024-06-01 15:51:51 -07:00
ice_common.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_common.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_controlq.c ice: Report NVM version numbers on mismatch during load 2024-08-26 09:47:13 -07:00
ice_controlq.h ice: remove unnecessary control queue cmd_buf arrays 2024-08-26 09:46:14 -07:00
ice_dcb.c ice: cleanup inconsistent code 2023-12-18 11:20:43 -08:00
ice_dcb.h
ice_dcb_lib.c ice: add new VSI type for subfunctions 2024-09-06 10:52:19 -07:00
ice_dcb_lib.h
ice_dcb_nl.c ice: field get conversion 2023-12-18 11:20:43 -08:00
ice_dcb_nl.h
ice_ddp.c ice: support optional flags in signature segment header 2024-11-13 10:30:09 -08:00
ice_ddp.h ice: support optional flags in signature segment header 2024-11-13 10:30:09 -08:00
ice_debugfs.c ice: ensure the copied buf is NUL terminated 2024-04-25 19:23:11 -07:00
ice_devids.h ice: update E830 device ids and comments 2024-05-06 09:18:48 -07:00
ice_dpll.c Kthreads affinity follow either of 4 existing different patterns: 2025-01-21 17:10:05 -08:00
ice_dpll.h ice: add callbacks for Embedded SYNC enablement on dpll pins 2024-08-26 19:21:14 -07:00
ice_eswitch.c ice: Fix use after free during unload with ports in bridge 2024-11-04 13:09:33 -08:00
ice_eswitch.h ice: rename devlink_port.[ch] to port.[ch] 2024-12-17 09:32:08 -08:00
ice_eswitch_br.c ice: Flush FDB entries before reset 2024-10-08 14:08:19 -07:00
ice_eswitch_br.h ice: Flush FDB entries before reset 2024-10-08 14:08:19 -07:00
ice_ethtool.c ice: remove invalid parameter of equalizer 2025-01-24 10:49:42 -08:00
ice_ethtool.h ice: remove invalid parameter of equalizer 2025-01-24 10:49:42 -08:00
ice_ethtool_fdir.c ice: change q_index variable type to s16 to store -1 value 2024-11-04 13:09:33 -08:00
ice_fdir.c ice: Implement 'flow-type ether' rules 2024-04-12 10:34:24 -07:00
ice_fdir.h ice: change q_index variable type to s16 to store -1 value 2024-11-04 13:09:33 -08:00
ice_flex_pipe.c ice: enable FDIR filters from raw binary patterns for VFs 2024-08-13 14:51:29 -07:00
ice_flex_pipe.h ice: Cleanup unused declarations 2024-10-08 15:22:32 -07:00
ice_flex_type.h ice: Add support for PFCP hardware offload in switchdev 2024-04-01 10:49:29 +01:00
ice_flow.c ice: enable FDIR filters from raw binary patterns for VFs 2024-08-13 14:51:29 -07:00
ice_flow.h ice: enable FDIR filters from raw binary patterns for VFs 2024-08-13 14:51:29 -07:00
ice_fltr.c
ice_fltr.h
ice_fw_update.c ice: support FW Recovery Mode 2025-01-16 13:05:06 -08:00
ice_fw_update.h ice: Add tx_scheduling_layers devlink param 2024-04-22 13:05:19 -07:00
ice_fwlog.c ice: Fix debugfs with devlink reload 2024-02-12 10:12:42 -08:00
ice_fwlog.h ice: add ability to read and configure FW log data 2023-12-14 09:50:58 -08:00
ice_gnss.c treewide: Introduce kthread_run_worker[_on_cpu]() 2025-01-08 18:15:03 +01:00
ice_gnss.h
ice_hw_autogen.h Merge branch 'net-introduce-tx-h-w-shaping-api' 2024-10-10 08:32:46 -07:00
ice_hwmon.c ice: use proper macro for testing bit 2024-07-03 19:36:52 -07:00
ice_hwmon.h ice: read internal temperature sensor 2023-12-05 11:40:12 +01:00
ice_idc.c
ice_idc_int.h
ice_irq.c
ice_irq.h
ice_lag.c Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 2024-03-28 22:50:22 -07:00
ice_lag.h ice: control default Tx rule in lag 2024-03-25 13:08:05 -07:00
ice_lan_tx_rx.h ice: reduce size of queue context fields 2024-12-11 20:13:00 -08:00
ice_lib.c ice: support FW Recovery Mode 2025-01-16 13:05:06 -08:00
ice_lib.h ice: support FW Recovery Mode 2025-01-16 13:05:06 -08:00
ice_main.c Merge branch '100GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 2025-01-17 19:45:35 -08:00
ice_nvm.c ice: fix reads from NVM Shadow RAM on E830 and E825-C devices 2024-06-05 19:27:55 -07:00
ice_nvm.h ice: Add tx_scheduling_layers devlink param 2024-04-22 13:05:19 -07:00
ice_osdep.h ice: stop intermixing AQ commands/responses debug dumps 2024-08-26 09:40:44 -07:00
ice_parser.c ice: add API for parser profile initialization 2024-08-13 14:51:28 -07:00
ice_parser.h ice: fix ice_parser_rt::bst_key array size 2025-01-24 10:49:30 -08:00
ice_parser_rt.c ice: fix ice_parser_rt::bst_key array size 2025-01-24 10:49:30 -08:00
ice_pf_vsi_vlan_ops.c
ice_pf_vsi_vlan_ops.h
ice_protocol_type.h ice: Remove unused members from switch API 2024-07-11 09:40:56 -07:00
ice_ptp.c Networking changes for 6.14. 2025-01-22 08:28:57 -08:00
ice_ptp.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_ptp_consts.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_ptp_hw.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_ptp_hw.h ice: Add in/out PTP pin delays 2025-01-14 14:37:34 -08:00
ice_repr.c ice: rename devlink_port.[ch] to port.[ch] 2024-12-17 09:32:08 -08:00
ice_repr.h ice: check if SF is ready in ethtool ops 2024-09-06 11:01:24 -07:00
ice_sbq_cmd.h ice: Introduce ETH56G PHY model for E825C products 2024-06-01 15:51:51 -07:00
ice_sched.c ice: Adjust over allocation of memory in ice_sched_add_root_node() and ice_sched_add_node() 2024-08-26 09:49:57 -07:00
ice_sched.h ice: Support 5 layer topology 2024-04-22 13:05:19 -07:00
ice_sf_eth.c ice: rename devlink_port.[ch] to port.[ch] 2024-12-17 09:32:08 -08:00
ice_sf_eth.h ice: subfunction activation and base devlink ops 2024-09-06 11:01:24 -07:00
ice_sf_vsi_vlan_ops.c ice: basic support for VLAN in subfunctions 2024-09-06 11:01:24 -07:00
ice_sf_vsi_vlan_ops.h ice: basic support for VLAN in subfunctions 2024-09-06 11:01:24 -07:00
ice_sriov.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-10 13:13:33 -07:00
ice_sriov.h ice: Add get/set hw address for VFs using devlink commands 2024-06-28 10:23:10 -07:00
ice_switch.c ice: add recipe priority check in search 2025-01-14 14:37:34 -08:00
ice_switch.h ice: Remove unused members from switch API 2024-07-11 09:40:56 -07:00
ice_tc_lib.c ice: set correct dst VSI in only LAN filters 2024-09-30 14:23:19 -07:00
ice_tc_lib.h ice: Add support for PFCP hardware offload in switchdev 2024-04-01 10:49:29 +01:00
ice_trace.h ice: Add tracepoint for adding and removing switch rules 2024-07-11 09:40:56 -07:00
ice_txrx.c ice: stop storing XDP verdict within ice_rx_buf 2025-01-31 10:07:46 -08:00
ice_txrx.h ice: stop storing XDP verdict within ice_rx_buf 2025-01-31 10:07:46 -08:00
ice_txrx_lib.c net: intel: introduce {, Intel} Ethernet common library 2024-04-24 11:06:25 -07:00
ice_txrx_lib.h ice: stop storing XDP verdict within ice_rx_buf 2025-01-31 10:07:46 -08:00
ice_type.h Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-01-16 10:34:59 -08:00
ice_vf_lib.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2024-10-10 13:13:33 -07:00
ice_vf_lib.h ice: Support VF queue rate limit and quanta size configuration 2024-10-10 08:30:23 -07:00
ice_vf_lib_private.h ice: Fix increasing MSI-X on VF 2024-10-08 14:08:19 -07:00
ice_vf_mbx.c ice: add E830 HW VF mailbox message limit support 2024-10-08 14:37:15 -07:00
ice_vf_mbx.h ice: add E830 HW VF mailbox message limit support 2024-10-08 14:37:15 -07:00
ice_vf_vsi_vlan_ops.c ice: fix enabling RX VLAN filtering 2024-04-03 09:16:19 -07:00
ice_vf_vsi_vlan_ops.h
ice_virtchnl.c ice: Fix NULL pointer dereference in switchdev 2024-12-03 10:11:52 -08:00
ice_virtchnl.h ice: Support VF queue rate limit and quanta size configuration 2024-10-10 08:30:23 -07:00
ice_virtchnl_allowlist.c ice: Support VF queue rate limit and quanta size configuration 2024-10-10 08:30:23 -07:00
ice_virtchnl_allowlist.h
ice_virtchnl_fdir.c ice: enable FDIR filters from raw binary patterns for VFs 2024-08-13 14:51:29 -07:00
ice_virtchnl_fdir.h ice: Add a per-VF limit on number of FDIR filters 2024-07-23 15:26:41 -07:00
ice_vlan.h
ice_vlan_mode.c
ice_vlan_mode.h
ice_vsi_vlan_lib.c ice: clear port vlan config during reset 2024-09-30 14:23:31 -07:00
ice_vsi_vlan_lib.h ice: clear port vlan config during reset 2024-09-30 14:23:31 -07:00
ice_vsi_vlan_ops.c ice: basic support for VLAN in subfunctions 2024-09-06 11:01:24 -07:00
ice_vsi_vlan_ops.h
ice_xsk.c xsk: make xsk_buff_add_frag() really add the frag via __xdp_buff_add_frag() 2024-12-19 19:51:14 -08:00
ice_xsk.h ice: improve updating ice_{t,r}x_ring::xsk_pool 2024-07-29 08:52:29 -07:00