]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_dcb: Convert ETS handler fully to mlxsw_sp_hdroom_configure()
authorPetr Machata <petrm@nvidia.com>
Wed, 16 Sep 2020 06:35:21 +0000 (09:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Sep 2020 22:19:30 +0000 (15:19 -0700)
commit7c53cb9dc22a0bf1217763522aef85a65616e4b3
treed246678ad2eff8f2a0658125f6ccd2f6aea37e80
parente93c1d54e7f3f711ee7c5c7451c7719062b583a6
mlxsw: spectrum_dcb: Convert ETS handler fully to mlxsw_sp_hdroom_configure()

The ETS handler performs the headroom configuration in three steps: first
it resizes the buffers and adds any new ones. Then it redirects priorities
to the new buffers. And finally it sets the size of the now-unused buffers
to zero. This way no packet drops are introduced.

Both of the buffer size configuration operations are simply buffer size
configurations, there is no material difference between setting buffers to
zero and any other value. Therefore simply invoke the same
mlxsw_sp_hdroom_configure(), and drop mlxsw_sp_port_pg_destroy() and
mlxsw_sp_ets_has_pg() which are now unused.

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>
drivers/net/ethernet/mellanox/mlxsw/spectrum_dcb.c