You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
90 lines
3.0 KiB
90 lines
3.0 KiB
From 0da733b2b08fa6c3c9036b1b45ed8fcbc50727ef Mon Sep 17 00:00:00 2001
|
|
From: Alaa Hleihel <ahleihel@redhat.com>
|
|
Date: Sun, 10 May 2020 14:51:48 -0400
|
|
Subject: [PATCH 024/312] [netdrv] net/mlx5e: Extend tx diagnose function
|
|
|
|
Message-id: <20200510145245.10054-26-ahleihel@redhat.com>
|
|
Patchwork-id: 306566
|
|
Patchwork-instance: patchwork
|
|
O-Subject: [RHEL8.3 BZ 1789378 v2 25/82] net/mlx5e: Extend tx diagnose function
|
|
Bugzilla: 1790198 1789378
|
|
RH-Acked-by: Kamal Heib <kheib@redhat.com>
|
|
RH-Acked-by: Jarod Wilson <jarod@redhat.com>
|
|
RH-Acked-by: Tony Camuso <tcamuso@redhat.com>
|
|
RH-Acked-by: Jonathan Toppins <jtoppins@redhat.com>
|
|
|
|
Bugzilla: http://bugzilla.redhat.com/1789378
|
|
Bugzilla: http://bugzilla.redhat.com/1790198
|
|
Upstream: v5.4-rc1
|
|
|
|
commit dd921fd24179e51fc8d8d7bd7978f369da5ba34a
|
|
Author: Aya Levin <ayal@mellanox.com>
|
|
Date: Mon Jun 24 21:41:21 2019 +0300
|
|
|
|
net/mlx5e: Extend tx diagnose function
|
|
|
|
The following patches in the set enhance the diagnostics info of tx
|
|
reporter. Therefore, it is better to pass a pointer to the SQ for
|
|
further data extraction.
|
|
|
|
Signed-off-by: Aya Levin <ayal@mellanox.com>
|
|
Reviewed-by: Tariq Toukan <tariqt@mellanox.com>
|
|
Acked-by: Jiri Pirko <jiri@mellanox.com>
|
|
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
|
|
|
|
Signed-off-by: Alaa Hleihel <ahleihel@redhat.com>
|
|
Signed-off-by: Frantisek Hrbata <fhrbata@redhat.com>
|
|
---
|
|
.../net/ethernet/mellanox/mlx5/core/en/reporter_tx.c | 20 ++++++++++----------
|
|
1 file changed, 10 insertions(+), 10 deletions(-)
|
|
|
|
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
|
|
index 6f9f42ab3005..b9429ff8d9c4 100644
|
|
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
|
|
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/reporter_tx.c
|
|
@@ -146,15 +146,22 @@ static int mlx5e_tx_reporter_recover(struct devlink_health_reporter *reporter,
|
|
|
|
static int
|
|
mlx5e_tx_reporter_build_diagnose_output(struct devlink_fmsg *fmsg,
|
|
- u32 sqn, u8 state, bool stopped)
|
|
+ struct mlx5e_txqsq *sq)
|
|
{
|
|
+ struct mlx5e_priv *priv = sq->channel->priv;
|
|
+ bool stopped = netif_xmit_stopped(sq->txq);
|
|
+ u8 state;
|
|
int err;
|
|
|
|
+ err = mlx5_core_query_sq_state(priv->mdev, sq->sqn, &state);
|
|
+ if (err)
|
|
+ return err;
|
|
+
|
|
err = devlink_fmsg_obj_nest_start(fmsg);
|
|
if (err)
|
|
return err;
|
|
|
|
- err = devlink_fmsg_u32_pair_put(fmsg, "sqn", sqn);
|
|
+ err = devlink_fmsg_u32_pair_put(fmsg, "sqn", sq->sqn);
|
|
if (err)
|
|
return err;
|
|
|
|
@@ -191,15 +198,8 @@ static int mlx5e_tx_reporter_diagnose(struct devlink_health_reporter *reporter,
|
|
for (i = 0; i < priv->channels.num * priv->channels.params.num_tc;
|
|
i++) {
|
|
struct mlx5e_txqsq *sq = priv->txq2sq[i];
|
|
- u8 state;
|
|
-
|
|
- err = mlx5_core_query_sq_state(priv->mdev, sq->sqn, &state);
|
|
- if (err)
|
|
- goto unlock;
|
|
|
|
- err = mlx5e_tx_reporter_build_diagnose_output(fmsg, sq->sqn,
|
|
- state,
|
|
- netif_xmit_stopped(sq->txq));
|
|
+ err = mlx5e_tx_reporter_build_diagnose_output(fmsg, sq);
|
|
if (err)
|
|
goto unlock;
|
|
}
|
|
--
|
|
2.13.6
|
|
|