]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
mlxsw: spectrum: Fix IP2ME CPU policer configuration
authorShalom Toledo <shalomt@mellanox.com>
Fri, 2 Nov 2018 19:49:15 +0000 (19:49 +0000)
committerDavid S. Miller <davem@davemloft.net>
Sun, 4 Nov 2018 02:31:42 +0000 (19:31 -0700)
The CPU policer used to police packets being trapped via a local route
(IP2ME) was incorrectly configured to police based on bytes per second
instead of packets per second.

Change the policer to police based on packets per second and avoid
packet loss under certain circumstances.

Fixes: 9148e7cf73ce ("mlxsw: spectrum: Add policers for trap groups")
Signed-off-by: Shalom Toledo <shalomt@mellanox.com>
Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

index a2df12b79f8e915702323f9258972260135c094c..9bec940330a450856d2dba23ed7274321cf82059 100644 (file)
@@ -3568,7 +3568,6 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
                        burst_size = 7;
                        break;
                case MLXSW_REG_HTGT_TRAP_GROUP_SP_IP2ME:
-                       is_bytes = true;
                        rate = 4 * 1024;
                        burst_size = 4;
                        break;