> -----Original Message-----
> From: Intel-wired-lan <[email protected]> On Behalf Of
> Alexander Lobakin
> Sent: Tuesday, August 26, 2025 9:25 PM
> To: [email protected]
> Cc: Lobakin, Aleksander <[email protected]>; Kubiak, Michal
> <[email protected]>; Fijalkowski, Maciej
> <[email protected]>; Nguyen, Anthony L
> <[email protected]>; Kitszel, Przemyslaw
> <[email protected]>; Andrew Lunn <[email protected]>;
> David S. Miller <[email protected]>; Eric Dumazet
> <[email protected]>; Jakub Kicinski <[email protected]>; Paolo Abeni
> <[email protected]>; Alexei Starovoitov <[email protected]>; Daniel
> Borkmann <[email protected]>; Simon Horman <[email protected]>;
> NXNE CNSE OSDT ITP Upstreaming
> <[email protected]>; [email protected];
> [email protected]; [email protected]
> Subject: [Intel-wired-lan] [PATCH iwl-next v5 03/13] idpf: use a saner limit 
> for
> default number of queues to allocate
> 
> Currently, the maximum number of queues available for one vport is 16.
> This is hardcoded, but then the function calculating the optimal number of
> queues takes min(16, num_online_cpus()).
> In order to be able to allocate more queues, which will be then used for XDP,
> stop hardcoding 16 and rely on what the device gives us[*]. Instead of
> num_online_cpus(), which is considered suboptimal since at least 2013, use
> netif_get_num_default_rss_queues() to still have free queues in the pool.
> 
> [*] With the note:
> 
> Currently, idpf always allocates `IDPF_MAX_BUFQS_PER_RXQ_GRP` (== 2)
> buffer queues for each Rx queue and one completion queue for each Tx for
> best performance. But there was no check whether such number is availabe,
> IOW the assumption was not backed by any "harmonizing" / actual checks.
> Fix this while at it.
> 
> nr_cpu_ids number of Tx queues are needed only for lockless XDP sending,
> the regular stack doesn't benefit from that anyhow.
> On a 128-thread Xeon, this now gives me 32 regular Tx queues and leaves
> 224 free for XDP (128 of which will handle XDP_TX, .ndo_xdp_xmit(), and XSk
> xmit when enabled).
> 
> Note 2:
> 
> Unfortunately, some CP/FW versions are not able to
> reconfigure/enable/disable large amount of queues within the minimum
> timeout (2 seconds). For now, fall back to the default timeout for every
> operation until this is resolved.
> 
> Signed-off-by: Alexander Lobakin <[email protected]>
> ---
>  .../net/ethernet/intel/idpf/idpf_virtchnl.h   |  1 -
>  drivers/net/ethernet/intel/idpf/idpf_txrx.c   |  8 +--
>  .../net/ethernet/intel/idpf/idpf_virtchnl.c   | 62 +++++++++++--------
>  3 files changed, 38 insertions(+), 33 deletions(-)
> 
Tested-by: R,Ramu <[email protected]>

Reply via email to