]> git.baikalelectronics.ru Git - kernel.git/commit
mlxsw: spectrum_buffers: Support two headroom modes
authorPetr Machata <petrm@nvidia.com>
Thu, 17 Sep 2020 06:49:01 +0000 (09:49 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Sep 2020 00:01:38 +0000 (17:01 -0700)
commitac6143d68f08975205ec819044329e4e23d136c1
treeb47f0f0b204534adb0cc352d962565fc8ba4cc00
parent5f7a67305e549af86c8232a8091352845587d946
mlxsw: spectrum_buffers: Support two headroom modes

There are two interfaces to configure ETS: qdiscs and DCB. Historically,
DCB ETS configuration was projected to ingress as well, and configured port
buffers. Qdisc was not.

So as not to break clients that today use DCB ETS and PFC and rely on
getting a reasonable ingress buffer priomap, keep the ETS mirroring in
effect.

Since qdiscs have not done this mirroring historically, it is reasonable
not to introduce it, but rather permit manual ingress configuration through
dcbnl_setbuffer only in the qdisc mode.

This will require a toggle to indicate whether buffer sizes should be
autocomputed or taken from dcbnl_setbuffer, and likewise for priomaps.
Introduce such and initialize it, and guard port buffer size configuration
as appropriate. The toggle is currently left in the DCB position. In a
following patch, qdisc code will switch it.

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