OSDN Git Service

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)
commit8ec5e6b9776b21ac5d2b55c9632b5f9d394a4c5f
treed246678ad2eff8f2a0658125f6ccd2f6aea37e80
parent2d9f703f63015d61aeca6b21af5f29e23c5a72e7
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