All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 net-next 0/5] ionic: add devlink dev flash support
@ 2020-09-17  3:01 Shannon Nelson
  2020-09-17  3:02 ` [PATCH v4 net-next 1/5] devlink: add timeout information to status_notify Shannon Nelson
                   ` (4 more replies)
  0 siblings, 5 replies; 18+ messages in thread
From: Shannon Nelson @ 2020-09-17  3:01 UTC (permalink / raw)
  To: netdev, davem; +Cc: Shannon Nelson

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.

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                         |  25 +++
 include/uapi/linux/devlink.h                  |   3 +
 net/core/devlink.c                            |  83 ++++---
 10 files changed, 350 insertions(+), 48 deletions(-)
 create mode 100644 drivers/net/ethernet/pensando/ionic/ionic_fw.c

-- 
2.17.1


^ permalink raw reply	[flat|nested] 18+ messages in thread

end of thread, other threads:[~2020-09-17 20:48 UTC | newest]

Thread overview: 18+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-17  3:01 [PATCH v4 net-next 0/5] ionic: add devlink dev flash support Shannon Nelson
2020-09-17  3:02 ` [PATCH v4 net-next 1/5] devlink: add timeout information to status_notify Shannon Nelson
2020-09-17 19:46   ` Jakub Kicinski
2020-09-17 20:45     ` Shannon Nelson
2020-09-17 19:50   ` Jacob Keller
2020-09-17 20:48     ` Shannon Nelson
2020-09-17  3:02 ` [PATCH v4 net-next 2/5] devlink: collect flash notify params into a struct Shannon Nelson
2020-09-17 19:47   ` Jakub Kicinski
2020-09-17 20:46     ` Shannon Nelson
2020-09-17 19:52   ` Jacob Keller
2020-09-17  3:02 ` [PATCH v4 net-next 3/5] netdevsim: devlink flash timeout message Shannon Nelson
2020-09-17 19:50   ` Jakub Kicinski
2020-09-17 20:47     ` Shannon Nelson
2020-09-17  3:02 ` [PATCH v4 net-next 4/5] ionic: update the fw update api Shannon Nelson
2020-09-17  3:02 ` [PATCH v4 net-next 5/5] ionic: add devlink firmware update Shannon Nelson
2020-09-17 19:52   ` Jakub Kicinski
2020-09-17 20:47     ` Shannon Nelson
2020-09-17 19:55   ` Jacob Keller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.