Skip to content

Commit 5474ca2

Browse files
Feng Liukuba-moo
authored andcommitted
net/mlx5e: Expose TIS via devlink tx reporter diagnose
Underneath "TIS Config" tag expose TIS diagnostic information. Expose the tisn of each TC under each lag port. $ sudo devlink health diagnose auxiliary/mlx5_core.eth.2/131072 reporter tx ...... TIS Config: lag port: 0 tc: 0 tisn: 0 lag port: 1 tc: 0 tisn: 8 ...... Signed-off-by: Feng Liu <feliu@nvidia.com> Reviewed-by: Aya Levin <ayal@nvidia.com> Signed-off-by: Tariq Toukan <tariqt@nvidia.com> Reviewed-by: Michal Swiatkowski <michal.swiatkowski@linux.intel.com> Link: https://patch.msgid.link/1753194228-333722-3-git-send-email-tariqt@nvidia.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent 71670f7 commit 5474ca2

1 file changed

Lines changed: 25 additions & 0 deletions

File tree

drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -311,6 +311,30 @@ mlx5e_tx_reporter_diagnose_common_config(struct devlink_health_reporter *reporte
311311
mlx5e_health_fmsg_named_obj_nest_end(fmsg);
312312
}
313313

314+
static void
315+
mlx5e_tx_reporter_diagnose_tis_config(struct devlink_health_reporter *reporter,
316+
struct devlink_fmsg *fmsg)
317+
{
318+
struct mlx5e_priv *priv = devlink_health_reporter_priv(reporter);
319+
u8 num_tc = mlx5e_get_dcb_num_tc(&priv->channels.params);
320+
u32 tc, i, tisn;
321+
322+
devlink_fmsg_arr_pair_nest_start(fmsg, "TIS Config");
323+
for (i = 0; i < mlx5e_get_num_lag_ports(priv->mdev); i++) {
324+
for (tc = 0; tc < num_tc; tc++) {
325+
tisn = mlx5e_profile_get_tisn(priv->mdev, priv,
326+
priv->profile, i, tc);
327+
328+
devlink_fmsg_obj_nest_start(fmsg);
329+
devlink_fmsg_u32_pair_put(fmsg, "lag port", i);
330+
devlink_fmsg_u32_pair_put(fmsg, "tc", tc);
331+
devlink_fmsg_u32_pair_put(fmsg, "tisn", tisn);
332+
devlink_fmsg_obj_nest_end(fmsg);
333+
}
334+
}
335+
devlink_fmsg_arr_pair_nest_end(fmsg);
336+
}
337+
314338
static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
315339
struct devlink_fmsg *fmsg,
316340
struct netlink_ext_ack *extack)
@@ -326,6 +350,7 @@ static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
326350
goto unlock;
327351

328352
mlx5e_tx_reporter_diagnose_common_config(reporter, fmsg);
353+
mlx5e_tx_reporter_diagnose_tis_config(reporter, fmsg);
329354
devlink_fmsg_arr_pair_nest_start(fmsg, "SQs");
330355

331356
for (i = 0; i < priv->channels.num; i++) {

0 commit comments

Comments
 (0)