Skip to content

expose flash update status to user

Jiri Pirko netdev 3 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v3 Latest8 patches 5 repliesIn review
  2. v27 patches 10 repliesSuperseded
  3. v17 patches 16 repliesSuperseded

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/8mlxsw: Move firmware flash implementation to devlinkdrivers/net/ethernet/mellanox/mlxsw/core.c drivers/net/ethernet/mellanox/mlxsw/core.h drivers/net/ethernet/mellanox/mlxsw/spectrum.c+41 -260 replies
2/8mlx5: Move firmware flash implementation to devlinkdrivers/net/ethernet/mellanox/mlx5/core/en.h drivers/net/ethernet/mellanox/mlx5/core/en_ethtool.c drivers/net/ethernet/mellanox/mlx5/core/ipoib/ethtool.c +1 more+20 -461 reply
3/8mlxfw: Propagate error messages through extackdrivers/net/ethernet/mellanox/mlx5/core/fw.c drivers/net/ethernet/mellanox/mlx5/core/main.c drivers/net/ethernet/mellanox/mlx5/core/mlx5_core.h +3 more+41 -200 replies
4/8devlink: allow driver to update progress of flash updateinclude/net/devlink.h include/uapi/linux/devlink.h net/core/devlink.c+115 -00 replies
5/8mlxfw: Introduce status_notify op and call it to notify about the statusdrivers/net/ethernet/mellanox/mlxfw/mlxfw.h drivers/net/ethernet/mellanox/mlxfw/mlxfw_fsm.c+28 -00 replies
6/8mlxsw: Implement flash update status notificationsdrivers/net/ethernet/mellanox/mlxsw/spectrum.c+17 -10 replies
7/8netdevsim: implement fake flash updating with notificationsdrivers/net/netdevsim/dev.c drivers/net/netdevsim/netdevsim.h+45 -01 reply
8/8selftests: add basic netdevsim devlink flash testingtools/testing/selftests/drivers/net/netdevsim/devlink.sh+53 -01 reply

Reviews trailers per patch

All 8 patches have a Reviewed-by or Acked-by of their own; the series has one for all of them.

PatchIdo SchimmelJakub KicinskiAlexei StarovoitovSaeed Mahameed
SeriesA-b
1/8R-b
2/8A-b
3/8R-b
4/8R-b R-b
5/8R-b
6/8R-b
7/8R-b
8/8A-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 4 reviewers.

Read the v3 thread

Cover letter [patch net-next v3 0/8] expose flash update status to user

From: Jiri Pirko <[email protected]>

When user is flashing device using devlink, he currenly does not see any information about what is going on, percentages, etc. Drivers, for example mlxsw and mlx5, have notion about the progress and what is happening. This patchset exposes this progress information to userspace.

Example output for existing flash command:

$ devlink dev flash pci/0000:01:00.0 file firmware.bin
Preparing to flash
Flashing 100%
Flashing done

See this console recording which shows flashing FW on a Mellanox Spectrum device:
https://asciinema.org/a/247926

---
Please see individual patches for changelog.
v2->v3 only adds tags and the last selftest patch

Jiri Pirko (8):
mlxsw: Move firmware flash implementation to devlink
mlx5: Move firmware flash implementation to devlink
mlxfw: Propagate error messages through extack
devlink: allow driver to update progress of flash update
mlxfw: Introduce status_notify op and call it to notify about the
status
mlxsw: Implement flash update status notifications
netdevsim: implement fake flash updating with notifications
selftests: add basic netdevsim devlink flash testing

 drivers/net/ethernet/mellanox/mlx5/core/en.h  |   2 -
 .../ethernet/mellanox/mlx5/core/en_ethtool.c  |  35 ------
 drivers/net/ethernet/mellanox/mlx5/core/fw.c  |   6 +-
 .../mellanox/mlx5/core/ipoib/ethtool.c        |   9 --
 .../net/ethernet/mellanox/mlx5/core/main.c    |  20 ++++
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   3 +-
 drivers/net/ethernet/mellanox/mlxfw/mlxfw.h   |  11 +-
 .../net/ethernet/mellanox/mlxfw/mlxfw_fsm.c   |  57 ++++++++--
 drivers/net/ethernet/mellanox/mlxsw/core.c    |  15 +++
 drivers/net/ethernet/mellanox/mlxsw/core.h    |   3 +
 .../net/ethernet/mellanox/mlxsw/spectrum.c    |  75 +++++++------
 drivers/net/netdevsim/dev.c                   |  44 ++++++++
 drivers/net/netdevsim/netdevsim.h             |   1 +
 include/net/devlink.h                         |   8 ++
 include/uapi/linux/devlink.h                  |   5 +
 net/core/devlink.c                            | 102 ++++++++++++++++++
 .../drivers/net/netdevsim/devlink.sh          |  53 +++++++++
 17 files changed, 358 insertions(+), 91 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/netdevsim/devlink.sh
Signature · 1 line
2.17.2