Skip to content

Commit d6b7c13

Browse files
idoschdavem330
authored andcommitted
mlxsw: spectrum: Set port's shared buffer size to 0
In addition to the priority group (PG) buffers in the headroom, the device enables the allocation of headroom shared buffer, which can be shared between different PGs. However, we are not going to use the headroom shared buffer and instead allow the user to use its size for PGs or the switch's shared buffer. Signed-off-by: Ido Schimmel <idosch@mellanox.com> Signed-off-by: Jiri Pirko <jiri@mellanox.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 7ad7cd6 commit d6b7c13

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

drivers/net/ethernet/mellanox/mlxsw/reg.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2455,6 +2455,8 @@ MLXSW_ITEM32(reg, pbmc, xoff_timer_value, 0x04, 16, 16);
24552455
*/
24562456
MLXSW_ITEM32(reg, pbmc, xoff_refresh, 0x04, 0, 16);
24572457

2458+
#define MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX 11
2459+
24582460
/* reg_pbmc_buf_lossy
24592461
* The field indicates if the buffer is lossy.
24602462
* 0 - Lossless

drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@ static int mlxsw_sp_port_pb_init(struct mlxsw_sp_port *mlxsw_sp_port)
8080
pb = &mlxsw_sp_pbs[i];
8181
mlxsw_reg_pbmc_lossy_buffer_pack(pbmc_pl, pb->index, pb->size);
8282
}
83+
mlxsw_reg_pbmc_lossy_buffer_pack(pbmc_pl,
84+
MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX, 0);
8385
return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core,
8486
MLXSW_REG(pbmc), pbmc_pl);
8587
}

0 commit comments

Comments
 (0)