public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Jiri Pirko <jiri@resnulli•us>
To: netdev@vger•kernel.org
Cc: davem@davemloft•net, jakub.kicinski@netronome•com,
	ayal@mellanox•com, moshe@mellanox•com, eranbe@mellanox•com,
	mlxsw@mellanox•com
Subject: [patch net-next 1/4] devlink: don't do reporter recovery if the state is healthy
Date: Wed,  9 Oct 2019 13:04:42 +0200	[thread overview]
Message-ID: <20191009110445.23237-2-jiri@resnulli.us> (raw)
In-Reply-To: <20191009110445.23237-1-jiri@resnulli.us>

From: Jiri Pirko <jiri@mellanox•com>

If reporter state is healthy, don't call into a driver for recover and
don't increase recovery count.

Signed-off-by: Jiri Pirko <jiri@mellanox•com>
---
 net/core/devlink.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/net/core/devlink.c b/net/core/devlink.c
index eb0a22f05887..95887462eecf 100644
--- a/net/core/devlink.c
+++ b/net/core/devlink.c
@@ -4851,6 +4851,9 @@ devlink_health_reporter_recover(struct devlink_health_reporter *reporter,
 {
 	int err;
 
+	if (reporter->health_state == DEVLINK_HEALTH_REPORTER_STATE_HEALTHY)
+		return 0;
+
 	if (!reporter->ops->recover)
 		return -EOPNOTSUPP;
 
-- 
2.21.0


  reply	other threads:[~2019-10-09 11:04 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-10-09 11:04 [patch net-next 0/4] netdevsim: add devlink health reporters support Jiri Pirko
2019-10-09 11:04 ` Jiri Pirko [this message]
2019-10-09 11:04 ` [patch net-next 2/4] devlink: propagate extack down to health reporter ops Jiri Pirko
2019-10-10  3:38   ` Jakub Kicinski
2019-10-10  8:07     ` Jiri Pirko
2019-10-10 16:09       ` Jakub Kicinski
2019-10-09 11:04 ` [patch net-next 3/4] netdevsim: implement couple of testing devlink health reporters Jiri Pirko
2019-10-10  3:53   ` Jakub Kicinski
2019-10-10  8:09     ` Jiri Pirko
2019-10-09 11:04 ` [patch net-next 4/4] selftests: add netdevsim devlink health tests Jiri Pirko

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=20191009110445.23237-2-jiri@resnulli.us \
    --to=jiri@resnulli$(echo .)us \
    --cc=ayal@mellanox$(echo .)com \
    --cc=davem@davemloft$(echo .)net \
    --cc=eranbe@mellanox$(echo .)com \
    --cc=jakub.kicinski@netronome$(echo .)com \
    --cc=mlxsw@mellanox$(echo .)com \
    --cc=moshe@mellanox$(echo .)com \
    --cc=netdev@vger$(echo .)kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox