]> git.baikalelectronics.ru Git - kernel.git/commitdiff
mlxsw: spectrum: Use same switch case for identical groups
authorIdo Schimmel <idosch@mellanox.com>
Mon, 25 May 2020 23:05:44 +0000 (02:05 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 May 2020 03:33:57 +0000 (20:33 -0700)
Trap groups that use the same policer settings can share the same switch
case.

Signed-off-by: Ido Schimmel <idosch@mellanox.com>
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/mellanox/mlxsw/spectrum.c

index e0811a7e13b9f81bbb6ccaa78912e9deca06bacc..e8c9fc4cb6fba9bbee492aac90995050a46c9559 100644 (file)
@@ -4168,9 +4168,6 @@ static int mlxsw_sp_cpu_policers_set(struct mlxsw_core *mlxsw_core)
                case MLXSW_REG_HTGT_TRAP_GROUP_SP_IPV6_ND:
                case MLXSW_REG_HTGT_TRAP_GROUP_SP_MULTICAST:
                case MLXSW_REG_HTGT_TRAP_GROUP_SP_FLOW_LOGGING:
-                       rate = 1024;
-                       burst_size = 7;
-                       break;
                case MLXSW_REG_HTGT_TRAP_GROUP_SP_IP2ME:
                        rate = 1024;
                        burst_size = 7;