> -----Original Message----- > From: Intel-wired-lan <[email protected]> On Behalf Of > Michal Kubiak > Sent: Tuesday, May 13, 2025 4:25 PM > To: [email protected] > Cc: Fijalkowski, Maciej <[email protected]>; Lobakin, Aleksander > <[email protected]>; Kitszel, Przemyslaw > <[email protected]>; [email protected]; Keller, > Jacob E <[email protected]>; Brandeburg, Jesse > <[email protected]>; [email protected]; Kubiak, Michal > <[email protected]> > Subject: [Intel-wired-lan] [PATCH iwl-net v3 3/3] 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: b0153fdd7e8a ("ice: update VSI config dynamically") > Reviewed-by: Dawid Osuchowski <[email protected]> > Reviewed-by: Przemek Kitszel <[email protected]> > Signed-off-by: Michal Kubiak <[email protected]> > --- > drivers/net/ethernet/intel/ice/ice_sched.c | 170 +++++++++++++++++---- > 1 file changed, 142 insertions(+), 28 deletions(-) >
Tested-by: Saritha Sanigani <[email protected]> (A Contingent Worker at Intel)
