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 v2 1/4] devlink: don't do reporter recovery if the state is healthy
Date: Thu, 10 Oct 2019 15:18:48 +0200 [thread overview]
Message-ID: <20191010131851.21438-2-jiri@resnulli.us> (raw)
In-Reply-To: <20191010131851.21438-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
next prev parent reply other threads:[~2019-10-10 13:18 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-10 13:18 [patch net-next v2 0/4] netdevsim: add devlink health reporters suppor Jiri Pirko
2019-10-10 13:18 ` Jiri Pirko [this message]
2019-10-10 13:18 ` [patch net-next v2 2/4] devlink: propagate extack down to health reporter ops Jiri Pirko
2019-10-11 2:04 ` Jakub Kicinski
2019-10-11 6:13 ` Jiri Pirko
2019-10-11 6:45 ` Johannes Berg
2019-10-11 23:10 ` David Ahern
2019-10-10 13:18 ` [patch net-next v2 3/4] netdevsim: implement couple of testing devlink health reporters Jiri Pirko
2019-10-10 13:18 ` [patch net-next v2 4/4] selftests: add netdevsim devlink health tests Jiri Pirko
2019-10-12 4:05 ` [patch net-next v2 0/4] netdevsim: add devlink health reporters suppor 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=20191010131851.21438-2-jiri@resnulli.us \
--to=jiri@resnulli.us \
--cc=ayal@mellanox.com \
--cc=davem@davemloft.net \
--cc=eranbe@mellanox.com \
--cc=jakub.kicinski@netronome.com \
--cc=mlxsw@mellanox.com \
--cc=moshe@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).