]> 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)
commit371d29e8b9d855e2e41901b903f19eda07d396d8
tree10e1ac3cc4cc46c757639b34d10ab90ad40d62db
parent71c0221001bc167c79b0593ce908c4b3c62b5f5a
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