]> git.proxmox.com Git - mirror_ubuntu-kernels.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)
commit7ace2c36aa8e797a4e163fda1f46433a86799b37
tree10e1ac3cc4cc46c757639b34d10ab90ad40d62db
parente9c97e0ece6b89cfe1cb33f171c62917522c4ce3
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