All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH net 0/2] mlxsw: Two small fixes
@ 2019-07-31  6:33 Ido Schimmel
  2019-07-31  6:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() Ido Schimmel
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Ido Schimmel @ 2019-07-31  6:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

Patch #1 from Jiri fixes the error path of the module initialization
function. Found during manual code inspection.

Patch #2 from Petr further reduces the default shared buffer pool sizes
in order to work around a problem that was originally described in
commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
Spectrum-2").

Jiri Pirko (1):
  mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()

Petr Machata (1):
  mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c         | 2 +-
 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

-- 
2.21.0


^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()
  2019-07-31  6:33 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
@ 2019-07-31  6:33 ` Ido Schimmel
  2019-08-08  5:19   ` Jesse Brandeburg
  2019-07-31  6:33 ` [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2 Ido Schimmel
  2019-07-31 15:24 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
  2 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2019-07-31  6:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Jiri Pirko <jiri@mellanox.com>

In case of sp2 pci driver registration fail, fix the error path to
start with sp1 pci driver unregister.

Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 650638152bbc..eda9c23e87b2 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -6330,7 +6330,7 @@ static int __init mlxsw_sp_module_init(void)
 	return 0;
 
 err_sp2_pci_driver_register:
-	mlxsw_pci_driver_unregister(&mlxsw_sp2_pci_driver);
+	mlxsw_pci_driver_unregister(&mlxsw_sp1_pci_driver);
 err_sp1_pci_driver_register:
 	mlxsw_core_driver_unregister(&mlxsw_sp2_driver);
 err_sp2_core_driver_register:
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2
  2019-07-31  6:33 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
  2019-07-31  6:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() Ido Schimmel
@ 2019-07-31  6:33 ` Ido Schimmel
  2019-08-08  5:19   ` Jesse Brandeburg
  2019-07-31 15:24 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
  2 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2019-07-31  6:33 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, petrm, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

In commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
Spectrum-2"), pool size was reduced to mitigate a problem in port buffer
usage of ports split four ways. It turns out that this work around does not
solve the issue, and a further reduction is required.

Thus reduce the size of pool 0 by another 2.7 MiB, and round down to the
whole number of cells.

Fixes: e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2")
Signed-off-by: Petr Machata <petrm@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
index 1537f70bc26d..888ba4300bcc 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
@@ -437,8 +437,8 @@ static const struct mlxsw_sp_sb_pr mlxsw_sp1_sb_prs[] = {
 			   MLXSW_SP1_SB_PR_CPU_SIZE, true, false),
 };
 
-#define MLXSW_SP2_SB_PR_INGRESS_SIZE	38128752
-#define MLXSW_SP2_SB_PR_EGRESS_SIZE	38128752
+#define MLXSW_SP2_SB_PR_INGRESS_SIZE	35297568
+#define MLXSW_SP2_SB_PR_EGRESS_SIZE	35297568
 #define MLXSW_SP2_SB_PR_CPU_SIZE	(256 * 1000)
 
 /* Order according to mlxsw_sp2_sb_pool_dess */
-- 
2.21.0


^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/2] mlxsw: Two small fixes
  2019-07-31  6:33 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
  2019-07-31  6:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() Ido Schimmel
  2019-07-31  6:33 ` [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2 Ido Schimmel
@ 2019-07-31 15:24 ` David Miller
  2 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2019-07-31 15:24 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, mlxsw, idosch

From: Ido Schimmel <idosch@idosch.org>
Date: Wed, 31 Jul 2019 09:33:13 +0300

> From: Ido Schimmel <idosch@mellanox.com>
> 
> Patch #1 from Jiri fixes the error path of the module initialization
> function. Found during manual code inspection.
> 
> Patch #2 from Petr further reduces the default shared buffer pool sizes
> in order to work around a problem that was originally described in
> commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
> Spectrum-2").

Series applied and queued up for -stable, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init()
  2019-07-31  6:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() Ido Schimmel
@ 2019-08-08  5:19   ` Jesse Brandeburg
  0 siblings, 0 replies; 10+ messages in thread
From: Jesse Brandeburg @ 2019-08-08  5:19 UTC (permalink / raw)
  To: Ido Schimmel
  Cc: netdev, davem, jiri, petrm, mlxsw, Ido Schimmel, jesse.brandeburg

On Wed, 31 Jul 2019 09:33:14 +0300
Ido Schimmel <idosch@idosch.org> wrote:

> From: Jiri Pirko <jiri@mellanox.com>
> 
> In case of sp2 pci driver registration fail, fix the error path to
> start with sp1 pci driver unregister.
> 
> Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC")
> Signed-off-by: Jiri Pirko <jiri@mellanox.com>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2
  2019-07-31  6:33 ` [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2 Ido Schimmel
@ 2019-08-08  5:19   ` Jesse Brandeburg
  0 siblings, 0 replies; 10+ messages in thread
From: Jesse Brandeburg @ 2019-08-08  5:19 UTC (permalink / raw)
  To: Ido Schimmel
  Cc: netdev, davem, jiri, petrm, mlxsw, Ido Schimmel, jesse.brandeburg

On Wed, 31 Jul 2019 09:33:15 +0300
Ido Schimmel <idosch@idosch.org> wrote:

> From: Petr Machata <petrm@mellanox.com>
> 
> In commit e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on
> Spectrum-2"), pool size was reduced to mitigate a problem in port buffer
> usage of ports split four ways. It turns out that this work around does not
> solve the issue, and a further reduction is required.
> 
> Thus reduce the size of pool 0 by another 2.7 MiB, and round down to the
> whole number of cells.
> 
> Fixes: e891ce1dd2a5 ("mlxsw: spectrum_buffers: Reduce pool size on Spectrum-2")
> Signed-off-by: Petr Machata <petrm@mellanox.com>
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>

Reviewed-by: Jesse Brandeburg <jesse.brandeburg@intel.com>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/2] mlxsw: Two small fixes
  2021-11-23  7:52 Ido Schimmel
@ 2021-11-23 11:50 ` patchwork-bot+netdevbpf
  0 siblings, 0 replies; 10+ messages in thread
From: patchwork-bot+netdevbpf @ 2021-11-23 11:50 UTC (permalink / raw)
  To: Ido Schimmel; +Cc: netdev, davem, kuba, jiri, mlxsw, idosch

Hello:

This series was applied to netdev/net.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 23 Nov 2021 09:52:54 +0200 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> Patch #1 fixes a recent regression that prevents the driver from loading
> with old firmware versions.
> 
> Patch #2 protects the driver from a NULL pointer dereference when
> working on top of a buggy firmware. This was never observed in an actual
> system, only on top of an emulator during development.
> 
> [...]

Here is the summary with links:
  - [net,1/2] mlxsw: spectrum: Allow driver to load with old firmware versions
    https://git.kernel.org/netdev/net/c/ce4995bc6c8e
  - [net,2/2] mlxsw: spectrum: Protect driver from buggy firmware
    https://git.kernel.org/netdev/net/c/63b08b1f6834

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 0/2] mlxsw: Two small fixes
@ 2021-11-23  7:52 Ido Schimmel
  2021-11-23 11:50 ` patchwork-bot+netdevbpf
  0 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2021-11-23  7:52 UTC (permalink / raw)
  To: netdev; +Cc: davem, kuba, jiri, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@nvidia.com>

Patch #1 fixes a recent regression that prevents the driver from loading
with old firmware versions.

Patch #2 protects the driver from a NULL pointer dereference when
working on top of a buggy firmware. This was never observed in an actual
system, only on top of an emulator during development.

Amit Cohen (1):
  mlxsw: spectrum: Protect driver from buggy firmware

Danielle Ratson (1):
  mlxsw: spectrum: Allow driver to load with old firmware versions

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

-- 
2.31.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH net 0/2] mlxsw: Two small fixes
  2019-05-29  7:59 Ido Schimmel
@ 2019-05-30 19:31 ` David Miller
  0 siblings, 0 replies; 10+ messages in thread
From: David Miller @ 2019-05-30 19:31 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, mlxsw, idosch

From: Ido Schimmel <idosch@idosch.org>
Date: Wed, 29 May 2019 10:59:43 +0300

> From: Ido Schimmel <idosch@mellanox.com>
> 
> Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the
> insertion of two identical flower filters with different priorities
> would trigger a warning.
> 
> Patch #2 from Amit prevents the driver from trying to configure a port
> with a speed of 56Gb/s and autoneg off as this is not supported and
> results in error messages from firmware.

Series applied.

> Please consider patch #1 for stable.

Queued up, thanks.

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH net 0/2] mlxsw: Two small fixes
@ 2019-05-29  7:59 Ido Schimmel
  2019-05-30 19:31 ` David Miller
  0 siblings, 1 reply; 10+ messages in thread
From: Ido Schimmel @ 2019-05-29  7:59 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, mlxsw, Ido Schimmel

From: Ido Schimmel <idosch@mellanox.com>

Patch #1 from Jiri fixes an issue specific to Spectrum-2 where the
insertion of two identical flower filters with different priorities
would trigger a warning.

Patch #2 from Amit prevents the driver from trying to configure a port
with a speed of 56Gb/s and autoneg off as this is not supported and
results in error messages from firmware.

Please consider patch #1 for stable.

Amit Cohen (1):
  mlxsw: spectrum: Prevent force of 56G

Jiri Pirko (1):
  mlxsw: spectrum_acl: Avoid warning after identical rules insertion

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c        |  4 ++++
 .../net/ethernet/mellanox/mlxsw/spectrum_acl_erp.c    | 11 +++++------
 2 files changed, 9 insertions(+), 6 deletions(-)

-- 
2.20.1


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2021-11-23 11:50 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31  6:33 [PATCH net 0/2] mlxsw: Two small fixes Ido Schimmel
2019-07-31  6:33 ` [PATCH net 1/2] mlxsw: spectrum: Fix error path in mlxsw_sp_module_init() Ido Schimmel
2019-08-08  5:19   ` Jesse Brandeburg
2019-07-31  6:33 ` [PATCH net 2/2] mlxsw: spectrum_buffers: Further reduce pool size on Spectrum-2 Ido Schimmel
2019-08-08  5:19   ` Jesse Brandeburg
2019-07-31 15:24 ` [PATCH net 0/2] mlxsw: Two small fixes David Miller
  -- strict thread matches above, loose matches on Subject: below --
2021-11-23  7:52 Ido Schimmel
2021-11-23 11:50 ` patchwork-bot+netdevbpf
2019-05-29  7:59 Ido Schimmel
2019-05-30 19:31 ` David Miller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.