Skip to content

Commit 33dbaa5

Browse files
cjubrankuba-moo
authored andcommitted
net/mlx5: Improve QoS error messages with actual depth values
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> Link: https://patch.msgid.link/1759094723-843774-4-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 06fdc45 commit 33dbaa5

1 file changed

Lines changed: 9 additions & 6 deletions

File tree

  • drivers/net/ethernet/mellanox/mlx5/core/esw

drivers/net/ethernet/mellanox/mlx5/core/esw/qos.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -971,8 +971,9 @@ esw_qos_vport_tc_enable(struct mlx5_vport *vport, enum sched_node_type type,
971971
max_level = 1 << MLX5_CAP_QOS(vport_node->esw->dev,
972972
log_esw_max_sched_depth);
973973
if (new_level > max_level) {
974-
NL_SET_ERR_MSG_MOD(extack,
975-
"TC arbitration on leafs is not supported beyond max scheduling depth");
974+
NL_SET_ERR_MSG_FMT_MOD(extack,
975+
"TC arbitration on leafs is not supported beyond max depth %d",
976+
max_level);
976977
return -EOPNOTSUPP;
977978
}
978979
}
@@ -1444,8 +1445,9 @@ static int esw_qos_node_enable_tc_arbitration(struct mlx5_esw_sched_node *node,
14441445
new_level = node->level + 1;
14451446
max_level = 1 << MLX5_CAP_QOS(node->esw->dev, log_esw_max_sched_depth);
14461447
if (new_level > max_level) {
1447-
NL_SET_ERR_MSG_MOD(extack,
1448-
"TC arbitration on nodes is not supported beyond max scheduling depth");
1448+
NL_SET_ERR_MSG_FMT_MOD(extack,
1449+
"TC arbitration on nodes is not supported beyond max depth %d",
1450+
max_level);
14491451
return -EOPNOTSUPP;
14501452
}
14511453

@@ -1997,8 +1999,9 @@ mlx5_esw_qos_node_validate_set_parent(struct mlx5_esw_sched_node *node,
19971999

19982000
max_level = 1 << MLX5_CAP_QOS(node->esw->dev, log_esw_max_sched_depth);
19992001
if (new_level > max_level) {
2000-
NL_SET_ERR_MSG_MOD(extack,
2001-
"Node hierarchy depth exceeds the maximum supported level");
2002+
NL_SET_ERR_MSG_FMT_MOD(extack,
2003+
"Node hierarchy depth %d exceeds the maximum supported level %d",
2004+
new_level, max_level);
20022005
return -EOPNOTSUPP;
20032006
}
20042007

0 commit comments

Comments
 (0)