* [PATCH net 0/2] mlxsw: Couple of fixes
@ 2020-11-17 17:33 Ido Schimmel
2020-11-17 17:33 ` [PATCH net 1/2] mlxsw: Fix firmware flashing Ido Schimmel
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Ido Schimmel @ 2020-11-17 17:33 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
This patch set contains two fixes for mlxsw.
Patch #1 fixes firmware flashing when CONFIG_MLXSW_CORE=y and
CONFIG_MLXFW=m.
Patch #2 prevents EMAD transactions from needlessly failing when the
system is under heavy load by using exponential backoff.
Please consider patch #2 for stable.
Ido Schimmel (2):
mlxsw: Fix firmware flashing
mlxsw: core: Use variable timeout for EMAD retries
drivers/net/ethernet/mellanox/mlxsw/Kconfig | 2 +-
drivers/net/ethernet/mellanox/mlxsw/core.c | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
--
2.28.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH net 1/2] mlxsw: Fix firmware flashing
2020-11-17 17:33 [PATCH net 0/2] mlxsw: Couple of fixes Ido Schimmel
@ 2020-11-17 17:33 ` Ido Schimmel
2020-11-17 17:33 ` [PATCH net 2/2] mlxsw: core: Use variable timeout for EMAD retries Ido Schimmel
2020-11-18 19:09 ` [PATCH net 0/2] mlxsw: Couple of fixes Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2020-11-17 17:33 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
The commit cited below moved firmware flashing functionality from
mlxsw_spectrum to mlxsw_core, but did not adjust the Kconfig
dependencies. This makes it possible to have mlxsw_core as built-in and
mlxfw as a module. The mlxfw code is therefore not reachable from
mlxsw_core and firmware flashing fails:
# devlink dev flash pci/0000:01:00.0 file mellanox/mlxsw_spectrum-13.2008.1310.mfa2
devlink answers: Operation not supported
Fix by having mlxsw_core select mlxfw.
Fixes: b79cb787ac70 ("mlxsw: Move fw flashing code into core.c")
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reported-by: Vadim Pasternak <vadimp@nvidia.com>
Tested-by: Vadim Pasternak <vadimp@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
---
drivers/net/ethernet/mellanox/mlxsw/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/Kconfig b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
index 872e9910bb7c..a619d90559f7 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/Kconfig
+++ b/drivers/net/ethernet/mellanox/mlxsw/Kconfig
@@ -6,6 +6,7 @@
config MLXSW_CORE
tristate "Mellanox Technologies Switch ASICs support"
select NET_DEVLINK
+ select MLXFW
help
This driver supports Mellanox Technologies Switch ASICs family.
@@ -82,7 +83,6 @@ config MLXSW_SPECTRUM
select GENERIC_ALLOCATOR
select PARMAN
select OBJAGG
- select MLXFW
imply PTP_1588_CLOCK
select NET_PTP_CLASSIFY if PTP_1588_CLOCK
default m
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH net 2/2] mlxsw: core: Use variable timeout for EMAD retries
2020-11-17 17:33 [PATCH net 0/2] mlxsw: Couple of fixes Ido Schimmel
2020-11-17 17:33 ` [PATCH net 1/2] mlxsw: Fix firmware flashing Ido Schimmel
@ 2020-11-17 17:33 ` Ido Schimmel
2020-11-18 19:09 ` [PATCH net 0/2] mlxsw: Couple of fixes Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Ido Schimmel @ 2020-11-17 17:33 UTC (permalink / raw)
To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel
From: Ido Schimmel <idosch@nvidia.com>
The driver sends Ethernet Management Datagram (EMAD) packets to the
device for configuration purposes and waits for up to 200ms for a reply.
A request is retried up to 5 times.
When the system is under heavy load, replies are not always processed in
time and EMAD transactions fail.
Make the process more robust to such delays by using exponential
backoff. First wait for up to 200ms, then retransmit and wait for up to
400ms and so on.
Fixes: caf7297e7ab5 ("mlxsw: core: Introduce support for asynchronous EMAD register access")
Reported-by: Denis Yulevich <denisyu@nvidia.com>
Tested-by: Denis Yulevich <denisyu@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
---
drivers/net/ethernet/mellanox/mlxsw/core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mellanox/mlxsw/core.c b/drivers/net/ethernet/mellanox/mlxsw/core.c
index 937b8e46f8c7..1a86535c4968 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/core.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/core.c
@@ -571,7 +571,8 @@ static void mlxsw_emad_trans_timeout_schedule(struct mlxsw_reg_trans *trans)
if (trans->core->fw_flash_in_progress)
timeout = msecs_to_jiffies(MLXSW_EMAD_TIMEOUT_DURING_FW_FLASH_MS);
- queue_delayed_work(trans->core->emad_wq, &trans->timeout_dw, timeout);
+ queue_delayed_work(trans->core->emad_wq, &trans->timeout_dw,
+ timeout << trans->retries);
}
static int mlxsw_emad_transmit(struct mlxsw_core *mlxsw_core,
--
2.28.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH net 0/2] mlxsw: Couple of fixes
2020-11-17 17:33 [PATCH net 0/2] mlxsw: Couple of fixes Ido Schimmel
2020-11-17 17:33 ` [PATCH net 1/2] mlxsw: Fix firmware flashing Ido Schimmel
2020-11-17 17:33 ` [PATCH net 2/2] mlxsw: core: Use variable timeout for EMAD retries Ido Schimmel
@ 2020-11-18 19:09 ` Jakub Kicinski
2 siblings, 0 replies; 4+ messages in thread
From: Jakub Kicinski @ 2020-11-18 19:09 UTC (permalink / raw)
To: Ido Schimmel; +Cc: netdev, davem, jiri, mlxsw, Ido Schimmel
On Tue, 17 Nov 2020 19:33:50 +0200 Ido Schimmel wrote:
> This patch set contains two fixes for mlxsw.
>
> Patch #1 fixes firmware flashing when CONFIG_MLXSW_CORE=y and
> CONFIG_MLXFW=m.
>
> Patch #2 prevents EMAD transactions from needlessly failing when the
> system is under heavy load by using exponential backoff.
>
> Please consider patch #2 for stable.
Applied, and queued, thanks!
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-11-18 19:09 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-17 17:33 [PATCH net 0/2] mlxsw: Couple of fixes Ido Schimmel
2020-11-17 17:33 ` [PATCH net 1/2] mlxsw: Fix firmware flashing Ido Schimmel
2020-11-17 17:33 ` [PATCH net 2/2] mlxsw: core: Use variable timeout for EMAD retries Ido Schimmel
2020-11-18 19:09 ` [PATCH net 0/2] mlxsw: Couple of fixes Jakub Kicinski
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).