Skip to content

devlink: add dry run support for flash update

Jacob Keller netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 12 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4ice: move and rename ice_check_for_pending_updatedrivers/net/ethernet/intel/ice/ice_devlink.c drivers/net/ethernet/intel/ice/ice_fw_update.c drivers/net/ethernet/intel/ice/ice_fw_update.h+79 -790 replies
2/4ice: move ice_devlink_flash_update and merge with ice_flash_pldm_imagedrivers/net/ethernet/intel/ice/ice_devlink.c drivers/net/ethernet/intel/ice/ice_fw_update.c drivers/net/ethernet/intel/ice/ice_fw_update.h+41 -870 replies
3/4devlink: add dry run attribute to flash updateinclude/net/devlink.h include/uapi/linux/devlink.h net/core/devlink.c+22 -10 replies
4/4ice: support dry run of a flash update to validate firmware fileDocumentation/driver-api/pldmfw/index.rst drivers/net/ethernet/intel/ice/ice_devlink.c drivers/net/ethernet/intel/ice/ice_fw_update.c +2 more+40 -50 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [net-next 0/4] devlink: add dry run support for flash update

This is an implementation of a previous idea I had discussed on the list at
https://lore.kernel.org/netdev/[email protected]/

The idea is to allow user space to query whether a given destructive devlink command would work without actually performing any actions. This is commonly referred to as a "dry run", and is intended to give tools and system administrators the ability to test things like flash image validity, or whether a given option is valid without having to risk performing the update when not sufficiently ready.

The intention is that all "destructive" commands can be updated to support the new DEVLINK_ATTR_DRY_RUN, although this series only implements it for flash update.

I expect we would want to support this for commands such as reload as well as other commands which perform some action with no interface to check state before hand.

I tried to implement the DRY_RUN checks along with useful extended ACK messages so that even if a driver does not support DRY_RUN, some useful information can be retrieved. (i.e. the stack indicates that flash update is supported and will validate the other attributes first before rejecting the command due to inability to fully validate the run within the driver).

Jacob Keller (4):
ice: move and rename ice_check_for_pending_update
ice: move ice_devlink_flash_update and merge with ice_flash_pldm_image
devlink: add dry run attribute to flash update
ice: support dry run of a flash update to validate firmware file

 Documentation/driver-api/pldmfw/index.rst     |  10 ++
 drivers/net/ethernet/intel/ice/ice_devlink.c  |  53 +-----
 .../net/ethernet/intel/ice/ice_fw_update.c    | 170 ++++++++++--------
 .../net/ethernet/intel/ice/ice_fw_update.h    |   7 +-
 include/linux/pldmfw.h                        |   5 +
 include/net/devlink.h                         |   2 +
 include/uapi/linux/devlink.h                  |   2 +
 lib/pldmfw/pldmfw.c                           |  12 ++
 net/core/devlink.c                            |  19 +-
 9 files changed, 145 insertions(+), 135 deletions(-)

base-commit: c514fbb6231483b05c97eb22587188d4c453b28e

Signature · 1 line
2.31.1.331.gb0c09ab8796f