netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net 0/3] mlxsw: Few small fixes
@ 2019-04-18  7:14 Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 1/3] mlxsw: spectrum: Put MC TCs into DWRR mode Ido Schimmel
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Ido Schimmel @ 2019-04-18  7:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, Jiri Pirko, Petr Machata, Amit Cohen, mlxsw, Ido Schimmel

Patch #1, from Petr, adjusts mlxsw to provide the same QoS behavior for
both Spectrum-1 and Spectrum-2. The fix is required due to a difference
in the behavior of Spectrum-2 compared to Spectrum-1. The problem and
solution are described in the detail in the changelog.

Patch #2 increases the time period in which the driver waits for the
firmware to signal it has finished its initialization. The issue will be
fixed in future firmware versions and the timeout will be decreased.

Patch #3, from Amit, fixes a display problem where the autoneg status in
ethtool is not updated in case the netdev is not running.

Amit Cohen (1):
  mlxsw: spectrum: Fix autoneg status in ethtool

Ido Schimmel (1):
  mlxsw: pci: Reincrease PCI reset timeout

Petr Machata (1):
  mlxsw: spectrum: Put MC TCs into DWRR mode

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

-- 
2.20.1


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

* [PATCH net 1/3] mlxsw: spectrum: Put MC TCs into DWRR mode
  2019-04-18  7:14 [PATCH net 0/3] mlxsw: Few small fixes Ido Schimmel
@ 2019-04-18  7:14 ` Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 2/3] mlxsw: pci: Reincrease PCI reset timeout Ido Schimmel
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 7+ messages in thread
From: Ido Schimmel @ 2019-04-18  7:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, Jiri Pirko, Petr Machata, Amit Cohen, mlxsw, Ido Schimmel

From: Petr Machata <petrm@mellanox.com>

Both Spectrum-1 and Spectrum-2 chips are currently configured such that
pairs of TC n (which is used for UC traffic) and TC n+8 (which is used
for MC traffic) are feeding into the same subgroup. Strict
prioritization is configured between the two TCs, and by enabling
MC-aware mode on the switch, the lower-numbered (UC) TCs are favored
over the higher-numbered (MC) TCs.

On Spectrum-2 however, there is an issue in configuration of the
MC-aware mode. As a result, MC traffic is prioritized over UC traffic.
To work around the issue, configure the MC TCs with DWRR mode (while
keeping the UC TCs in strict mode).

With this patch, the multicast-unicast arbitration results in the same
behavior on both Spectrum-1 and Spectrum-2 chips.

Fixes: 7b8195306694 ("mlxsw: spectrum: Configure MC-aware mode on mlxsw ports")
Signed-off-by: Petr Machata <petrm@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 9eb63300c1d3..3745ea194632 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3316,7 +3316,7 @@ static int mlxsw_sp_port_ets_init(struct mlxsw_sp_port *mlxsw_sp_port)
 		err = mlxsw_sp_port_ets_set(mlxsw_sp_port,
 					    MLXSW_REG_QEEC_HIERARCY_TC,
 					    i + 8, i,
-					    false, 0);
+					    true, 100);
 		if (err)
 			return err;
 	}
-- 
2.20.1


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

* [PATCH net 2/3] mlxsw: pci: Reincrease PCI reset timeout
  2019-04-18  7:14 [PATCH net 0/3] mlxsw: Few small fixes Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 1/3] mlxsw: spectrum: Put MC TCs into DWRR mode Ido Schimmel
@ 2019-04-18  7:14 ` Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 3/3] mlxsw: spectrum: Fix autoneg status in ethtool Ido Schimmel
  2019-04-18 17:38 ` [PATCH net 0/3] mlxsw: Few small fixes David Miller
  3 siblings, 0 replies; 7+ messages in thread
From: Ido Schimmel @ 2019-04-18  7:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, Jiri Pirko, Petr Machata, Amit Cohen, mlxsw, Ido Schimmel

During driver initialization the driver sends a reset to the device and
waits for the firmware to signal that it is ready to continue.

Commit d2f372ba0914 ("mlxsw: pci: Increase PCI SW reset timeout")
increased the timeout to 13 seconds due to longer PHY calibration in
Spectrum-2 compared to Spectrum-1.

Recently it became apparent that this timeout is too short and therefore
this patch increases it again to a safer limit that will be reduced in
the future.

Fixes: c3ab435466d5 ("mlxsw: spectrum: Extend to support Spectrum-2 ASIC")
Fixes: d2f372ba0914 ("mlxsw: pci: Increase PCI SW reset timeout")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
 drivers/net/ethernet/mellanox/mlxsw/pci_hw.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
index ffee38e36ce8..8648ca171254 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
+++ b/drivers/net/ethernet/mellanox/mlxsw/pci_hw.h
@@ -27,7 +27,7 @@
 
 #define MLXSW_PCI_SW_RESET			0xF0010
 #define MLXSW_PCI_SW_RESET_RST_BIT		BIT(0)
-#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS	13000
+#define MLXSW_PCI_SW_RESET_TIMEOUT_MSECS	20000
 #define MLXSW_PCI_SW_RESET_WAIT_MSECS		100
 #define MLXSW_PCI_FW_READY			0xA1844
 #define MLXSW_PCI_FW_READY_MASK			0xFFFF
-- 
2.20.1


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

* [PATCH net 3/3] mlxsw: spectrum: Fix autoneg status in ethtool
  2019-04-18  7:14 [PATCH net 0/3] mlxsw: Few small fixes Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 1/3] mlxsw: spectrum: Put MC TCs into DWRR mode Ido Schimmel
  2019-04-18  7:14 ` [PATCH net 2/3] mlxsw: pci: Reincrease PCI reset timeout Ido Schimmel
@ 2019-04-18  7:14 ` Ido Schimmel
  2019-04-18 17:38 ` [PATCH net 0/3] mlxsw: Few small fixes David Miller
  3 siblings, 0 replies; 7+ messages in thread
From: Ido Schimmel @ 2019-04-18  7:14 UTC (permalink / raw)
  To: netdev; +Cc: davem, Jiri Pirko, Petr Machata, Amit Cohen, mlxsw, Ido Schimmel

From: Amit Cohen <amitc@mellanox.com>

If link is down and autoneg is set to on/off, the status in ethtool does
not change.

The reason is when the link is down the function returns with zero
before changing autoneg value.

Move the checking of link state (up/down) to be performed after setting
autoneg value, in order to be sure that autoneg will change in any case.

Fixes: 56ade8fe3fe1 ("mlxsw: spectrum: Add initial support for Spectrum ASIC")
Signed-off-by: Amit Cohen <amitc@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Acked-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 3745ea194632..6b8aa3761899 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.c
@@ -3126,11 +3126,11 @@ mlxsw_sp_port_set_link_ksettings(struct net_device *dev,
 	if (err)
 		return err;
 
+	mlxsw_sp_port->link.autoneg = autoneg;
+
 	if (!netif_running(dev))
 		return 0;
 
-	mlxsw_sp_port->link.autoneg = autoneg;
-
 	mlxsw_sp_port_admin_status_set(mlxsw_sp_port, false);
 	mlxsw_sp_port_admin_status_set(mlxsw_sp_port, true);
 
-- 
2.20.1


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

* Re: [PATCH net 0/3] mlxsw: Few small fixes
  2019-04-18  7:14 [PATCH net 0/3] mlxsw: Few small fixes Ido Schimmel
                   ` (2 preceding siblings ...)
  2019-04-18  7:14 ` [PATCH net 3/3] mlxsw: spectrum: Fix autoneg status in ethtool Ido Schimmel
@ 2019-04-18 17:38 ` David Miller
  2019-04-18 18:02   ` Ido Schimmel
  3 siblings, 1 reply; 7+ messages in thread
From: David Miller @ 2019-04-18 17:38 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, amitc, mlxsw

From: Ido Schimmel <idosch@mellanox.com>
Date: Thu, 18 Apr 2019 07:14:12 +0000

> Patch #1, from Petr, adjusts mlxsw to provide the same QoS behavior for
> both Spectrum-1 and Spectrum-2. The fix is required due to a difference
> in the behavior of Spectrum-2 compared to Spectrum-1. The problem and
> solution are described in the detail in the changelog.
> 
> Patch #2 increases the time period in which the driver waits for the
> firmware to signal it has finished its initialization. The issue will be
> fixed in future firmware versions and the timeout will be decreased.
> 
> Patch #3, from Amit, fixes a display problem where the autoneg status in
> ethtool is not updated in case the netdev is not running.

Series applied, thank you.

Would you like me to queue these up for -stable as well?

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

* Re: [PATCH net 0/3] mlxsw: Few small fixes
  2019-04-18 17:38 ` [PATCH net 0/3] mlxsw: Few small fixes David Miller
@ 2019-04-18 18:02   ` Ido Schimmel
  2019-04-18 18:46     ` David Miller
  0 siblings, 1 reply; 7+ messages in thread
From: Ido Schimmel @ 2019-04-18 18:02 UTC (permalink / raw)
  To: David Miller; +Cc: netdev, Jiri Pirko, Petr Machata, Amit Cohen, mlxsw

On Thu, Apr 18, 2019 at 10:38:01AM -0700, David Miller wrote:
> Series applied, thank you.
> 
> Would you like me to queue these up for -stable as well?

Yes, please.

Thanks, David.

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

* Re: [PATCH net 0/3] mlxsw: Few small fixes
  2019-04-18 18:02   ` Ido Schimmel
@ 2019-04-18 18:46     ` David Miller
  0 siblings, 0 replies; 7+ messages in thread
From: David Miller @ 2019-04-18 18:46 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, petrm, amitc, mlxsw

From: Ido Schimmel <idosch@mellanox.com>
Date: Thu, 18 Apr 2019 18:02:16 +0000

> On Thu, Apr 18, 2019 at 10:38:01AM -0700, David Miller wrote:
>> Series applied, thank you.
>> 
>> Would you like me to queue these up for -stable as well?
> 
> Yes, please.

Ok, done.

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

end of thread, other threads:[~2019-04-18 18:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-18  7:14 [PATCH net 0/3] mlxsw: Few small fixes Ido Schimmel
2019-04-18  7:14 ` [PATCH net 1/3] mlxsw: spectrum: Put MC TCs into DWRR mode Ido Schimmel
2019-04-18  7:14 ` [PATCH net 2/3] mlxsw: pci: Reincrease PCI reset timeout Ido Schimmel
2019-04-18  7:14 ` [PATCH net 3/3] mlxsw: spectrum: Fix autoneg status in ethtool Ido Schimmel
2019-04-18 17:38 ` [PATCH net 0/3] mlxsw: Few small fixes David Miller
2019-04-18 18:02   ` Ido Schimmel
2019-04-18 18:46     ` 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).