linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next RFC v2 00/13] Add devlink reload action option
@ 2020-08-17  9:37 Moshe Shemesh
  2020-08-17  9:37 ` [PATCH net-next RFC v2 01/13] devlink: Add reload action option to devlink reload command Moshe Shemesh
                   ` (12 more replies)
  0 siblings, 13 replies; 30+ messages in thread
From: Moshe Shemesh @ 2020-08-17  9:37 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Jiri Pirko
  Cc: netdev, linux-kernel, Moshe Shemesh

Introduce new option on devlink reload API to enable the user to select the
reload action required. Complete support for all actions in mlx5.
The following reload actions are supported:
  fw_live_patch: firmware live patching.
  driver_reinit: driver entities re-initialization, applying devlink-params
                 and devlink-resources values.
  fw_activate: firmware activate.

Each driver which support this command should expose the reload actions
supported.
The uAPI is backward compatible, if the reload action option is omitted
from the reload command, the driver reinit action will be used.
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.

Patch 1 adds the new API reload action option to devlink.
Patch 2 exposes the supported reload actions on devlink dev get.
Patches 3-8 add support on mlx5 for devlink reload action fw_activate
            and handle the firmware reset events.
Patches 9-10 add devlink enable remote dev reset parameter and use it
             in mlx5.
Patches 11-12 mlx5 add devlink reload live patch support and event
              handling.
Patch 13 adds documentation file devlink-reload.rst 

Command examples:

# Run reload command with fw activate reload action:
$ devlink dev reload pci/0000:82:00.0 action fw_activate

# Run reload command with driver reload action:
$ devlink dev reload pci/0000:82:00.0 action driver_reinit

# Run reload command with fw live patch reload action:
$ devlink dev reload pci/0000:82:00.0 action fw_live_patch

v1 -> v2:
- Instead of reload levels driver,fw_reset,fw_live_patch have reload
  actions driver_reinit,fw_activate,fw_live_patch
- Remove driver default level, the action driver_reinit is the default
  action for all drivers 


Moshe Shemesh (13):
  devlink: Add reload action option to devlink reload command
  devlink: Add supported reload actions to dev get
  net/mlx5: Add functions to set/query MFRL register
  net/mlx5: Set cap for pci sync for fw update event
  net/mlx5: Handle sync reset request event
  net/mlx5: Handle sync reset now event
  net/mlx5: Handle sync reset abort event
  net/mlx5: Add support for devlink reload action fw activate
  devlink: Add enable_remote_dev_reset generic parameter
  net/mlx5: Add devlink param enable_remote_dev_reset support
  net/mlx5: Add support for fw live patch event
  net/mlx5: Add support for devlink reload action live patch
  devlink: Add Documentation/networking/devlink/devlink-reload.rst

 .../networking/devlink/devlink-params.rst     |   6 +
 .../networking/devlink/devlink-reload.rst     |  54 +++
 Documentation/networking/devlink/index.rst    |   1 +
 drivers/net/ethernet/mellanox/mlx4/main.c     |   4 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c | 104 +++-
 .../mellanox/mlx5/core/diag/fw_tracer.c       |  31 ++
 .../mellanox/mlx5/core/diag/fw_tracer.h       |   1 +
 .../ethernet/mellanox/mlx5/core/fw_reset.c    | 448 ++++++++++++++++++
 .../ethernet/mellanox/mlx5/core/fw_reset.h    |  19 +
 .../net/ethernet/mellanox/mlx5/core/health.c  |  35 +-
 .../net/ethernet/mellanox/mlx5/core/main.c    |  13 +
 .../ethernet/mellanox/mlx5/core/mlx5_core.h   |   2 +
 drivers/net/ethernet/mellanox/mlxsw/core.c    |   6 +-
 drivers/net/netdevsim/dev.c                   |   5 +-
 include/linux/mlx5/device.h                   |   1 +
 include/linux/mlx5/driver.h                   |   4 +
 include/net/devlink.h                         |   9 +-
 include/uapi/linux/devlink.h                  |  20 +
 net/core/devlink.c                            |  84 +++-
 20 files changed, 812 insertions(+), 37 deletions(-)
 create mode 100644 Documentation/networking/devlink/devlink-reload.rst
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/fw_reset.c
 create mode 100644 drivers/net/ethernet/mellanox/mlx5/core/fw_reset.h

-- 
2.17.1


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

end of thread, other threads:[~2020-08-19 18:55 UTC | newest]

Thread overview: 30+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-17  9:37 [PATCH net-next RFC v2 00/13] Add devlink reload action option Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 01/13] devlink: Add reload action option to devlink reload command Moshe Shemesh
2020-08-17 16:16   ` Jakub Kicinski
2020-08-18  9:06     ` Moshe Shemesh
2020-08-18 15:37       ` Jakub Kicinski
2020-08-17 16:36   ` Jiri Pirko
2020-08-18  9:10     ` Moshe Shemesh
2020-08-19  0:10       ` Jakub Kicinski
2020-08-19 12:18         ` Moshe Shemesh
2020-08-19 12:46           ` Jiri Pirko
2020-08-19 14:23             ` Moshe Shemesh
2020-08-19 15:18               ` Jiri Pirko
2020-08-19 16:25                 ` Jakub Kicinski
2020-08-19 18:55                   ` Jiri Pirko
2020-08-17  9:37 ` [PATCH net-next RFC v2 02/13] devlink: Add supported reload actions to dev get Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 03/13] net/mlx5: Add functions to set/query MFRL register Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 04/13] net/mlx5: Set cap for pci sync for fw update event Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 05/13] net/mlx5: Handle sync reset request event Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 06/13] net/mlx5: Handle sync reset now event Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 07/13] net/mlx5: Handle sync reset abort event Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 08/13] net/mlx5: Add support for devlink reload action fw activate Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 09/13] devlink: Add enable_remote_dev_reset generic parameter Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 10/13] net/mlx5: Add devlink param enable_remote_dev_reset support Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 11/13] net/mlx5: Add support for fw live patch event Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 12/13] net/mlx5: Add support for devlink reload action live patch Moshe Shemesh
2020-08-17  9:37 ` [PATCH net-next RFC v2 13/13] devlink: Add Documentation/networking/devlink/devlink-reload.rst Moshe Shemesh
2020-08-17 16:39   ` Jiri Pirko
2020-08-18  9:14     ` Moshe Shemesh
2020-08-18 11:07       ` Jiri Pirko
2020-08-18 20:04         ` Moshe Shemesh

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).