From: Tariq Toukan <tariqt@nvidia.com>
To: Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>
Cc: Saeed Mahameed <saeedm@nvidia.com>,
Leon Romanovsky <leon@kernel.org>,
Tariq Toukan <tariqt@nvidia.com>, Mark Bloch <mbloch@nvidia.com>,
<netdev@vger.kernel.org>, <linux-rdma@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Gal Pressman <gal@nvidia.com>,
Moshe Shemesh <moshe@nvidia.com>,
Carolina Jubran <cjubran@nvidia.com>
Subject: [PATCH net-next V2 3/7] net/mlx5: Improve QoS error messages with actual depth values
Date: Mon, 29 Sep 2025 00:25:19 +0300 [thread overview]
Message-ID: <1759094723-843774-4-git-send-email-tariqt@nvidia.com> (raw)
In-Reply-To: <1759094723-843774-1-git-send-email-tariqt@nvidia.com>
From: Carolina Jubran <cjubran@nvidia.com>
Enhance error messages in MLX5 QoS scheduling depth validation by
including the actual values that caused the validation to fail.
Suggested-by: Paolo Abeni <pabeni@redhat.com>
Signed-off-by: Carolina Jubran <cjubran@nvidia.com>
Reviewed-by: Cosmin Ratiu <cratiu@nvidia.com>
Signed-off-by: Tariq Toukan <tariqt@nvidia.com>
---
drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c | 15 +++++++++------
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
index 5f2d6c35f1ad..56e6f54b1e2e 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c
@@ -971,8 +971,9 @@ esw_qos_vport_tc_enable(struct mlx5_vport *vport, enum sched_node_type type,
max_level = 1 << MLX5_CAP_QOS(vport_node->esw->dev,
log_esw_max_sched_depth);
if (new_level > max_level) {
- NL_SET_ERR_MSG_MOD(extack,
- "TC arbitration on leafs is not supported beyond max scheduling depth");
+ NL_SET_ERR_MSG_FMT_MOD(extack,
+ "TC arbitration on leafs is not supported beyond max depth %d",
+ max_level);
return -EOPNOTSUPP;
}
}
@@ -1444,8 +1445,9 @@ static int esw_qos_node_enable_tc_arbitration(struct mlx5_esw_sched_node *node,
new_level = node->level + 1;
max_level = 1 << MLX5_CAP_QOS(node->esw->dev, log_esw_max_sched_depth);
if (new_level > max_level) {
- NL_SET_ERR_MSG_MOD(extack,
- "TC arbitration on nodes is not supported beyond max scheduling depth");
+ NL_SET_ERR_MSG_FMT_MOD(extack,
+ "TC arbitration on nodes is not supported beyond max depth %d",
+ max_level);
return -EOPNOTSUPP;
}
@@ -1997,8 +1999,9 @@ mlx5_esw_qos_node_validate_set_parent(struct mlx5_esw_sched_node *node,
max_level = 1 << MLX5_CAP_QOS(node->esw->dev, log_esw_max_sched_depth);
if (new_level > max_level) {
- NL_SET_ERR_MSG_MOD(extack,
- "Node hierarchy depth exceeds the maximum supported level");
+ NL_SET_ERR_MSG_FMT_MOD(extack,
+ "Node hierarchy depth %d exceeds the maximum supported level %d",
+ new_level, max_level);
return -EOPNOTSUPP;
}
--
2.31.1
next prev parent reply other threads:[~2025-09-28 21:26 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-28 21:25 [PATCH net-next V2 0/7] net/mlx5: misc changes 2025-09-28 Tariq Toukan
2025-09-28 21:25 ` [PATCH net-next V2 1/7] net/mlx5: HWS, Generalize complex matchers Tariq Toukan
2025-09-28 21:25 ` [PATCH net-next V2 2/7] net/mlx5e: Prevent entering switchdev mode with inconsistent netns Tariq Toukan
2025-09-28 21:25 ` Tariq Toukan [this message]
2025-09-28 21:25 ` [PATCH net-next V2 4/7] net/mlx5e: Remove unused mdev param from RSS indir init Tariq Toukan
2025-09-28 21:25 ` [PATCH net-next V2 5/7] net/mlx5e: Introduce mlx5e_rss_init_params Tariq Toukan
2025-09-28 21:25 ` [PATCH net-next V2 6/7] net/mlx5e: Introduce mlx5e_rss_params for RSS configuration Tariq Toukan
2025-09-28 21:25 ` [PATCH net-next V2 7/7] net/mlx5e: Use extack in set rxfh callback Tariq Toukan
2025-10-01 0:30 ` [PATCH net-next V2 0/7] net/mlx5: misc changes 2025-09-28 patchwork-bot+netdevbpf
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=1759094723-843774-4-git-send-email-tariqt@nvidia.com \
--to=tariqt@nvidia.com \
--cc=andrew+netdev@lunn.ch \
--cc=cjubran@nvidia.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=gal@nvidia.com \
--cc=kuba@kernel.org \
--cc=leon@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=mbloch@nvidia.com \
--cc=moshe@nvidia.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=saeedm@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).