mlxsw: spectrum: Set port's shared buffer size to 0
authorIdo Schimmel <idosch@mellanox.com>
Wed, 6 Apr 2016 15:10:05 +0000 (17:10 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 6 Apr 2016 21:24:17 +0000 (17:24 -0400)
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>
drivers/net/ethernet/mellanox/mlxsw/reg.h
drivers/net/ethernet/mellanox/mlxsw/spectrum_buffers.c

index f08a17fdd4c318ba7a14a492a326300f7ace8e92..370914e607e010de383725147cfd2a45f0c10912 100644 (file)
@@ -2455,6 +2455,8 @@ MLXSW_ITEM32(reg, pbmc, xoff_timer_value, 0x04, 16, 16);
  */
 MLXSW_ITEM32(reg, pbmc, xoff_refresh, 0x04, 0, 16);
 
+#define MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX 11
+
 /* reg_pbmc_buf_lossy
  * The field indicates if the buffer is lossy.
  * 0 - Lossless
index e7a5b73188f1b446d304dd92d00d9dd30f84661f..97c8d537be5b6d84cb4d88d124e064619b2d14e9 100644 (file)
@@ -80,6 +80,8 @@ static int mlxsw_sp_port_pb_init(struct mlxsw_sp_port *mlxsw_sp_port)
                pb = &mlxsw_sp_pbs[i];
                mlxsw_reg_pbmc_lossy_buffer_pack(pbmc_pl, pb->index, pb->size);
        }
+       mlxsw_reg_pbmc_lossy_buffer_pack(pbmc_pl,
+                                        MLXSW_REG_PBMC_PORT_SHARED_BUF_IDX, 0);
        return mlxsw_reg_write(mlxsw_sp_port->mlxsw_sp->core,
                               MLXSW_REG(pbmc), pbmc_pl);
 }
This page took 0.031596 seconds and 5 git commands to generate.