Re: [PATCH net-next RFC v2 01/13] devlink: Add reload action option to devlink reload command

From: Jakub Kicinski
Date: Mon Aug 17 2020 - 13:42:16 EST


On Mon, 17 Aug 2020 12:37:40 +0300 Moshe Shemesh wrote:
> Add devlink reload action to allow the user to request a specific reload
> action. The action parameter is optional, if not specified then devlink
> driver re-init action is used (backward compatible).
> Note that when required to do firmware activation some drivers may need
> to reload the driver. On the other hand some drivers may need to reset
> the firmware to reinitialize the driver entities.

See, this is why I wanted to keep --live as a separate option.
Normally the driver is okay to satisfy more actions than requested,
e.g. activate FW even if only driver_reinit was requested.

fw_live_patch does not have this semantics, it explicitly requires
driver to not impact connectivity much. No "can do more resets than
requested" here. Hence the --live part would be better off as a
separate argument (at least in uAPI, the in-kernel interface we can
change later if needed).

> Reload actions supported are:
> driver_reinit: driver entities re-initialization, applying devlink-param
> and devlink-resource values.
> fw_activate: firmware activate.
> fw_live_patch: firmware live patching.