3
0
Fork 0
forked from mirrors/linux
kernel/drivers/net/ethernet/intel/ice
Michal Kubiak 73145e6d81 ice: fix rebuilding the Tx scheduler tree for large queue counts
The current implementation of the Tx scheduler allows the tree to be
rebuilt as the user adds more Tx queues to the VSI. In such a case,
additional child nodes are added to the tree to support the new number
of queues.
Unfortunately, this algorithm does not take into account that the limit
of the VSI support node may be exceeded, so an additional node in the
VSI layer may be required to handle all the requested queues.

Such a scenario occurs when adding XDP Tx queues on machines with many
CPUs. Although the driver still respects the queue limit returned by
the FW, the Tx scheduler was unable to add those queues to its tree
and returned one of the errors below.

Such a scenario occurs when adding XDP Tx queues on machines with many
CPUs (e.g. at least 321 CPUs, if there is already 128 Tx/Rx queue pairs).
Although the driver still respects the queue limit returned by the FW,
the Tx scheduler was unable to add those queues to its tree and returned
the following errors:

     Failed VSI LAN queue config for XDP, error: -5
or:
     Failed to set LAN Tx queue context, error: -22

Fix this problem by extending the tree rebuild algorithm to check if the
current VSI node can support the requested number of queues. If it
cannot, create as many additional VSI support nodes as necessary to
handle all the required Tx queues. Symmetrically, adjust the VSI node
removal algorithm to remove all nodes associated with the given VSI.
Also, make the search for the next free VSI node more restrictive. That is,
add queue group nodes only to the VSI support nodes that have a matching
VSI handle.
Finally, fix the comment describing the tree update algorithm to better
reflect the current scenario.

Fixes: b0153fdd7e ("ice: update VSI config dynamically")
Reviewed-by: Dawid Osuchowski <dawid.osuchowski@linux.intel.com>
Reviewed-by: Przemek Kitszel <przemyslaw.kitszel@intel.com>
Signed-off-by: Michal Kubiak <michal.kubiak@intel.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Tested-by: Jesse Brandeburg <jbrandeburg@cloudflare.com>
Tested-by: Saritha Sanigani <sarithax.sanigani@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
2025-05-30 13:54:43 -07:00
..
devlink iidc/ice/irdma: Update IDC to support multiple consumers 2025-05-09 11:35:43 -07:00
ice.h Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux 2025-05-12 18:48:27 -07:00
ice_adapter.c ice: use DSN instead of PCI BDF for ice_adapter index 2025-05-06 18:27:14 -07:00
ice_adapter.h ice: use DSN instead of PCI BDF for ice_adapter index 2025-05-06 18:27:14 -07:00
ice_adminq_cmd.h ice: remove invalid parameter of equalizer 2025-01-24 10:49:42 -08:00
ice_arfs.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-03-13 23:08:11 +01:00
ice_arfs.h ice: use napi's irq affinity and rmap IRQ notifiers 2025-02-26 19:51:37 -08:00
ice_base.c ice: use napi's irq affinity and rmap IRQ notifiers 2025-02-26 19:51:37 -08:00
ice_base.h
ice_cgu_regs.h
ice_common.c ice: enable timesync operation on 2xNAC E825 devices 2025-04-11 10:46:37 -07:00
ice_common.h ice: do not add LLDP-specific filter if not necessary 2025-04-11 09:44:26 -07: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: Replace ice specific DSCP mapping num with a kernel define 2025-04-30 13:09:08 -07:00
ice_dcb.h
ice_dcb_lib.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux 2025-05-12 18:48:27 -07:00
ice_dcb_lib.h iidc/ice/irdma: Update IDC to support multiple consumers 2025-05-09 11:35:43 -07:00
ice_dcb_nl.c ice: Replace ice specific DSCP mapping num with a kernel define 2025-04-30 13:09:08 -07:00
ice_dcb_nl.h
ice_ddp.c ice: fix Get Tx Topology AQ command error on E830 2025-04-28 15:59:13 -07:00
ice_ddp.h ice: support optional flags in signature segment header 2024-11-13 10:30:09 -08:00
ice_debugfs.c
ice_devids.h
ice_dpll.c ice: dpll: Remove newline at the end of a netlink error message 2025-02-27 18:11:38 -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: enable LLDP TX for VFs through tc 2025-04-11 10:45:52 -07: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 Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux 2025-05-12 18:48:27 -07:00
ice_ethtool.h ice: remove invalid parameter of equalizer 2025-01-24 10:49:42 -08:00
ice_ethtool_fdir.c ice: make const read-only array dflt_rules static 2025-04-11 11:58:57 -07:00
ice_fdir.c
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_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_fwlog.c
ice_fwlog.h
ice_gnss.c ice: Don't check device type when checking GNSS presence 2025-02-10 08:52:04 -08:00
ice_gnss.h ice: Don't check device type when checking GNSS presence 2025-02-10 08:52:04 -08:00
ice_hw_autogen.h ice: Implement PTP support for E830 devices 2025-02-10 10:43:48 -08:00
ice_hwmon.c ice: use proper macro for testing bit 2024-07-03 19:36:52 -07:00
ice_hwmon.h
ice_idc.c iidc/ice/irdma: Update IDC to support multiple consumers 2025-05-09 11:35:43 -07:00
ice_idc_int.h iidc/ice/irdma: Break iidc.h into two headers 2025-04-30 13:09:08 -07:00
ice_irq.c ice: Fix signedness bug in ice_init_interrupt_scheme() 2025-02-14 17:18:00 -08:00
ice_irq.h ice: simplify VF MSI-X managing 2025-02-05 09:04:57 -08:00
ice_lag.c ice: Fix LACP bonds without SRIOV environment 2025-05-19 08:38:22 -07:00
ice_lag.h
ice_lan_tx_rx.h ice: Add E830 checksum offload support 2025-03-18 10:15:49 +01:00
ice_lib.c ice: receive LLDP on trusted VFs 2025-04-11 09:45:30 -07:00
ice_lib.h ice: receive LLDP on trusted VFs 2025-04-11 09:45:30 -07:00
ice_main.c ice: fix Tx scheduler error handling in XDP callback 2025-05-30 13:54:17 -07:00
ice_nvm.c
ice_nvm.h
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 net: ptp: introduce .supported_perout_flags to ptp_clock_info 2025-04-15 20:20:58 -07:00
ice_ptp.h ice: support Rx timestamp on flex descriptor 2025-02-14 10:57:45 -08:00
ice_ptp_consts.h ice: Refactor E825C PHY registers info struct 2025-03-18 10:15:49 +01:00
ice_ptp_hw.c ice: enable timesync operation on 2xNAC E825 devices 2025-04-11 10:46:37 -07:00
ice_ptp_hw.h ice: enable timesync operation on 2xNAC E825 devices 2025-04-11 10:46:37 -07:00
ice_repr.c ice: enable LLDP TX for VFs through tc 2025-04-11 10:45:52 -07: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: refactor ice_sbq_msg_dev enum 2025-04-11 10:46:37 -07:00
ice_sched.c ice: fix rebuilding the Tx scheduler tree for large queue counts 2025-05-30 13:54:43 -07:00
ice_sched.h
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 ice: receive LLDP on trusted VFs 2025-04-11 09:45:30 -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: fix check for existing switch rule 2025-04-11 09:32:31 -07:00
ice_switch.h ice: Remove unused members from switch API 2024-07-11 09:40:56 -07:00
ice_tc_lib.c ice: improve error message for insufficient filter space 2025-04-11 11:58:57 -07:00
ice_tc_lib.h ice: enable LLDP TX for VFs through tc 2025-04-11 10:45:52 -07: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: support egress drop rules on PF 2025-04-11 09:47:43 -07:00
ice_txrx.h ice: Add E830 checksum offload support 2025-03-18 10:15:49 +01:00
ice_txrx_lib.c ice: Add E830 checksum offload support 2025-03-18 10:15:49 +01: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 branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/linux 2025-05-12 18:48:27 -07:00
ice_vf_lib.c ice: receive LLDP on trusted VFs 2025-04-11 09:45:30 -07:00
ice_vf_lib.h ice: enable LLDP TX for VFs through tc 2025-04-11 10:45:52 -07:00
ice_vf_lib_private.h ice: Fix deinitializing VF in error path 2025-02-25 19:09:36 -08: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_vf_vsi_vlan_ops.h
ice_virtchnl.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2025-05-22 09:42:41 -07:00
ice_virtchnl.h ice: support Rx timestamp on flex descriptor 2025-02-14 10:57:45 -08:00
ice_virtchnl_allowlist.c ice: support Rx timestamp on flex descriptor 2025-02-14 10:57:45 -08:00
ice_virtchnl_allowlist.h
ice_virtchnl_fdir.c ice: Check VF VSI Pointer Value in ice_vc_add_fdir_fltr() 2025-04-28 15:59:13 -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 ice: use generic unrolled_count() macro 2025-02-10 17:54:43 -08:00
ice_xsk.h ice: use generic unrolled_count() macro 2025-02-10 17:54:43 -08:00
Makefile ice: add Tx hang devlink health reporter 2024-12-17 11:32:46 -08:00