[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200917064903.260700-1-idosch@idosch.org>
Date: Thu, 17 Sep 2020 09:49:00 +0300
From: Ido Schimmel <idosch@...sch.org>
To: netdev@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org, jiri@...dia.com,
petrm@...dia.com, mlxsw@...dia.com,
Ido Schimmel <idosch@...dia.com>
Subject: [PATCH net-next 0/3] mlxsw: Support dcbnl_setbuffer, dcbnl_getbuffer
From: Ido Schimmel <idosch@...dia.com>
Petr says:
On Spectrum, port buffers, also called port headroom, is where packets are
stored while they are parsed and the forwarding decision is being made. For
lossless traffic flows, in case shared buffer admission is not allowed,
headroom is also where to put the extra traffic received before the sent
PAUSE takes effect.
Linux supports two DCB interfaces related to the headroom: dcbnl_setbuffer
for configuration, and dcbnl_getbuffer for inspection. This patch set
implements them.
With dcbnl_setbuffer in place, there will be two sources of authority over
the ingress configuration: the DCB ETS hook, because ETS configuration is
mirrored to ingress, and the DCB setbuffer hook. mlxsw is in a similar
situation on the egress side, where there are two sources of the ETS
configuration: the DCB ETS hook, and the TC qdisc hooks. This is a
non-intuitive situation, because the way the ASIC ends up being configured
depends not only on the actual configured bits, but also on the order in
which they were configured.
To prevent these issues on the ingress side, two configuration modes will
exist: DCB mode and TC mode. DCB ETS will keep getting projected to ingress
in the (default) DCB mode. When a qdisc is installed on a port, it will be
switched to the TC mode, the ingress configuration will be done through the
dcbnl_setbuffer callback. The reason is that the dcbnl_setbuffer hook is
not standardized and supported by lldpad. Projecting DCB ETS configuration
to ingress is a reasonable heuristic to configure ingress especially when
PFC is in effect.
In patch #1, the toggle between the DCB and TC modes of headroom
configuration, described above, is introduced.
Patch #2 implements dcbnl_getbuffer and dcbnl_setbuffer. dcbnl_getbuffer
can be always used to determine the current port headroom configuration.
dcbnl_setbuffer is only permitted in the TC mode.
In patch #3, make the qdisc module toggle the headroom mode from DCB to TC
and back, depending on whether there is an offloaded qdisc on the port.
Petr Machata (3):
mlxsw: spectrum_buffers: Support two headroom modes
mlxsw: spectrum_dcb: Implement dcbnl_setbuffer / getbuffer
mlxsw: spectrum_qdisc: Disable port buffer autoresize with qdiscs
.../net/ethernet/mellanox/mlxsw/spectrum.h | 11 ++++
.../mellanox/mlxsw/spectrum_buffers.c | 22 ++++++-
.../ethernet/mellanox/mlxsw/spectrum_dcb.c | 59 +++++++++++++++++++
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 34 ++++++++++-
4 files changed, 122 insertions(+), 4 deletions(-)
--
2.26.2
Powered by blists - more mailing lists