Message ID | 20210217215128.17904-2-jeffrey.lane@canonical.com |
---|---|
State | New |
Headers | show |
Series | devlink: don't do reporter recovery if the state is healthy | expand |
On 17.02.21 22:51, Jeff Lane wrote: > From: Jiri Pirko <jiri@mellanox.com> > > BugLink: https://bugs.launchpad.net/bugs/1915403 > > 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> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit 402818205c9ecdfd922fdfa58fb113f60fdda523) > Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com> Acked-by: Stefan Bader <stefan.bader@canonical.com> > --- > net/core/devlink.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/core/devlink.c b/net/core/devlink.c > index e422971b7874..09eb3e69a350 100644 > --- a/net/core/devlink.c > +++ b/net/core/devlink.c > @@ -4766,6 +4766,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; > >
On 17/02/2021 21:51, Jeff Lane wrote: > From: Jiri Pirko <jiri@mellanox.com> > > BugLink: https://bugs.launchpad.net/bugs/1915403 > > 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> > Signed-off-by: David S. Miller <davem@davemloft.net> > (cherry picked from commit 402818205c9ecdfd922fdfa58fb113f60fdda523) > Signed-off-by: Jeff Lane <jeffrey.lane@canonical.com> > --- > net/core/devlink.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/net/core/devlink.c b/net/core/devlink.c > index e422971b7874..09eb3e69a350 100644 > --- a/net/core/devlink.c > +++ b/net/core/devlink.c > @@ -4766,6 +4766,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; > > Acked-by: Colin Ian King <colin.king@canonical.com>
diff --git a/net/core/devlink.c b/net/core/devlink.c index e422971b7874..09eb3e69a350 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4766,6 +4766,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;