ACK: [PATCH 1/1] devlink: don't do reporter recovery if the state is healthy
Colin Ian King
colin.king at canonical.com
Thu Feb 18 09:23:20 UTC 2021
On 17/02/2021 21:51, Jeff Lane wrote:
> From: Jiri Pirko <jiri at 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 at mellanox.com>
> Signed-off-by: David S. Miller <davem at davemloft.net>
> (cherry picked from commit 402818205c9ecdfd922fdfa58fb113f60fdda523)
> Signed-off-by: Jeff Lane <jeffrey.lane at 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 at canonical.com>
More information about the kernel-team
mailing list