linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next RFC v4 00/15] Add devlink reload action and
@ 2020-09-14  6:07 Moshe Shemesh
  2020-09-14  6:07 ` [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command Moshe Shemesh
                   ` (14 more replies)
  0 siblings, 15 replies; 57+ messages in thread
From: Moshe Shemesh @ 2020-09-14  6:07 UTC (permalink / raw)
  To: David S. Miller, Jakub Kicinski, Jiri Pirko
  Cc: netdev, linux-kernel, Moshe Shemesh

Introduce new options on devlink reload API to enable the user to select
the reload action required and contrains limits on these actions that he
may want to ensure. Complete support for reload actions in mlx5.
The following reload actions are supported:
  driver_reinit: driver entities re-initialization, applying devlink-param
                 and devlink-resource values.
  fw_activate: firmware activate.

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. Therefore, the devlink
reload command returns the actions which were actually performed.

By default reload actions are not limited and driver implementation may
include reset or downtime as needed to perform the actions.
However, if limit_level is selected, the driver should perform only if
it can do it while keeping the limit level constrains.
Reload action limit level added:
  no_reset: No reset allowed, no down time allowed, no link flap and no
            configuration is lost.

Each driver which supports devlink reload command should expose the
reload actions and limit levels supported.

Add reload action stats to hold the history per reload action per limit
level. For example, the number of times fw_activate has been done on
this device since the driver module was added or if the firmware
activation was done with or without reset.

Patch 1-2 add the new API reload action and reload action limit level
          option to devlink reload.
Patch 3 adds reload actions stats.
Patch 4 exposes the reload actions stats on devlink dev get.
Patches 5-10 add support on mlx5 for devlink reload action fw_activate
            and handle the firmware reset events.
Patches 11-12 add devlink enable remote dev reset parameter and use it
             in mlx5.
Patches 13-14 mlx5 add devlink reload action limit level no_reset
              support for fw_activate reload action.
Patch 14 adds documentation file devlink-reload.rst 

Moshe Shemesh (15):
  devlink: Add reload action option to devlink reload command
  devlink: Add reload action limit level
  devlink: Add reload action stats
  devlink: Add reload actions stats 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 limit level no reset
  devlink: Add Documentation/networking/devlink/devlink-reload.rst

 .../networking/devlink/devlink-params.rst     |   6 +
 .../networking/devlink/devlink-reload.rst     |  80 +++
 Documentation/networking/devlink/index.rst    |   1 +
 drivers/net/ethernet/mellanox/mlx4/main.c     |  17 +-
 .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
 .../net/ethernet/mellanox/mlx5/core/devlink.c | 124 ++++-
 .../mellanox/mlx5/core/diag/fw_tracer.c       |  31 ++
 .../mellanox/mlx5/core/diag/fw_tracer.h       |   1 +
 .../ethernet/mellanox/mlx5/core/fw_reset.c    | 454 ++++++++++++++++++
 .../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    |  28 +-
 drivers/net/netdevsim/dev.c                   |  18 +-
 include/linux/mlx5/device.h                   |   1 +
 include/linux/mlx5/driver.h                   |   4 +
 include/net/devlink.h                         |  20 +-
 include/uapi/linux/devlink.h                  |  39 ++
 net/core/devlink.c                            | 243 +++++++++-
 20 files changed, 1089 insertions(+), 49 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] 57+ messages in thread

end of thread, other threads:[~2020-09-21 10:33 UTC | newest]

Thread overview: 57+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-14  6:07 [PATCH net-next RFC v4 00/15] Add devlink reload action and Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command Moshe Shemesh
2020-09-14  7:08   ` Vasundhara Volam
2020-09-14  9:32     ` Jiri Pirko
2020-09-14  9:54       ` Vasundhara Volam
2020-09-14 11:28         ` Jiri Pirko
2020-09-14 21:31           ` Jakub Kicinski
2020-09-14 22:06             ` Michael Chan
2020-09-15  6:18               ` Jiri Pirko
2020-09-14 12:27   ` Jiri Pirko
2020-09-15 12:12     ` Moshe Shemesh
2020-09-15 13:26       ` Jiri Pirko
2020-09-15 20:06         ` Moshe Shemesh
2020-09-14 21:33   ` Jakub Kicinski
2020-09-15 12:56     ` Moshe Shemesh
2020-09-15 13:26       ` Jiri Pirko
2020-09-15 16:00       ` Jakub Kicinski
2020-09-14  6:07 ` [PATCH net-next RFC v4 02/15] devlink: Add reload action limit level Moshe Shemesh
2020-09-14 13:10   ` Jiri Pirko
2020-09-15 12:15     ` Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 03/15] devlink: Add reload action stats Moshe Shemesh
2020-09-14 13:39   ` Jiri Pirko
2020-09-15 12:30     ` Moshe Shemesh
2020-09-15 13:33       ` Jiri Pirko
2020-09-15 20:20         ` Moshe Shemesh
2020-09-16  6:07           ` Jiri Pirko
2020-09-14  6:07 ` [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get Moshe Shemesh
2020-09-14 13:45   ` Jiri Pirko
2020-09-15  6:45     ` Ido Schimmel
2020-09-15  7:44       ` Jiri Pirko
2020-09-15 12:31         ` Moshe Shemesh
2020-09-15 13:34           ` Jiri Pirko
2020-09-15 20:33             ` Moshe Shemesh
2020-09-18 16:13               ` Moshe Shemesh
2020-09-21 10:33                 ` Jiri Pirko
2020-09-14  6:07 ` [PATCH net-next RFC v4 05/15] net/mlx5: Add functions to set/query MFRL register Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 06/15] net/mlx5: Set cap for pci sync for fw update event Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 07/15] net/mlx5: Handle sync reset request event Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 08/15] net/mlx5: Handle sync reset now event Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 09/15] net/mlx5: Handle sync reset abort event Moshe Shemesh
2020-09-14  6:07 ` [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate Moshe Shemesh
2020-09-14 13:52   ` Jiri Pirko
2020-09-15 12:38     ` Moshe Shemesh
2020-09-14 13:54   ` Jiri Pirko
2020-09-15 12:44     ` Moshe Shemesh
2020-09-15 13:37       ` Jiri Pirko
2020-09-15 20:28         ` Moshe Shemesh
2020-09-16  6:08           ` Jiri Pirko
2020-09-14  6:07 ` [PATCH net-next RFC v4 11/15] devlink: Add enable_remote_dev_reset generic parameter Moshe Shemesh
2020-09-14 14:12   ` Jiri Pirko
2020-09-14  6:07 ` [PATCH net-next RFC v4 12/15] net/mlx5: Add devlink param enable_remote_dev_reset support Moshe Shemesh
2020-09-14  6:08 ` [PATCH net-next RFC v4 13/15] net/mlx5: Add support for fw live patch event Moshe Shemesh
2020-09-14  6:08 ` [PATCH net-next RFC v4 14/15] net/mlx5: Add support for devlink reload action limit level no reset Moshe Shemesh
2020-09-14  6:08 ` [PATCH net-next RFC v4 15/15] devlink: Add Documentation/networking/devlink/devlink-reload.rst Moshe Shemesh
2020-09-14 11:43   ` Jiri Pirko
2020-09-15 16:04   ` Jakub Kicinski
2020-09-15 19:59     ` 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).