netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Moshe Shemesh <moshe@nvidia.com>
To: Jiri Pirko <jiri@resnulli.us>, Moshe Shemesh <moshe@mellanox.com>
Cc: "David S. Miller" <davem@davemloft.net>,
	Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@mellanox.com>,
	<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH net-next RFC v3 00/14] Add devlink reload action option
Date: Tue, 1 Sep 2020 23:05:59 +0300	[thread overview]
Message-ID: <917bb002-b15a-c1d5-0366-9f26056b329c@nvidia.com> (raw)
In-Reply-To: <20200831104956.GC3794@nanopsycho.orion>


On 8/31/2020 1:49 PM, Jiri Pirko wrote:
> Sun, Aug 30, 2020 at 05:27:20PM CEST, moshe@mellanox.com wrote:
>> 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:
>>   driver_reinit: driver entities re-initialization, applying devlink-param
>>                  and devlink-resource values.
>>   fw_activate: firmware activate.
>>   fw_activate_no_reset: Activate new firmware image without any reset.
>>                         (also known as: firmware live patching).
>>
>> 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. Therefore, the devlink
>> reload command returns the actions which were actually done.
>>
>> Add reload actions counters to hold the history per reload action type.
>> 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 adds the new API reload action option to devlink.
>> Patch 2 adds reload actions counters.
>> Patch 3 exposes the reload actions counters on devlink dev get.
>> Patches 4-9 add support on mlx5 for devlink reload action fw_activate
>>             and handle the firmware reset events.
>> Patches 10-11 add devlink enable remote dev reset parameter and use it
>>              in mlx5.
>> Patches 12-13 mlx5 add devlink reload action fw_activate_no_reset support
>>               and event handling.
>> Patch 14 adds documentation file devlink-reload.rst
>>
>> command examples:
>> $devlink dev reload pci/0000:82:00.0 action driver_reinit
>> reload_actions_done:
>>   driver_reinit
>>
>> $devlink dev reload pci/0000:82:00.0 action fw_activate
>> reload_actions_done:
>>   driver_reinit fw_activate
>>
>> $ devlink dev reload pci/0000:82:00.0 action fw_activate no_reset
> You are missing "_".
>
I meant that no_reset is an option, so the uAPI is:

$ devlink dev reload DEV [ netns { PID | NAME | ID } ] [ action { 
driver_reinit | fw_activate [no_reset] } ]

Should have been as "--no_reset" or "-no_reset" but it seems that all 
options in devlink are global, not specific to command.

Probably there is a better way, please advise.

>> reload_actions_done:
> No need to have "reload" word here. And maybe "performed" would be
> better than "done". Idk:
> "actions_performed"
> ?
>

Yes, that's better, I will fix.

>>   fw_activate_no_reset
>>
>> v2 -> v3:
>> - Replace fw_live_patch action by fw_activate_no_reset
>> - Devlink reload returns the actions done over netlink reply
>> - Add reload actions counters
>>
>> 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 (14):
>>   devlink: Add reload action option to devlink reload command
>>   devlink: Add reload actions counters
>>   devlink: Add reload actions counters 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 fw activate no reset
>>   devlink: Add Documentation/networking/devlink/devlink-reload.rst
>>
>> .../networking/devlink/devlink-params.rst     |   6 +
>> .../networking/devlink/devlink-reload.rst     |  68 +++
>> Documentation/networking/devlink/index.rst    |   1 +
>> drivers/net/ethernet/mellanox/mlx4/main.c     |  14 +-
>> .../net/ethernet/mellanox/mlx5/core/Makefile  |   2 +-
>> .../net/ethernet/mellanox/mlx5/core/devlink.c | 117 ++++-
>> .../mellanox/mlx5/core/diag/fw_tracer.c       |  31 ++
>> .../mellanox/mlx5/core/diag/fw_tracer.h       |   1 +
>> .../ethernet/mellanox/mlx5/core/fw_reset.c    | 453 ++++++++++++++++++
>> .../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    |  24 +-
>> drivers/net/netdevsim/dev.c                   |  16 +-
>> include/linux/mlx5/device.h                   |   1 +
>> include/linux/mlx5/driver.h                   |   4 +
>> include/net/devlink.h                         |  13 +-
>> include/uapi/linux/devlink.h                  |  24 +
>> net/core/devlink.c                            | 174 ++++++-
>> 20 files changed, 967 insertions(+), 51 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
>>

  reply	other threads:[~2020-09-01 20:06 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-30 15:27 [PATCH net-next RFC v3 00/14] Add devlink reload action option Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command Moshe Shemesh
2020-08-31 12:15   ` Jiri Pirko
2020-09-01 19:43     ` Moshe Shemesh
2020-09-02  9:46       ` Jiri Pirko
2020-09-02 15:30         ` Jakub Kicinski
2020-09-03  5:57           ` Jiri Pirko
2020-09-03 19:47             ` Jakub Kicinski
2020-09-04  9:04               ` Jiri Pirko
2020-09-04 19:56                 ` Jakub Kicinski
2020-09-07 13:46                   ` Moshe Shemesh
2020-09-07 17:58                     ` Jakub Kicinski
2020-09-09 13:27                       ` Moshe Shemesh
2020-09-09 19:24                         ` Jakub Kicinski
2020-09-10  5:16                         ` Vasundhara Volam
2020-09-10  6:51                         ` Jiri Pirko
2020-08-30 15:27 ` [PATCH net-next RFC v3 02/14] devlink: Add reload actions counters Moshe Shemesh
2020-08-31 10:48   ` Jiri Pirko
2020-09-01 19:05     ` Moshe Shemesh
2020-09-02  0:01       ` Jakub Kicinski
2020-09-04  5:03         ` Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 03/14] devlink: Add reload actions counters to dev get Moshe Shemesh
2020-08-31 10:44   ` Jiri Pirko
2020-09-01 19:00     ` Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 04/14] net/mlx5: Add functions to set/query MFRL register Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 05/14] net/mlx5: Set cap for pci sync for fw update event Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 06/14] net/mlx5: Handle sync reset request event Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 07/14] net/mlx5: Handle sync reset now event Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 08/14] net/mlx5: Handle sync reset abort event Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 09/14] net/mlx5: Add support for devlink reload action fw activate Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 10/14] devlink: Add enable_remote_dev_reset generic parameter Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 11/14] net/mlx5: Add devlink param enable_remote_dev_reset support Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 12/14] net/mlx5: Add support for fw live patch event Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 13/14] net/mlx5: Add support for devlink reload action fw activate no reset Moshe Shemesh
2020-08-30 15:27 ` [PATCH net-next RFC v3 14/14] devlink: Add Documentation/networking/devlink/devlink-reload.rst Moshe Shemesh
2020-08-31 10:49 ` [PATCH net-next RFC v3 00/14] Add devlink reload action option Jiri Pirko
2020-09-01 20:05   ` Moshe Shemesh [this message]
     [not found]   ` <36e30108-26e3-44ae-e133-48d412f7efe6@nvidia.com>
2020-09-02  7:55     ` Jiri Pirko

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=917bb002-b15a-c1d5-0366-9f26056b329c@nvidia.com \
    --to=moshe@nvidia.com \
    --cc=davem@davemloft.net \
    --cc=jiri@mellanox.com \
    --cc=jiri@resnulli.us \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=moshe@mellanox.com \
    --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).