From: Thomas Monjalon <thomas@monjalon.net>
To: dev@dpdk.org
Cc: Dariusz Sosnowski <dsosnowski@nvidia.com>,
Viacheslav 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
Date: Tue, 5 Mar 2024 14:12:41 +0100 [thread overview]
Message-ID: <20240305131241.3132128-2-thomas@monjalon.net> (raw)
In-Reply-To: <20240305131241.3132128-1-thomas@monjalon.net>
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(-)
diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c
index fb6d9d28ba..aea799341c 100644
--- a/drivers/net/mlx5/mlx5_ethdev.c
+++ b/drivers/net/mlx5/mlx5_ethdev.c
@@ -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 ||
--
2.43.0
next prev parent reply other threads:[~2024-03-05 13:13 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-05 13:12 [PATCH 1/2] net/mlx5: update speed capabilities parsing on Linux Thomas Monjalon
2024-03-05 13:12 ` Thomas Monjalon [this message]
2024-03-05 17:06 ` [PATCH 2/2] net/mlx5: apply default tuning to future speeds Dariusz Sosnowski
2024-03-05 17:05 ` [PATCH 1/2] net/mlx5: update speed capabilities parsing on Linux Dariusz Sosnowski
2024-03-13 9:24 ` Raslan Darawsheh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240305131241.3132128-2-thomas@monjalon.net \
--to=thomas@monjalon.net \
--cc=dev@dpdk.org \
--cc=dsosnowski@nvidia.com \
--cc=matan@nvidia.com \
--cc=orika@nvidia.com \
--cc=suanmingm@nvidia.com \
--cc=viacheslavo@nvidia.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).