netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch net 0/3] mlxsw: Couple of fixes
@ 2016-05-06  9:17 Jiri Pirko
  2016-05-06  9:17 ` [patch net 1/3] mlxsw: spectrum: Fix rollback order in LAG join failure Jiri Pirko
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06  9:17 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@mellanox.com>

Ido Schimmel (2):
  mlxsw: spectrum: Fix rollback order in LAG join failure
  mlxsw: spectrum: Add missing rollback in flood configuration

Jiri Pirko (1):
  mlxsw: spectrum: Fix ordering in mlxsw_sp_fini

 drivers/net/ethernet/mellanox/mlxsw/spectrum.c           | 5 +++--
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 ++++++++
 2 files changed, 11 insertions(+), 2 deletions(-)

-- 
2.5.5

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

* [patch net 1/3] mlxsw: spectrum: Fix rollback order in LAG join failure
  2016-05-06  9:17 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
@ 2016-05-06  9:17 ` Jiri Pirko
  2016-05-06  9:17 ` [patch net 2/3] mlxsw: spectrum: Add missing rollback in flood configuration Jiri Pirko
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06  9:17 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Ido Schimmel <idosch@mellanox.com>

Make the leave procedure in the error path symmetric to the join
procedure and first remove the port from the collector before
potentially destroying the LAG.

Fixes: 0d65fc13042f ("mlxsw: spectrum: Implement LAG port join/leave")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 4afbc3e..668b2f4 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2541,11 +2541,11 @@ static int mlxsw_sp_port_lag_join(struct mlxsw_sp_port *mlxsw_sp_port,
 	lag->ref_count++;
 	return 0;
 
+err_col_port_enable:
+	mlxsw_sp_lag_col_port_remove(mlxsw_sp_port, lag_id);
 err_col_port_add:
 	if (!lag->ref_count)
 		mlxsw_sp_lag_destroy(mlxsw_sp, lag_id);
-err_col_port_enable:
-	mlxsw_sp_lag_col_port_remove(mlxsw_sp_port, lag_id);
 	return err;
 }
 
-- 
2.5.5

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

* [patch net 2/3] mlxsw: spectrum: Add missing rollback in flood configuration
  2016-05-06  9:17 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
  2016-05-06  9:17 ` [patch net 1/3] mlxsw: spectrum: Fix rollback order in LAG join failure Jiri Pirko
@ 2016-05-06  9:17 ` Jiri Pirko
  2016-05-06  9:17 ` [patch net 3/3] mlxsw: spectrum: Fix ordering in mlxsw_sp_fini Jiri Pirko
  2016-05-06 20:00 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06  9:17 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Ido Schimmel <idosch@mellanox.com>

When we fail to set the flooding configuration for the broadcast and
unregistered multicast traffic, we should revert the flooding
configuration of the unknown unicast traffic.

Fixes: 0293038e0c36 ("mlxsw: spectrum: Add support for flood control")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
index e1c74ef..9cd6f47 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_switchdev.c
@@ -214,7 +214,15 @@ static int __mlxsw_sp_port_flood_set(struct mlxsw_sp_port *mlxsw_sp_port,
 	mlxsw_reg_sftr_pack(sftr_pl, MLXSW_SP_FLOOD_TABLE_BM, idx_begin,
 			    table_type, range, local_port, set);
 	err = mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(sftr), sftr_pl);
+	if (err)
+		goto err_flood_bm_set;
+	else
+		goto buffer_out;
 
+err_flood_bm_set:
+	mlxsw_reg_sftr_pack(sftr_pl, MLXSW_SP_FLOOD_TABLE_UC, idx_begin,
+			    table_type, range, local_port, !set);
+	mlxsw_reg_write(mlxsw_sp->core, MLXSW_REG(sftr), sftr_pl);
 buffer_out:
 	kfree(sftr_pl);
 	return err;
-- 
2.5.5

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

* [patch net 3/3] mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
  2016-05-06  9:17 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
  2016-05-06  9:17 ` [patch net 1/3] mlxsw: spectrum: Fix rollback order in LAG join failure Jiri Pirko
  2016-05-06  9:17 ` [patch net 2/3] mlxsw: spectrum: Add missing rollback in flood configuration Jiri Pirko
@ 2016-05-06  9:17 ` Jiri Pirko
  2016-05-06 20:00 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
  3 siblings, 0 replies; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06  9:17 UTC (permalink / raw)
  To: netdev; +Cc: davem, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@mellanox.com>

Fixes: 0f433fa0ec ("mlxsw: spectrum_buffers: Implement shared buffer configuration")
Signed-off-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
index 668b2f4..749cc27 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -2159,6 +2159,7 @@ static void mlxsw_sp_fini(void *priv)
 	struct mlxsw_sp *mlxsw_sp = priv;
 
 	mlxsw_sp_switchdev_fini(mlxsw_sp);
+	mlxsw_sp_buffers_fini(mlxsw_sp);
 	mlxsw_sp_traps_fini(mlxsw_sp);
 	mlxsw_sp_event_unregister(mlxsw_sp, MLXSW_TRAP_ID_PUDE);
 	mlxsw_sp_ports_remove(mlxsw_sp);
-- 
2.5.5

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

* Re: [patch net 0/3] mlxsw: Couple of fixes
  2016-05-06  9:17 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
                   ` (2 preceding siblings ...)
  2016-05-06  9:17 ` [patch net 3/3] mlxsw: spectrum: Fix ordering in mlxsw_sp_fini Jiri Pirko
@ 2016-05-06 20:00 ` David Miller
  2016-05-06 20:13   ` Jiri Pirko
  3 siblings, 1 reply; 9+ messages in thread
From: David Miller @ 2016-05-06 20:00 UTC (permalink / raw)
  To: jiri; +Cc: netdev, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@resnulli.us>
Date: Fri,  6 May 2016 11:17:21 +0200

> From: Jiri Pirko <jiri@mellanox.com>
> 
> Ido Schimmel (2):
>   mlxsw: spectrum: Fix rollback order in LAG join failure
>   mlxsw: spectrum: Add missing rollback in flood configuration
> 
> Jiri Pirko (1):
>   mlxsw: spectrum: Fix ordering in mlxsw_sp_fini

What tree is this for?  Because on 'net' this makes the build fail.

drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]


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

* Re: [patch net 0/3] mlxsw: Couple of fixes
  2016-05-06 20:00 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
@ 2016-05-06 20:13   ` Jiri Pirko
  2016-05-06 20:15     ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Pirko @ 2016-05-06 20:13 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, idosch, eladr, yotamg, ogerlitz

Fri, May 06, 2016 at 10:00:32PM CEST, davem@davemloft.net wrote:
>From: Jiri Pirko <jiri@resnulli.us>
>Date: Fri,  6 May 2016 11:17:21 +0200
>
>> From: Jiri Pirko <jiri@mellanox.com>
>> 
>> Ido Schimmel (2):
>>   mlxsw: spectrum: Fix rollback order in LAG join failure
>>   mlxsw: spectrum: Add missing rollback in flood configuration
>> 
>> Jiri Pirko (1):
>>   mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
>
>What tree is this for?  Because on 'net' this makes the build fail.
>
>drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
>drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]
>

Oh. Ido's patches are for -net, mine if for -net-next. I did't realize,
sorry. Do you want me to repost?

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

* Re: [patch net 0/3] mlxsw: Couple of fixes
  2016-05-06 20:13   ` Jiri Pirko
@ 2016-05-06 20:15     ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2016-05-06 20:15 UTC (permalink / raw)
  To: jiri; +Cc: netdev, idosch, eladr, yotamg, ogerlitz

From: Jiri Pirko <jiri@resnulli.us>
Date: Fri, 6 May 2016 22:13:49 +0200

> Fri, May 06, 2016 at 10:00:32PM CEST, davem@davemloft.net wrote:
>>From: Jiri Pirko <jiri@resnulli.us>
>>Date: Fri,  6 May 2016 11:17:21 +0200
>>
>>> From: Jiri Pirko <jiri@mellanox.com>
>>> 
>>> Ido Schimmel (2):
>>>   mlxsw: spectrum: Fix rollback order in LAG join failure
>>>   mlxsw: spectrum: Add missing rollback in flood configuration
>>> 
>>> Jiri Pirko (1):
>>>   mlxsw: spectrum: Fix ordering in mlxsw_sp_fini
>>
>>What tree is this for?  Because on 'net' this makes the build fail.
>>
>>drivers/net/ethernet/mellanox/mlxsw/spectrum.c: In function ‘mlxsw_sp_fini’:
>>drivers/net/ethernet/mellanox/mlxsw/spectrum.c:2162:2: error: implicit declaration of function ‘mlxsw_sp_buffers_fini’ [-Werror=implicit-function-declaration]
>>
> 
> Oh. Ido's patches are for -net, mine if for -net-next. I did't realize,
> sorry. Do you want me to repost?

Yes, please post them properly.

Thanks.

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

* [patch net 0/3] mlxsw: Couple of fixes
@ 2017-01-12  8:10 Jiri Pirko
  2017-01-12 14:26 ` David Miller
  0 siblings, 1 reply; 9+ messages in thread
From: Jiri Pirko @ 2017-01-12  8:10 UTC (permalink / raw)
  To: netdev; +Cc: davem, arkadis, eladr, yotamg, nogahf, idosch

From: Jiri Pirko <jiri@mellanox.com>

Couple of simple fixes from Arkadi and Elad.

Please queue these up for stable. Thanks.

Arkadi Sharshevsky (2):
  mlxsw: spectrum: Fix memory leak at skb reallocation
  mlxsw: switchx2: Fix memory leak at skb reallocation

Elad Raz (1):
  mlxsw: pci: Fix EQE structure definition

 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h   | 8 ++++----
 drivers/net/ethernet/mellanox/mlxsw/spectrum.c | 1 +
 drivers/net/ethernet/mellanox/mlxsw/switchx2.c | 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)

-- 
2.7.4

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

* Re: [patch net 0/3] mlxsw: Couple of fixes
  2017-01-12  8:10 Jiri Pirko
@ 2017-01-12 14:26 ` David Miller
  0 siblings, 0 replies; 9+ messages in thread
From: David Miller @ 2017-01-12 14:26 UTC (permalink / raw)
  To: jiri; +Cc: netdev, arkadis, eladr, yotamg, nogahf, idosch

From: Jiri Pirko <jiri@resnulli.us>
Date: Thu, 12 Jan 2017 09:10:36 +0100

> Couple of simple fixes from Arkadi and Elad.
> 
> Please queue these up for stable. Thanks.

Series applied and queued up for -stable, thanks.

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

end of thread, other threads:[~2017-01-12 14:26 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-06  9:17 [patch net 0/3] mlxsw: Couple of fixes Jiri Pirko
2016-05-06  9:17 ` [patch net 1/3] mlxsw: spectrum: Fix rollback order in LAG join failure Jiri Pirko
2016-05-06  9:17 ` [patch net 2/3] mlxsw: spectrum: Add missing rollback in flood configuration Jiri Pirko
2016-05-06  9:17 ` [patch net 3/3] mlxsw: spectrum: Fix ordering in mlxsw_sp_fini Jiri Pirko
2016-05-06 20:00 ` [patch net 0/3] mlxsw: Couple of fixes David Miller
2016-05-06 20:13   ` Jiri Pirko
2016-05-06 20:15     ` David Miller
  -- strict thread matches above, loose matches on Subject: below --
2017-01-12  8:10 Jiri Pirko
2017-01-12 14:26 ` David Miller

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).