diff options
author | Petr Machata <petrm@nvidia.com> | 2020-09-16 09:35:16 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2020-09-16 15:19:29 -0700 |
commit | 0103a3e452d613a6cfc0824e3a86d946e9ab3eef (patch) | |
tree | 3fd3dae77b22b040a9d11341625d5fc3cdae74ad /drivers/net/ethernet/mellanox/mlxsw/spectrum.h | |
parent | b7e07bbd4873c4ea3265fb403c3ebab9dd241db9 (diff) |
mlxsw: spectrum: Track MTU in struct mlxsw_sp_hdroom
MTU influences sizes of auto-allocated buffers. Make it a part of port
buffer configuration and have __mlxsw_sp_port_headroom_set() take it from
there, instead of as an argument.
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 | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h index 6d69f191a3fe..e2ac258ea9c7 100644 --- a/drivers/net/ethernet/mellanox/mlxsw/spectrum.h +++ b/drivers/net/ethernet/mellanox/mlxsw/spectrum.h @@ -432,7 +432,7 @@ enum mlxsw_sp_flood_type { int mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_hdroom *hdroom, - int mtu, bool pause_en); + bool pause_en); int mlxsw_sp_port_get_stats_raw(struct net_device *dev, int grp, int prio, char *ppcnt_pl); int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, @@ -441,6 +441,7 @@ int mlxsw_sp_port_admin_status_set(struct mlxsw_sp_port *mlxsw_sp_port, /* spectrum_buffers.c */ struct mlxsw_sp_hdroom { int delay_bytes; + int mtu; }; int mlxsw_sp_buffers_init(struct mlxsw_sp *mlxsw_sp); @@ -526,7 +527,7 @@ int mlxsw_sp_port_prio_tc_set(struct mlxsw_sp_port *mlxsw_sp_port, u8 switch_prio, u8 tclass); int __mlxsw_sp_port_headroom_set(struct mlxsw_sp_port *mlxsw_sp_port, struct mlxsw_sp_hdroom *hdroom, - int mtu, u8 *prio_tc, bool pause_en, struct ieee_pfc *my_pfc); + u8 *prio_tc, bool pause_en, struct ieee_pfc *my_pfc); int mlxsw_sp_port_ets_maxrate_set(struct mlxsw_sp_port *mlxsw_sp_port, enum mlxsw_reg_qeec_hr hr, u8 index, u8 next_index, u32 maxrate, u8 burst_size); |