netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] mlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic
@ 2018-03-15 12:49 Ido Schimmel
  2018-03-17 21:35 ` David Miller
  0 siblings, 1 reply; 2+ messages in thread
From: Ido Schimmel @ 2018-03-15 12:49 UTC (permalink / raw)
  To: netdev; +Cc: davem, jiri, eddies, alexpe, mlxsw, Ido Schimmel

In commit 9ffcc3725f09 ("mlxsw: spectrum: Allow packets to be trapped
from any PG") I fixed a problem where packets could not be trapped to
the CPU due to exceeded shared buffer quotas. The mentioned commit
explains the problem in detail.

The problem was fixed by assigning a minimum quota for the CPU port and
the traffic class used for scheduling traffic to the CPU.

However, commit 117b0dad2d54 ("mlxsw: Create a different trap group list
for each device") assigned different traffic classes to different
packet types and rendered the fix useless.

Fix the problem by assigning a minimum quota for the CPU port and all
the traffic classes that are currently in use.

Fixes: 117b0dad2d54 ("mlxsw: Create a different trap group list for each device")
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reported-by: Eddie Shklaer <eddies@mellanox.com>
Tested-by: Eddie Shklaer <eddies@mellanox.com>
Acked-by: Jiri Pirko <jiri@mellanox.com>
---
Please consider the patch for -stable. Thanks!
---
 drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
index 93728c694e6d..0a9adc5962fb 100644
--- a/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
+++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c
@@ -385,13 +385,13 @@ static const struct mlxsw_sp_sb_cm mlxsw_sp_sb_cms_egress[] = {
 
 static const struct mlxsw_sp_sb_cm mlxsw_sp_cpu_port_sb_cms[] = {
 	MLXSW_SP_CPU_PORT_SB_CM,
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
 	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_CPU_PORT_SB_CM,
-	MLXSW_SP_SB_CM(10000, 0, 0),
+	MLXSW_SP_SB_CM(MLXSW_PORT_MAX_MTU, 0, 0),
 	MLXSW_SP_CPU_PORT_SB_CM,
 	MLXSW_SP_CPU_PORT_SB_CM,
 	MLXSW_SP_CPU_PORT_SB_CM,
-- 
2.14.3

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

* Re: [PATCH net] mlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic
  2018-03-15 12:49 [PATCH net] mlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic Ido Schimmel
@ 2018-03-17 21:35 ` David Miller
  0 siblings, 0 replies; 2+ messages in thread
From: David Miller @ 2018-03-17 21:35 UTC (permalink / raw)
  To: idosch; +Cc: netdev, jiri, eddies, alexpe, mlxsw

From: Ido Schimmel <idosch@mellanox.com>
Date: Thu, 15 Mar 2018 14:49:56 +0200

> In commit 9ffcc3725f09 ("mlxsw: spectrum: Allow packets to be trapped
> from any PG") I fixed a problem where packets could not be trapped to
> the CPU due to exceeded shared buffer quotas. The mentioned commit
> explains the problem in detail.
> 
> The problem was fixed by assigning a minimum quota for the CPU port and
> the traffic class used for scheduling traffic to the CPU.
> 
> However, commit 117b0dad2d54 ("mlxsw: Create a different trap group list
> for each device") assigned different traffic classes to different
> packet types and rendered the fix useless.
> 
> Fix the problem by assigning a minimum quota for the CPU port and all
> the traffic classes that are currently in use.
> 
> Fixes: 117b0dad2d54 ("mlxsw: Create a different trap group list for each device")
> Signed-off-by: Ido Schimmel <idosch@mellanox.com>
> Reported-by: Eddie Shklaer <eddies@mellanox.com>
> Tested-by: Eddie Shklaer <eddies@mellanox.com>
> Acked-by: Jiri Pirko <jiri@mellanox.com>
> ---
> Please consider the patch for -stable. Thanks!

Applied and queued up for -stable, thank you.

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

end of thread, other threads:[~2018-03-17 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-03-15 12:49 [PATCH net] mlxsw: spectrum_buffers: Set a minimum quota for CPU port traffic Ido Schimmel
2018-03-17 21:35 ` 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).