Skip to content

ionic: add devlink dev flash support

Shannon Nelson netdev 5 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v5 Latest5 patches 2 repliesIn review
  2. v45 patches 12 repliesSuperseded
  3. v32 patches 24 repliesSuperseded
Earlier versions · 2
VersionPostedPatchesRepliesStatus
v22 patches10 repliesSuperseded
v12 patches8 repliesSuperseded

Patches in v5 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/5devlink: add timeout information to status_notifyinclude/net/devlink.h include/uapi/linux/devlink.h net/core/devlink.c+30 -60 replies
2/5devlink: collect flash notify params into a structinclude/net/devlink.h net/core/devlink.c+50 -231 reply
3/5netdevsim: devlink flash timeout messagedrivers/net/netdevsim/dev.c+2 -00 replies
4/5ionic: update the fw update apidrivers/net/ethernet/pensando/ionic/ionic_if.h drivers/net/ethernet/pensando/ionic/ionic_main.c+29 -80 replies
5/5ionic: add devlink firmware updatedrivers/net/ethernet/pensando/ionic/Makefile drivers/net/ethernet/pensando/ionic/ionic_devlink.c drivers/net/ethernet/pensando/ionic/ionic_devlink.h +2 more+239 -90 replies

Reviews trailers per patch

3 of 5 patches have a Reviewed-by or Acked-by.

PatchJakub KicinskiJacob Keller
1/5R-b R-b
2/5R-b R-b
3/5
4/5
5/5A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v5 thread

Cover letter [PATCH v5 net-next 0/5] ionic: add devlink dev flash support

Add support for using devlink's dev flash facility to update the firmware on an ionic device, and add a new timeout parameter to the devlink flash netlink message.

For long-running flash commands, we add a timeout element to the dev flash notify message in order for a userland utility to display a timeout deadline to the user. This allows the userland utility to display a count down to the user when a firmware update action is otherwise going to go for ahile without any updates. An example use is added to the netdevsim module.

The ionic driver uses this timeout element in its new flash function. The driver uses a simple model of pushing the firmware file to the NIC, asking the NIC to unpack and install the file into the device, and then selecting it for the next boot. If any of these steps fail, the whole transaction is failed. A couple of the steps can take a long time, so we use the timeout status message rather than faking it with bogus done/total messages.

The driver doesn't currently support doing these steps individually. In the future we want to be able to list the FW that is installed and selectable but we don't yet have the API to fully support that.

v5: pulled the cmd field back out of the new params struct
changed netdevsim example message to "Flash select"

v4: Added a new devlink status notify message for showing timeout
information, and modified the ionic fw update to use it for its long running firmware commands.

v3: Changed long dev_cmd timeout on status check calls to a loop around
calls with a normal timeout, which allows for more intermediate log messaging when in a long wait, and for letting other threads run dev_cmds if waiting.

v2: Changed "Activate" to "Select" in status messages.

Shannon Nelson (5):
devlink: add timeout information to status_notify
devlink: collect flash notify params into a struct
netdevsim: devlink flash timeout message
ionic: update the fw update api
ionic: add devlink firmware update

 drivers/net/ethernet/pensando/ionic/Makefile  |   2 +-
 .../ethernet/pensando/ionic/ionic_devlink.c   |  14 ++
 .../ethernet/pensando/ionic/ionic_devlink.h   |   3 +
 .../net/ethernet/pensando/ionic/ionic_fw.c    | 206 ++++++++++++++++++
 .../net/ethernet/pensando/ionic/ionic_if.h    |  33 ++-
 .../net/ethernet/pensando/ionic/ionic_main.c  |  27 ++-
 drivers/net/netdevsim/dev.c                   |   2 +
 include/net/devlink.h                         |  23 ++
 include/uapi/linux/devlink.h                  |   3 +
 net/core/devlink.c                            |  61 ++++--
 10 files changed, 339 insertions(+), 35 deletions(-)
 create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_fw.c
Signature · 1 line
2.17.1