mirror of
https://github.com/torvalds/linux.git
synced 2026-06-04 04:23:35 +02:00
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>
This commit is contained in:
parent
71670f766b
commit
5474ca2118
|
|
@ -311,6 +311,30 @@ mlx5e_tx_reporter_diagnose_common_config(struct devlink_health_reporter *reporte
|
|||
mlx5e_health_fmsg_named_obj_nest_end(fmsg);
|
||||
}
|
||||
|
||||
static void
|
||||
mlx5e_tx_reporter_diagnose_tis_config(struct devlink_health_reporter *reporter,
|
||||
struct devlink_fmsg *fmsg)
|
||||
{
|
||||
struct mlx5e_priv *priv = devlink_health_reporter_priv(reporter);
|
||||
u8 num_tc = mlx5e_get_dcb_num_tc(&priv->channels.params);
|
||||
u32 tc, i, tisn;
|
||||
|
||||
devlink_fmsg_arr_pair_nest_start(fmsg, "TIS Config");
|
||||
for (i = 0; i < mlx5e_get_num_lag_ports(priv->mdev); i++) {
|
||||
for (tc = 0; tc < num_tc; tc++) {
|
||||
tisn = mlx5e_profile_get_tisn(priv->mdev, priv,
|
||||
priv->profile, i, tc);
|
||||
|
||||
devlink_fmsg_obj_nest_start(fmsg);
|
||||
devlink_fmsg_u32_pair_put(fmsg, "lag port", i);
|
||||
devlink_fmsg_u32_pair_put(fmsg, "tc", tc);
|
||||
devlink_fmsg_u32_pair_put(fmsg, "tisn", tisn);
|
||||
devlink_fmsg_obj_nest_end(fmsg);
|
||||
}
|
||||
}
|
||||
devlink_fmsg_arr_pair_nest_end(fmsg);
|
||||
}
|
||||
|
||||
static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
|
||||
struct devlink_fmsg *fmsg,
|
||||
struct netlink_ext_ack *extack)
|
||||
|
|
@ -326,6 +350,7 @@ static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
|
|||
goto unlock;
|
||||
|
||||
mlx5e_tx_reporter_diagnose_common_config(reporter, fmsg);
|
||||
mlx5e_tx_reporter_diagnose_tis_config(reporter, fmsg);
|
||||
devlink_fmsg_arr_pair_nest_start(fmsg, "SQs");
|
||||
|
||||
for (i = 0; i < priv->channels.num; i++) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user