mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-30 07:34:12 +08:00
mlxsw: spectrum_buffers: Add a multicast pool for Spectrum-2
In Spectrum-1, when a multicast packet is admitted to the shared buffer it increases the quotas of all the ports and {port, TC} to which it is forwarded to. The above means that multicast packets are accounted multiple times in the shared buffer and can therefore cause the associated shared buffer pool to fill up very quickly. To work around this issue, commite83c045e53
("mlxsw: spectrum_buffers: Configure MC pool") added a dedicated multicast pool in which multicast packets are accounted. The issue is not present in Spectrum-2, but in order to be backward compatible with Spectrum-1, its default behavior is to allow a multicast packet to increase multiple egress quotas instead of one. Until the new (non-backward compatible) mode is supported, configure a dedicated multicast pool as in Spectrum-1. Fixes:fe099bf682
("mlxsw: spectrum_buffers: Add Spectrum-2 shared buffer configuration") Signed-off-by: Ido Schimmel <idosch@mellanox.com> Reviewed-by: Petr Machata <petrm@mellanox.com> Acked-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
7052e24363
commit
d5949d92c2
@ -70,6 +70,7 @@ static const struct mlxsw_sp_sb_pool_des mlxsw_sp2_sb_pool_dess[] = {
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 1},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 2},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 3},
|
||||
{MLXSW_REG_SBXX_DIR_EGRESS, 15},
|
||||
};
|
||||
|
||||
#define MLXSW_SP_SB_ING_TC_COUNT 8
|
||||
@ -428,6 +429,7 @@ static const struct mlxsw_sp_sb_pr mlxsw_sp2_sb_prs[] = {
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, 0),
|
||||
MLXSW_SP_SB_PR(MLXSW_REG_SBPR_MODE_STATIC, MLXSW_SP_SB_INFI),
|
||||
};
|
||||
|
||||
static int mlxsw_sp_sb_prs_init(struct mlxsw_sp *mlxsw_sp,
|
||||
@ -517,14 +519,14 @@ static const struct mlxsw_sp_sb_cm mlxsw_sp2_sb_cms_egress[] = {
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, 7, 4),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(0, MLXSW_SP_SB_INFI, 8),
|
||||
MLXSW_SP_SB_CM(1, 0xff, 4),
|
||||
};
|
||||
|
||||
@ -671,6 +673,7 @@ static const struct mlxsw_sp_sb_pm mlxsw_sp2_sb_pms[] = {
|
||||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(0, 0),
|
||||
MLXSW_SP_SB_PM(10000, 90000),
|
||||
};
|
||||
|
||||
static int mlxsw_sp_port_sb_pms_init(struct mlxsw_sp_port *mlxsw_sp_port)
|
||||
|
Loading…
Reference in New Issue
Block a user