diff options
author | Petr Machata <petrm@nvidia.com> | 2020-09-16 09:35:19 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-16 15:19:30 -0700 |
commit | aa7c06218474e866bd45163c208821b2c50497dd (patch) | |
tree | b87da5ed157dcc8c2bc90824aa36eca179851710 /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | ca21e84e7e14d2357386d7828402dcc6c5ccf77c (diff) | |
download | linux-aa7c06218474e866bd45163c208821b2c50497dd.tar.gz linux-aa7c06218474e866bd45163c208821b2c50497dd.tar.bz2 linux-aa7c06218474e866bd45163c208821b2c50497dd.zip |
mlxsw: spectrum: Track buffer sizes in struct mlxsw_sp_hdroom
So far, port buffers were always autoconfigured. When dcbnl_setbuffer
callback is implemented, it will allow the user to change the buffer size
configuration by hand. The sizes therefore need to be a configuration
parameter, not always deduced, and therefore belong to struct
mlxsw_sp_hdroom, where the configuration routine should take them from.
Update mlxsw_sp_port_headroom_set() to update these sizes. Have the
function update the sizes even for the case that a given buffer is not
used.
Additionally, change the loop iteration end to DCBX_MAX_BUFFERS instead of
IEEE_8021QAZ_MAX_TCS. The value is the same, but the semantics differ.
Signed-off-by: Petr Machata <petrm@nvidia.com>
Reviewed-by: Jiri Pirko <jiri@nvidia.com>
Signed-off-by: Ido Schimmel <idosch@nvidia.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/mellanox/mlxsw/spectrum.h')
-rw-r--r-- | drivers/net/ethernet/mellanox/mlxsw/spectrum.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 5245367d6fb2..b3c9cdcc7a06 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -447,6 +447,8 @@ struct mlxsw_sp_hdroom_prio { }; struct mlxsw_sp_hdroom_buf { + u32 thres_cells; + u32 size_cells; bool lossy; }; |