Re: [PATCH net-next 05/16] devlink: Add remote reload stats

From: Jakub Kicinski
Date: Thu Oct 01 2020 - 17:48:27 EST


On Thu, 1 Oct 2020 16:59:08 +0300 Moshe Shemesh wrote:
> Add remote reload stats to hold the history of actions performed due
> devlink reload commands initiated by remote host. For example, in case
> firmware activation with reset finished successfully but was initiated
> by remote host.
>
> The function devlink_remote_reload_actions_performed() is exported to
> enable drivers update on remote reload actions performed as it was not
> initiated by their own devlink instance.
>
> Expose devlink remote reload stats to the user through devlink dev get
> command.

Reviewed-by: Jakub Kicinski <kuba@xxxxxxxxxx>

> for (i = 0; i <= DEVLINK_RELOAD_ACTION_MAX; i++) {
> - if (!devlink_reload_action_is_supported(devlink, i) ||
> + if ((!is_remote && !devlink_reload_action_is_supported(devlink, i))

I see the point of these checks now, I guess it would have been cleaner
if they were added in this patch, but no big deal.