]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum: Move here the three-step headroom configuration from DCB
authorPetr Machata <petrm@nvidia.com>
Wed, 16 Sep 2020 06:35:23 +0000 (09:35 +0300)
committerDavid S. Miller <davem@davemloft.net>
Wed, 16 Sep 2020 22:19:30 +0000 (15:19 -0700)
commit4b8d83c5116b6685da7ae2c3b5d81be149cbae5c
tree10e1ac3cc4cc46c757639b34d10ab90ad40d62db
parent747f0c0fd3ce6ae1e25264d4ad830d891076ac87
mlxsw: spectrum: Move here the three-step headroom configuration from DCB

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.

This sort of careful approach will also be useful for configuring port
buffer sizes and priority map by hand, through dcbnl_setbuffer. Therefore
move the code from the DCB handler to the generic headroom function.

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