From: Moshe Shemesh <moshe@mellanox.com>
To: "David S. Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@nvidia.com>
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Moshe Shemesh <moshe@mellanox.com>
Subject: [PATCH net-next 00/16] Add devlink reload action and limit options
Date: Thu, 1 Oct 2020 16:59:03 +0300 [thread overview]
Message-ID: <1601560759-11030-1-git-send-email-moshe@mellanox.com> (raw)
Introduce new options on devlink reload API to enable the user to select
the reload action required and constrains 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 reload limit is selected, the driver should perform only if
it can do it while keeping the limit constrains.
Reload limit 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 limits supported.
Add reload stats to hold the history per reload action per limit.
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.
Change log: Preceding to this version were 5 RFC versions. The changes
applied according to comments mainly from Jakub and Jiri on RFC API
patches are listed in each patch.
Patch 1 changes devlink_reload_supported() param type to enable using
it before allocating devlink.
Patch 2-3 add the new API reload action and reload limit options to
devlink reload.
Patch 4-5 add reload stats and remote reload stats. These stats are
exposed through devlink dev get.
Patches 6-11 add support on mlx5 for devlink reload action fw_activate
and handle the firmware reset events.
Patches 12-13 add devlink enable remote dev reset parameter and use it
in mlx5.
Patches 14-15 mlx5 add devlink reload limit no_reset support for
fw_activate reload action.
Patch 16 adds documentation file devlink-reload.rst
Moshe Shemesh (16):
devlink: Change devlink_reload_supported() param type
devlink: Add reload action option to devlink reload command
devlink: Add devlink reload limit option
devlink: Add reload stats
devlink: Add remote reload stats
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 limit no reset
devlink: Add Documentation/networking/devlink/devlink-reload.rst
.../networking/devlink/devlink-params.rst | 6 +
.../networking/devlink/devlink-reload.rst | 81 +++
Documentation/networking/devlink/index.rst | 1 +
drivers/net/ethernet/mellanox/mlx4/main.c | 9 +-
.../net/ethernet/mellanox/mlx5/core/Makefile | 2 +-
.../net/ethernet/mellanox/mlx5/core/devlink.c | 114 ++++-
.../mellanox/mlx5/core/diag/fw_tracer.c | 52 ++
.../mellanox/mlx5/core/diag/fw_tracer.h | 1 +
.../ethernet/mellanox/mlx5/core/fw_reset.c | 463 ++++++++++++++++++
.../ethernet/mellanox/mlx5/core/fw_reset.h | 21 +
.../net/ethernet/mellanox/mlx5/core/health.c | 35 +-
.../net/ethernet/mellanox/mlx5/core/main.c | 16 +
.../ethernet/mellanox/mlx5/core/mlx5_core.h | 2 +
drivers/net/ethernet/mellanox/mlxsw/core.c | 13 +-
drivers/net/netdevsim/dev.c | 8 +-
include/linux/mlx5/device.h | 1 +
include/linux/mlx5/driver.h | 2 +
include/net/devlink.h | 21 +-
include/uapi/linux/devlink.h | 42 ++
net/core/devlink.c | 318 +++++++++++-
20 files changed, 1164 insertions(+), 44 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.18.2
next reply other threads:[~2020-10-01 14:01 UTC|newest]
Thread overview: 49+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-01 13:59 Moshe Shemesh [this message]
2020-10-01 13:59 ` [PATCH net-next 01/16] devlink: Change devlink_reload_supported() param type Moshe Shemesh
2020-10-01 20:54 ` Jakub Kicinski
2020-10-02 15:13 ` Jiri Pirko
2020-10-05 18:34 ` Jacob Keller
2020-10-01 13:59 ` [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command Moshe Shemesh
2020-10-01 20:59 ` Jakub Kicinski
2020-10-02 15:19 ` Jiri Pirko
2020-10-04 6:30 ` Moshe Shemesh
2020-10-03 7:52 ` Jiri Pirko
2020-10-04 6:45 ` Moshe Shemesh
2020-10-05 18:39 ` Jacob Keller
2020-10-01 13:59 ` [PATCH net-next 03/16] devlink: Add devlink reload limit option Moshe Shemesh
2020-10-01 21:14 ` Jakub Kicinski
2020-10-02 15:01 ` Moshe Shemesh
2020-10-01 21:15 ` Jakub Kicinski
2020-10-03 7:51 ` Jiri Pirko
2020-10-03 15:04 ` Jakub Kicinski
2020-10-04 7:18 ` Moshe Shemesh
2020-10-05 18:53 ` Jacob Keller
2020-10-04 6:42 ` Moshe Shemesh
2020-10-05 12:18 ` Jiri Pirko
2020-10-05 18:45 ` Jacob Keller
2020-10-01 13:59 ` [PATCH net-next 04/16] devlink: Add reload stats Moshe Shemesh
2020-10-01 21:25 ` Jakub Kicinski
2020-10-02 15:07 ` Moshe Shemesh
2020-10-03 9:00 ` Jiri Pirko
2020-10-04 6:59 ` Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 05/16] devlink: Add remote " Moshe Shemesh
2020-10-01 21:48 ` Jakub Kicinski
2020-10-03 9:05 ` Jiri Pirko
2020-10-04 7:09 ` Moshe Shemesh
2020-10-05 19:12 ` Jacob Keller
2020-10-07 5:41 ` Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 06/16] net/mlx5: Add functions to set/query MFRL register Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 07/16] net/mlx5: Set cap for pci sync for fw update event Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 08/16] net/mlx5: Handle sync reset request event Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 09/16] net/mlx5: Handle sync reset now event Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 10/16] net/mlx5: Handle sync reset abort event Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 11/16] net/mlx5: Add support for devlink reload action fw activate Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 12/16] devlink: Add enable_remote_dev_reset generic parameter Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 13/16] net/mlx5: Add devlink param enable_remote_dev_reset support Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 14/16] net/mlx5: Add support for fw live patch event Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 15/16] net/mlx5: Add support for devlink reload limit no reset Moshe Shemesh
2020-10-01 21:52 ` Jakub Kicinski
2020-10-02 15:08 ` Moshe Shemesh
2020-10-01 13:59 ` [PATCH net-next 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst Moshe Shemesh
2020-10-03 9:14 ` Jiri Pirko
2020-10-04 7:15 ` Moshe Shemesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1601560759-11030-1-git-send-email-moshe@mellanox.com \
--to=moshe@mellanox.com \
--cc=davem@davemloft.net \
--cc=jiri@nvidia.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).