[2/2] net/mlx5: apply default tuning to future speeds
Checks
Commit Message
Some default parameters for number of queues and ring size
are different starting with 100G speed capability.
Instead of checking all speed above 100G, make sure it is applied
for any speed capability newer than 100G (including 400G for instance).
Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
---
drivers/net/mlx5/mlx5_ethdev.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
Comments
> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday, March 5, 2024 14:13
> To: dev@dpdk.org
> Cc: Dariusz Sosnowski <dsosnowski@nvidia.com>; Slava Ovsiienko
> <viacheslavo@nvidia.com>; Ori Kam <orika@nvidia.com>; Suanming Mou
> <suanmingm@nvidia.com>; Matan Azrad <matan@nvidia.com>
> Subject: [PATCH 2/2] net/mlx5: apply default tuning to future speeds
>
> External email: Use caution opening links or attachments
>
>
> Some default parameters for number of queues and ring size are different
> starting with 100G speed capability.
>
> Instead of checking all speed above 100G, make sure it is applied for any speed
> capability newer than 100G (including 400G for instance).
>
> Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Dariusz Sosnowski <dsosnowski@nvidia.com>
Best regards,
Dariusz Sosnowski
@@ -242,8 +242,8 @@ mlx5_set_default_params(struct rte_eth_dev *dev, struct rte_eth_dev_info *info)
info->default_txportconf.ring_size = 256;
info->default_rxportconf.burst_size = MLX5_RX_DEFAULT_BURST;
info->default_txportconf.burst_size = MLX5_TX_DEFAULT_BURST;
- if ((priv->link_speed_capa & RTE_ETH_LINK_SPEED_200G) |
- (priv->link_speed_capa & RTE_ETH_LINK_SPEED_100G)) {
+ if (priv->link_speed_capa >> rte_bsf32(RTE_ETH_LINK_SPEED_100G)) {
+ /* if supports at least 100G */
info->default_rxportconf.nb_queues = 16;
info->default_txportconf.nb_queues = 16;
if (dev->data->nb_rx_queues > 2 ||