Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net/mlx5e: set the tx_queue_len for pfifo_fast

By default, the mq netdev creates a pfifo_fast qdisc. On a
system with 16 core, the pfifo_fast with 3 bands consumes
16 * 3 * 8 (size of pointer) * 1024 (default tx queue len)
= 393KB. The patch sets the tx qlen to representor default
value, 128 (1<<MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE), which
consumes 16 * 3 * 8 * 128 = 49KB, saving 344KB for each
representor at ECPF.

Signed-off-by: William Tu <witu@nvidia.com>
Reviewed-by: Daniel Jurgens <danielj@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com>
Link: https://patch.msgid.link/20250209101716.112774-9-tariqt@nvidia.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>

authored by

William Tu and committed by
Jakub Kicinski
a38cc570 b9cc8f9d

+2
+2
drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
··· 889 889 netdev->ethtool_ops = &mlx5e_rep_ethtool_ops; 890 890 891 891 netdev->watchdog_timeo = 15 * HZ; 892 + if (mlx5_core_is_ecpf(mdev)) 893 + netdev->tx_queue_len = 1 << MLX5E_REP_PARAMS_DEF_LOG_SQ_SIZE; 892 894 893 895 #if IS_ENABLED(CONFIG_MLX5_CLS_ACT) 894 896 netdev->hw_features |= NETIF_F_HW_TC;