All of lore.kernel.org
 help / color / mirror / Atom feed
From: Saeed Mahameed <saeedm@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	Eran Ben Elisha <eranbe@mellanox.com>,
	Saeed Mahameed <saeedm@mellanox.com>
Subject: [net 2/7] net/mlx5e: Always print health reporter message to dmesg
Date: Mon, 6 Jan 2020 23:36:25 +0000	[thread overview]
Message-ID: <20200106233248.58700-3-saeedm@mellanox.com> (raw)
In-Reply-To: <20200106233248.58700-1-saeedm@mellanox.com>

From: Eran Ben Elisha <eranbe@mellanox.com>

In case a reporter exists, error message is logged only to the devlink
tracer. The devlink tracer is a visibility utility only, which user can
choose not to monitor.
After cited patch, 3rd party monitoring tools that tracks these error
message will no longer find them in dmesg, causing a regression.

With this patch, error messages are also logged into the dmesg.

Fixes: c50de4af1d63 ("net/mlx5e: Generalize tx reporter's functionality")
Signed-off-by: Eran Ben Elisha <eranbe@mellanox.com>
Signed-off-by: Saeed Mahameed <saeedm@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlx5/core/en/health.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
index 1d6b58860da6..3a975641f902 100644
--- a/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
+++ b/drivers/net/ethernet/mellanox/mlx5/core/en/health.c
@@ -197,9 +197,10 @@ int mlx5e_health_report(struct mlx5e_priv *priv,
 			struct devlink_health_reporter *reporter, char *err_str,
 			struct mlx5e_err_ctx *err_ctx)
 {
-	if (!reporter) {
-		netdev_err(priv->netdev, err_str);
+	netdev_err(priv->netdev, err_str);
+
+	if (!reporter)
 		return err_ctx->recover(&err_ctx->ctx);
-	}
+
 	return devlink_health_report(reporter, err_str, err_ctx);
 }
-- 
2.24.1


  parent reply	other threads:[~2020-01-06 23:36 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-06 23:36 [pull request][net 0/7] Mellanox, mlx5 fixes 2020-01-06 Saeed Mahameed
2020-01-06 23:36 ` [net 1/7] net/mlx5e: Avoid duplicating rule destinations Saeed Mahameed
2020-01-06 23:36 ` Saeed Mahameed [this message]
2020-01-06 23:36 ` [net 3/7] net/mlx5: Move devlink registration before interfaces load Saeed Mahameed
2020-01-06 23:36 ` [net 4/7] Revert "net/mlx5: Support lockless FTE read lookups" Saeed Mahameed
2020-01-06 23:36 ` [net 5/7] net/mlx5: DR, No need for atomic refcount for internal SW steering resources Saeed Mahameed
2020-01-06 23:36 ` [net 6/7] net/mlx5e: Fix hairpin RSS table size Saeed Mahameed
2020-01-06 23:36 ` [net 7/7] net/mlx5: DR, Init lists that are used in rule's member Saeed Mahameed
2020-01-07  2:28 ` [pull request][net 0/7] Mellanox, mlx5 fixes 2020-01-06 David Miller

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=20200106233248.58700-3-saeedm@mellanox.com \
    --to=saeedm@mellanox.com \
    --cc=davem@davemloft.net \
    --cc=eranbe@mellanox.com \
    --cc=netdev@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.