[PATCH net v2] devlink: Fix reload stats structure

2020-11-22 Thread Moshe Shemesh
quot;unspecified": 2 }, "fw_activate": { "unspecified": 1, "no_reset": 0 } } Fixes: a254c264267e ("devlink: Add reload stats") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- v1 -> v2: - Fold comment at 80 c

Re: [PATCH net] devlink: Fix reload stats structure

2020-11-22 Thread Moshe Shemesh
On 11/22/2020 12:53 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Fri, 20 Nov 2020 15:40:37 +0200 Moshe Shemesh wrote: Fix reload stats structure exposed to the user. Change stats structure hierarchy to have the reload action as a parent of the stat

[PATCH net] devlink: Fix reload stats structure

2020-11-20 Thread Moshe Shemesh
quot;unspecified": 2 }, "fw_activate": { "unspecified": 1, "no_reset": 0 } } Fixes: a254c264267e ("devlink: Add reload stats") Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- include/uapi/linux/devlink.

Re: [PATCH net-next v2 03/16] devlink: Add devlink reload limit option

2020-10-07 Thread Moshe Shemesh
On 10/7/2020 3:41 PM, Vasundhara Volam wrote: On Wed, Oct 7, 2020 at 11:32 AM Moshe Shemesh wrote: Add reload limit to demand restrictions on reload actions. Reload limits supported: no_reset: No reset allowed, no down time allowed, no link flap and no configuration is lost

[PATCH net-next v2 14/16] net/mlx5: Add support for fw live patch event

2020-10-07 Thread Moshe Shemesh
database to help debugging an issue. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 52 +++ .../mellanox/mlx5/core/diag/fw_tracer.h | 1 + .../ethernet/mellanox/mlx5/core/fw_reset.c| 24 + include/linux

[PATCH net-next v2 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-10-07 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Split first paragraph of devlink reload description to 2 sentences RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RFCv4 -> RFCv5: - Rephrase namespa

[PATCH net-next v2 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-07 Thread Moshe Shemesh
. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- v1 ->v2: - Shorten return flow in mlx5_devlink_trigger_fw_live_patch() RFCv5 -> v1: - Renamed reload_action_limit_level to reload_limit RFCv3 -> RFCv4: - Have action fw

[PATCH net-next v2 09/16] net/mlx5: Handle sync reset now event

2020-10-07 Thread Moshe Shemesh
bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/fw_reset.c| 119

[PATCH net-next v2 10/16] net/mlx5: Handle sync reset abort event

2020-10-07 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions

[PATCH net-next v2 13/16] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-10-07 Thread Moshe Shemesh
for firmware update reset is enabled. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Have MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST instead of MLX5_HEALTH_RESET_FLAGS_NACK_RESET_REQUEST --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 21 ++ .../ether

[PATCH net-next v2 03/16] devlink: Add devlink reload limit option

2020-10-07 Thread Moshe Shemesh
of multiselection. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Changed limit uapi parameter to bitfield32 for future support of multiselection - Fixed reverse xmas tree RFCv5 -> v1: - Renamed supported_reload_actions_limit_levels to reload_limits - Renamed reload_action_limit_level to reload_limit -

[PATCH net-next v2 06/16] net/mlx5: Add functions to set/query MFRL register

2020-10-07 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv5 -> v1: - Renamed non-static functions to have module prefix --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/c

[PATCH net-next v2 04/16] devlink: Add reload stats

2020-10-07 Thread Moshe Shemesh
vate": 1, "fw_activate_no_reset": 0 } } }, "pci/:82:00.1": { "stats": { "reload": { "driver_reinit": 1, "fw_activate": 0, "fw_

[PATCH net-next v2 07/16] net/mlx5: Set cap for pci sync for fw update event

2020-10-07 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net

[PATCH net-next v2 05/16] devlink: Add remote reload stats

2020-10-07 Thread Moshe Shemesh
"driver_reinit": 1, "fw_activate": 1, "fw_activate_no_reset": 0 } } } } } Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski --- v1 -> v2: - Add devlink_

[PATCH net-next v2 12/16] devlink: Add enable_remote_dev_reset generic parameter

2020-10-07 Thread Moshe Shemesh
NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- Documentation/networking/devlink/devlink-params.rst | 6 ++ include/net/devlink.h | 4 net/core/devlink.c

[PATCH net-next v2 00/16] Add devlink reload action and limit options

2020-10-07 Thread Moshe Shemesh
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

[PATCH net-next v2 01/16] devlink: Change devlink_reload_supported() param type

2020-10-07 Thread Moshe Shemesh
Change devlink_reload_supported() function to get devlink_ops pointer param instead of devlink pointer param. This change will be used in the next patch to check if devlink reload is supported before devlink instance is allocated. Signed-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski

[PATCH net-next v2 08/16] net/mlx5: Handle sync reset request event

2020-10-07 Thread Moshe Shemesh
it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Moved handling of sync reset recovery from health to fw_reset --- .../ethernet/mellanox/mlx5/c

[PATCH net-next v2 11/16] net/mlx5: Add support for devlink reload action fw activate

2020-10-07 Thread Moshe Shemesh
synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv4 -> RFCv5: - Add remote actions stats - If devlink reload is not supported, show only remote_stats RFCv3 -> RFCv4: - Renamed DEVLINK_ATTR_RELOAD_ACTI

[PATCH net-next v2 02/16] devlink: Add reload action option to devlink reload command

2020-10-07 Thread Moshe Shemesh
-off-by: Moshe Shemesh Reviewed-by: Jakub Kicinski Reviewed-by: Jacob Keller --- v1 -> v2: - Changes actions_performed attr to nla_bitfield32 - Change reload_up() parameters order, extack should be last RFCv5 -> v1: - Rename supported_reload_actions to reload_actions -

Re: [PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-06 Thread Moshe Shemesh
On 10/5/2020 10:12 PM, Jacob Keller wrote: On 10/4/2020 12:09 AM, Moshe Shemesh wrote: On 10/3/2020 12:05 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:08PM CEST, mo...@mellanox.com wrote: Add remote reload stats to hold the history of actions performed due devlink reload commands

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 6:04 PM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Sat, 3 Oct 2020 09:51:00 +0200 Jiri Pirko wrote: enum devlink_attr { /* don't change the order or add anything between, this is ABI! */ DEVLINK_ATTR_UNSPEC, @@ -507,6 +524,7 @@

Re: [PATCH net-next 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 12:14 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:19PM CEST, mo...@mellanox.com wrote: Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RF

Re: [PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-04 Thread Moshe Shemesh
"fw_activate_no_reset": 0 } ], "remote_reload_stats": [ { "driver_reinit": 1 },{ "fw_activate": 1 },{

Re: [PATCH net-next 04/16] devlink: Add reload stats

2020-10-04 Thread Moshe Shemesh
},{ "fw_activate": 0 },{ "fw_activate_no_reset": 0 } ] } } } } Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Changed the stats output structure, have 2 stats, one for local and one for remote - Resplit

Re: [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 10:52 AM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:05PM CEST, mo...@mellanox.com wrote: [...] +static int +devlink_nl_reload_actions_performed_snd(struct devlink *devlink, + unsigned long actions_performed, +

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-04 Thread Moshe Shemesh
On 10/3/2020 10:51 AM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:06PM CEST, mo...@mellanox.com wrote: [...] enum devlink_attr { /* don't change the order or add anything between, this is ABI! */ DEVLINK_ATTR_UNSPEC, @@ -507,6 +524,7 @@ enum devlink_attr {

Re: [PATCH net-next 02/16] devlink: Add reload action option to devlink reload command

2020-10-04 Thread Moshe Shemesh
On 10/2/2020 6:19 PM, Jiri Pirko wrote: Thu, Oct 01, 2020 at 03:59:05PM CEST, mo...@mellanox.com wrote: [...] diff --git a/include/net/devlink.h b/include/net/devlink.h index 1c286e9a3590..ddba63bce7ad 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@ -1077,10 +1077,11 @@

Re: [PATCH net-next 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-02 Thread Moshe Shemesh
On 10/2/2020 12:52 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Thu, 1 Oct 2020 16:59:18 +0300 Moshe Shemesh wrote: + err = mlx5_fw_reset_set_live_patch(dev); + if (err) + return err; + + return 0; nit return mlx... Right

Re: [PATCH net-next 04/16] devlink: Add reload stats

2020-10-02 Thread Moshe Shemesh
On 10/2/2020 12:25 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Thu, 1 Oct 2020 16:59:07 +0300 Moshe Shemesh wrote: Add reload stats to hold the history per reload action type and limit. For example, the number of times fw_activate has been

Re: [PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-02 Thread Moshe Shemesh
On 10/2/2020 12:14 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Thu, 1 Oct 2020 16:59:06 +0300 Moshe Shemesh wrote: @@ -3032,6 +3064,7 @@ devlink_nl_reload_actions_performed_snd(struct devlink *devlink, static int devlink_nl_cmd_reload(struct

[PATCH net-next 15/16] net/mlx5: Add support for devlink reload limit no reset

2020-10-01 Thread Moshe Shemesh
. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv5 -> v1: - Renamed reload_action_limit_level to reload_limit RFCv3 -> RFCv4: - Have action fw_activate with limit level no_reset instead of action fw_activate_no_reset

[PATCH net-next 07/16] net/mlx5: Set cap for pci sync for fw update event

2020-10-01 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net

[PATCH net-next 10/16] net/mlx5: Handle sync reset abort event

2020-10-01 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions

[PATCH net-next 12/16] devlink: Add enable_remote_dev_reset generic parameter

2020-10-01 Thread Moshe Shemesh
NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- Documentation/networking/devlink/devlink-params.rst | 6 ++ include/net/devlink.h | 4 net/core/devlink.c

[PATCH net-next 11/16] net/mlx5: Add support for devlink reload action fw activate

2020-10-01 Thread Moshe Shemesh
synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv4 -> RFCv5: - Add remote actions stats - If devlink reload is not supported, show only remote_stats RFCv3 -> RFCv4: - Renamed DEVLINK_ATTR_RELOAD_ACTI

[PATCH net-next 09/16] net/mlx5: Handle sync reset now event

2020-10-01 Thread Moshe Shemesh
bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../ethernet/mellanox/mlx5/core/fw_reset.c| 119

[PATCH net-next 00/16] Add devlink reload action and limit options

2020-10-01 Thread Moshe Shemesh
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

[PATCH net-next 13/16] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-10-01 Thread Moshe Shemesh
for firmware update reset is enabled. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Have MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST instead of MLX5_HEALTH_RESET_FLAGS_NACK_RESET_REQUEST --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 21 ++ .../ether

[PATCH net-next 03/16] devlink: Add devlink reload limit option

2020-10-01 Thread Moshe Shemesh
of action and limit are invalid. For example, driver can not reinitialize its entities without any downtime. The no_reset reload limit will have usecase in this patchset to implement restricted fw_activate on mlx5. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rena

[PATCH net-next 06/16] net/mlx5: Add functions to set/query MFRL register

2020-10-01 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv5 -> v1: - Renamed non-static functions to have module prefix --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/c

[PATCH net-next 05/16] devlink: Add remote reload stats

2020-10-01 Thread Moshe Shemesh
} ], "remote_reload_stats": [ { "driver_reinit": 1 },{ "fw_activate": 1 },{ "fw_activate_no_reset": 0 } ] } } } } Signed-off-by: Moshe

[PATCH net-next 16/16] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-10-01 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rename reload_action_limit_level to reload_limit RFCv4 -> RFCv5: - Rephrase namespace chnage section - Rephrase note on actions performed RFCv3 -> RFCv4: - Remo

[PATCH net-next 08/16] net/mlx5: Handle sync reset request event

2020-10-01 Thread Moshe Shemesh
it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- RFCv1 -> RFCv2: - Moved handling of sync reset recovery from health to fw_reset --- .../ethernet/mellanox/mlx5/c

[PATCH net-next 02/16] devlink: Add reload action option to devlink reload command

2020-10-01 Thread Moshe Shemesh
-off-by: Moshe Shemesh --- RFCv5 -> v1: - Rename supported_reload_actions to reload_actions. - Rename devlink_nl_reload_actions_performed_fill() to devlink_nl_reload_actions_performed_snd() and add genlmsg_reply() to it - Actions_performed sent to user space as a mask - Driver can initial

[PATCH net-next 01/16] devlink: Change devlink_reload_supported() param type

2020-10-01 Thread Moshe Shemesh
Change devlink_reload_supported() function to get devlink_ops pointer param instead of devlink pointer param. This change will be used in the next patch to check if devlink reload is supported before devlink instance is allocated. Signed-off-by: Moshe Shemesh --- RFCv5 -> v1: - New pa

[PATCH net-next 04/16] devlink: Add reload stats

2020-10-01 Thread Moshe Shemesh
"driver_reinit": 1 },{ "fw_activate": 0 },{ "fw_activate_no_reset": 0 } ] } } } } Signed-off-by: Moshe S

[PATCH net-next 14/16] net/mlx5: Add support for fw live patch event

2020-10-01 Thread Moshe Shemesh
database to help debugging an issue. Signed-off-by: Moshe Shemesh Reviewed-by: Saeed Mahameed --- .../mellanox/mlx5/core/diag/fw_tracer.c | 52 +++ .../mellanox/mlx5/core/diag/fw_tracer.h | 1 + .../ethernet/mellanox/mlx5/core/fw_reset.c| 24 + include/linux

Re: [PATCH net-next RFC v5 04/15] devlink: Add reload actions stats to dev get

2020-09-24 Thread Moshe Shemesh
On 9/23/2020 9:50 PM, Jakub Kicinski wrote: On Fri, 18 Sep 2020 19:06:40 +0300 Moshe Shemesh wrote: Expose devlink reload actions stats to the user through devlink dev get command. Examples: $ devlink dev show pci/:82:00.0: stats: reload_action_stats: driver_reinit 2

Re: [PATCH net-next RFC v5 03/15] devlink: Add reload action stats

2020-09-24 Thread Moshe Shemesh
On 9/23/2020 9:42 PM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Fri, 18 Sep 2020 19:06:39 +0300 Moshe Shemesh wrote: Add reload action stats to hold the history per reload action type and limit level. For example, the number of times fw_activate has

Re: [PATCH net-next RFC v5 02/15] devlink: Add reload action limit level

2020-09-24 Thread Moshe Shemesh
On 9/23/2020 9:36 PM, Jakub Kicinski wrote: On Fri, 18 Sep 2020 19:06:38 +0300 Moshe Shemesh wrote: Add reload action limit level to demand restrictions on actions. Reload action limit levels supported: none (default): No constrains on actions. Driver implementation may

Re: [PATCH net-next RFC v5 01/15] devlink: Add reload action option to devlink reload command

2020-09-24 Thread Moshe Shemesh
On 9/23/2020 9:25 PM, Jakub Kicinski wrote: On Fri, 18 Sep 2020 19:06:37 +0300 Moshe Shemesh wrote: Add devlink reload action to allow the user to request a specific reload action. The action parameter is optional, if not specified then devlink driver re-init action is used (backward

Re: [PATCH net-next RFC v5 00/15] Add devlink reload action and limit level options

2020-09-23 Thread Moshe Shemesh
I see no more comments, we reached consensus on API. I will finalize my work and re-send as a feature to net-next. Thanks, Moshe. On 9/18/2020 7:06 PM, Moshe Shemesh wrote: Introduce new options on devlink reload API to enable the user to select the reload action required and contrains

[PATCH net-next RFC v5 01/15] devlink: Add reload action option to devlink reload command

2020-09-18 Thread Moshe Shemesh
-off-by: Moshe Shemesh --- v4 -> v5: - Always pass actions_performed to unload_up() instead of checking in each driver - Verify returned actions_performed includes the requested action - Changed devlink_reload_actions_verify(devlink) to get ops - Changed devlink_reload_actions_verify() to ret

[PATCH net-next RFC v5 15/15] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-09-18 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- v4 -> v5: - Rephrase namespace chnage section - Rephrase note on actions performed v3 -> v4: - Remove reload action fw_activate_no_reset - Add reload actions limit levels and do

[PATCH net-next RFC v5 12/15] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-09-18 Thread Moshe Shemesh
for firmware update reset is enabled. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Have MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST instead of MLX5_HEALTH_RESET_FLAGS_NACK_RESET_REQUEST --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 21 + .../ethernet/mellanox/mlx5/core/fw_rese

[PATCH net-next RFC v5 02/15] devlink: Add reload action limit level

2020-09-18 Thread Moshe Shemesh
on mlx5. Signed-off-by: Moshe Shemesh --- v4 -> v5: - Remove check DEVLINK_RELOAD_ACTION_LIMIT_LEVEL_MAX - Added list of invalid action-limit_level combinations and add check to supported actions and levels and check user request v3 -> v4: - New patch --- drivers/net/ethernet/mellano

[PATCH net-next RFC v5 11/15] devlink: Add enable_remote_dev_reset generic parameter

2020-09-18 Thread Moshe Shemesh
NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh Reviewed-by: Jiri Pirko --- Documentation/networking/devlink/devlink-params.rst | 6 ++ include/net/devlink.h | 4 net/core/devlink.c

[PATCH net-next RFC v5 09/15] net/mlx5: Handle sync reset abort event

2020-09-18 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/net

[PATCH net-next RFC v5 14/15] net/mlx5: Add support for devlink reload action limit level no reset

2020-09-18 Thread Moshe Shemesh
. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Have action fw_activate with limit level no_reset instead of action fw_activate_no_reset v2 -> v3: - Replace fw_live_patch action by fw_activate_no_reset v1 -> v2: - Have fw_live_pat

[PATCH net-next RFC v5 08/15] net/mlx5: Handle sync reset now event

2020-09-18 Thread Moshe Shemesh
bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh --- .../ethernet/mellanox/mlx5/core/fw_reset.c| 121 ++ 1 file changed, 121

[PATCH net-next RFC v5 03/15] devlink: Add reload action stats

2020-09-18 Thread Moshe Shemesh
devlink_remote_reload_actions_performed() is exported to enable also drivers update on reload actions performed, for example in case firmware activation with reset finished successfully but was initiated by remote host. Add devlink notification on stats update. Signed-off-by: Moshe Shemesh --- v4 -> v5: -

Re: [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get

2020-09-18 Thread Moshe Shemesh
On 9/15/2020 11:33 PM, Moshe Shemesh wrote: External email: Use caution opening links or attachments On 9/15/2020 4:34 PM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 02:31:38PM CEST, mo...@nvidia.com wrote: On 9/15/2020 10:44 AM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 08:45:19AM CEST, ido

[PATCH net-next RFC v5 06/15] net/mlx5: Set cap for pci sync for fw update event

2020-09-18 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH net-next RFC v5 13/15] net/mlx5: Add support for fw live patch event

2020-09-18 Thread Moshe Shemesh
database to help debugging an issue. Signed-off-by: Moshe Shemesh --- .../mellanox/mlx5/core/diag/fw_tracer.c | 31 +++ .../mellanox/mlx5/core/diag/fw_tracer.h | 1 + .../ethernet/mellanox/mlx5/core/fw_reset.c| 27 include/linux/mlx5/device.h

[PATCH net-next RFC v5 05/15] net/mlx5: Add functions to set/query MFRL register

2020-09-18 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/core/fw_reset.c| 46 +++ .../ethernet/mellanox/mlx5/core/fw_reset.h| 13

[PATCH net-next RFC v5 04/15] devlink: Add reload actions stats to dev get

2020-09-18 Thread Moshe Shemesh
0 },{ "fw_activate": 0 },{ "fw_activate_no_reset": 0 },{ "remote_driver_reinit": 1 },{ "remote_fw_activate": 1 },{

[PATCH net-next RFC v5 07/15] net/mlx5: Handle sync reset request event

2020-09-18 Thread Moshe Shemesh
it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Moved handling of sync reset recovery from health to fw_reset --- .../ethernet/mellanox/mlx5/core/fw_reset.c|

[PATCH net-next RFC v5 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-18 Thread Moshe Shemesh
synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh --- v4 -> v5: - If fw activation was called by another PF update the remote actions stats v3 -> v4: - Renamed actions_done to actions_performed v2 -> v3: - Return the reload actions done - Update relo

[PATCH net-next RFC v5 00/15] Add devlink reload action and limit level options

2020-09-18 Thread Moshe Shemesh
for fw_activate reload action. Patch 15 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

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Moshe Shemesh
On 9/14/2020 4:54 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:57AM CEST, mo...@mellanox.com wrote: [..] +static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) +{ + struct mlx5_fw_reset *fw_reset = dev->priv.fw_reset; + + /* if this is the driver that

Re: [PATCH net-next RFC v4 03/15] devlink: Add reload action stats

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 4:33 PM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 02:30:19PM CEST, mo...@nvidia.com wrote: On 9/14/2020 4:39 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:50AM CEST, mo...@mellanox.com wrote: [..] +/** + * devlink_reload_implicit_actions_performed - Update devlink on

Re: [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 4:34 PM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 02:31:38PM CEST, mo...@nvidia.com wrote: On 9/15/2020 10:44 AM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 08:45:19AM CEST, ido...@idosch.org wrote: On Mon, Sep 14, 2020 at 03:45:00PM +0200, Jiri Pirko wrote: Mon, Sep 14, 2020 at

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 4:37 PM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 02:44:02PM CEST, mo...@nvidia.com wrote: On 9/14/2020 4:54 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:57AM CEST, mo...@mellanox.com wrote: [..] +static void mlx5_fw_reset_complete_reload(struct mlx5_core_dev *dev) +{ +

Re: [PATCH net-next RFC v4 15/15] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 7:04 PM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Mon, 14 Sep 2020 09:08:02 +0300 Moshe Shemesh wrote: + * - ``no_reset`` + - No reset allowed, no down time allowed, no link flap and no + configuration is lost. It still

Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 4:26 PM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 02:12:25PM CEST, mo...@nvidia.com wrote: On 9/14/2020 3:27 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:48AM CEST, mo...@mellanox.com wrote: [..] @@ -7392,6 +7485,11 @@ struct devlink *devlink_alloc(const struct

Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 12:33 AM, Jakub Kicinski wrote: External email: Use caution opening links or attachments On Mon, 14 Sep 2020 09:07:48 +0300 Moshe Shemesh wrote: @@ -3011,12 +3060,41 @@ static int devlink_nl_cmd_reload(struct sk_buff *skb, struct genl_info *info) return

Re: [PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-15 Thread Moshe Shemesh
it will be loaded. Once this reload command is executed the driver initiates fw sync reset flow, where the firmware synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Renamed actions_done to actions_performed v2 -> v3: - Return the reload actions done -

Re: [PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get

2020-09-15 Thread Moshe Shemesh
On 9/15/2020 10:44 AM, Jiri Pirko wrote: Tue, Sep 15, 2020 at 08:45:19AM CEST, ido...@idosch.org wrote: On Mon, Sep 14, 2020 at 03:45:00PM +0200, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:51AM CEST, mo...@mellanox.com wrote: Expose devlink reload actions stats to the user through devlink

Re: [PATCH net-next RFC v4 03/15] devlink: Add reload action stats

2020-09-15 Thread Moshe Shemesh
in case firmware activation with reset finished successfully but was initiated by remote host. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Renamed reload_actions_cnts to reload_action_stats - Add devlink notifications on stats update - Renamed devlink_reload_actions_implicit_actions_perfor

Re: [PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-15 Thread Moshe Shemesh
dev reload pci/:82:00.0 action fw_activate reload_actions_performed: driver_reinit fw_activate Signed-off-by: Moshe Shemesh --- v3 -> v4: - Removed fw_activate_no_reset as an action (next patch adds limit levels instead). - Renamed actions_done to actions_performed v2 -> v3: - R

Re: [PATCH net-next RFC v4 02/15] devlink: Add reload action limit level

2020-09-15 Thread Moshe Shemesh
On 9/14/2020 4:10 PM, Jiri Pirko wrote: Mon, Sep 14, 2020 at 08:07:49AM CEST, mo...@mellanox.com wrote: [..] diff --git a/include/net/devlink.h b/include/net/devlink.h index b09db891db04..9ee5b8a9 100644 --- a/include/net/devlink.h +++ b/include/net/devlink.h @@

[PATCH net-next RFC v4 04/15] devlink: Add reload actions stats to dev get

2020-09-14 Thread Moshe Shemesh
{ "reload_action_stats": [ { "driver_reinit": 1 },{ "fw_activate": 1 },{ "driver_reinit_no_reset": 0 },{ "fw_activate_no_reset&qu

[PATCH net-next RFC v4 05/15] net/mlx5: Add functions to set/query MFRL register

2020-09-14 Thread Moshe Shemesh
Add functions to query and set the MFRL reset options supported by firmware. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/Makefile | 2 +- .../ethernet/mellanox/mlx5/core/fw_reset.c| 46 +++ .../ethernet/mellanox/mlx5/core/fw_reset.h| 13

[PATCH net-next RFC v4 00/15] Add devlink reload action and

2020-09-14 Thread Moshe Shemesh
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

[PATCH net-next RFC v4 03/15] devlink: Add reload action stats

2020-09-14 Thread Moshe Shemesh
update. The function devlink_reload_actions_implicit_actions_performed() is exported to enable also drivers update on reload actions performed, for example in case firmware activation with reset finished successfully but was initiated by remote host. Signed-off-by: Moshe Shemesh --- v3 ->

[PATCH net-next RFC v4 12/15] net/mlx5: Add devlink param enable_remote_dev_reset support

2020-09-14 Thread Moshe Shemesh
for firmware update reset is enabled. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Have MLX5_FW_RESET_FLAGS_NACK_RESET_REQUEST instead of MLX5_HEALTH_RESET_FLAGS_NACK_RESET_REQUEST --- .../net/ethernet/mellanox/mlx5/core/devlink.c | 21 + .../ethernet/mellanox/mlx5/core/fw_rese

[PATCH net-next RFC v4 06/15] net/mlx5: Set cap for pci sync for fw update event

2020-09-14 Thread Moshe Shemesh
Set capability to notify the firmware that this host driver is capable of handling pci sync for firmware update events. Signed-off-by: Moshe Shemesh --- drivers/net/ethernet/mellanox/mlx5/core/main.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/net/ethernet/mellanox/mlx5/core

[PATCH net-next RFC v4 11/15] devlink: Add enable_remote_dev_reset generic parameter

2020-09-14 Thread Moshe Shemesh
NACK any attempt to reset the device while the driver is loaded. Signed-off-by: Moshe Shemesh --- Documentation/networking/devlink/devlink-params.rst | 6 ++ include/net/devlink.h | 4 net/core/devlink.c | 5 + 3 files

[PATCH net-next RFC v4 15/15] devlink: Add Documentation/networking/devlink/devlink-reload.rst

2020-09-14 Thread Moshe Shemesh
Add devlink reload rst documentation file. Update index file to include it. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Remove reload action fw_activate_no_reset - Add reload actions limit levels and document the no_reset limit level constrains v2 -> v3: - Devlink reload returns the a

[PATCH net-next RFC v4 01/15] devlink: Add reload action option to devlink reload command

2020-09-14 Thread Moshe Shemesh
-off-by: Moshe Shemesh --- v3 -> v4: - Removed fw_activate_no_reset as an action (next patch adds limit levels instead). - Renamed actions_done to actions_performed v2 -> v3: - Replace fw_live_patch action by fw_activate_no_reset - Devlink reload returns the actions done over netlink reply v1

[PATCH net-next RFC v4 13/15] net/mlx5: Add support for fw live patch event

2020-09-14 Thread Moshe Shemesh
database to help debugging an issue. Signed-off-by: Moshe Shemesh --- .../mellanox/mlx5/core/diag/fw_tracer.c | 31 +++ .../mellanox/mlx5/core/diag/fw_tracer.h | 1 + .../ethernet/mellanox/mlx5/core/fw_reset.c| 27 include/linux/mlx5/device.h

[PATCH net-next RFC v4 08/15] net/mlx5: Handle sync reset now event

2020-09-14 Thread Moshe Shemesh
bridge by checking that all the PF functions under the same PCI bridge have same device ID. If no other device it uses PCI bridge link control to turn link down and up. Signed-off-by: Moshe Shemesh --- .../ethernet/mellanox/mlx5/core/fw_reset.c| 121 ++ 1 file changed, 121

[PATCH net-next RFC v4 07/15] net/mlx5: Handle sync reset request event

2020-09-14 Thread Moshe Shemesh
it moves to reset requested mode and if it gets PCI reset triggered by the other PF it detect the reset and reloads. Signed-off-by: Moshe Shemesh --- v1 -> v2: - Moved handling of sync reset recovery from health to fw_reset --- .../ethernet/mellanox/mlx5/core/fw_reset.c|

[PATCH net-next RFC v4 10/15] net/mlx5: Add support for devlink reload action fw activate

2020-09-14 Thread Moshe Shemesh
synchronizes all PFs on coming reset and driver reload. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Renamed actions_done to actions_performed v2 -> v3: - Return the reload actions done - Update reload action counters if reset initiated by remote host v1 -> v2: - Have fw_activate actio

[PATCH net-next RFC v4 02/15] devlink: Add reload action limit level

2020-09-14 Thread Moshe Shemesh
time allowed, no link flap and no configuration is lost. The no_reset limit level will have usecase in this patchset to implement restricted fw_activate on mlx5. Signed-off-by: Moshe Shemesh --- v3 -> v4: - New patch --- drivers/net/ethernet/mellanox/mlx4/main.c | 3 ++ .../

[PATCH net-next RFC v4 14/15] net/mlx5: Add support for devlink reload action limit level no reset

2020-09-14 Thread Moshe Shemesh
. If it is then it triggers firmware live patching flow. Signed-off-by: Moshe Shemesh --- v3 -> v4: - Have action fw_activate with limit level no_reset instead of action fw_activate_no_reset v2 -> v3: - Replace fw_live_patch action by fw_activate_no_reset v1 -> v2: - Have fw_live_pat

[PATCH net-next RFC v4 09/15] net/mlx5: Handle sync reset abort event

2020-09-14 Thread Moshe Shemesh
If firmware sends sync_reset_abort to driver the driver should clear the reset requested mode as reset is not expected any more. Signed-off-by: Moshe Shemesh --- .../net/ethernet/mellanox/mlx5/core/fw_reset.c| 15 +++ 1 file changed, 15 insertions(+) diff --git a/drivers/net

Re: [PATCH net-next RFC v3 01/14] devlink: Add reload action option to devlink reload command

2020-09-09 Thread Moshe Shemesh
On 9/7/2020 8:58 PM, Jakub Kicinski wrote: On Mon, 7 Sep 2020 16:46:01 +0300 Moshe Shemesh wrote: In that sense I don't like --live because it doesn't really say much. AFAIU it means 1) no link flap; 2) < 2 sec datapath downtime; 3) no configuration is lost in kernel or device (includ

  1   2   >