diff options
author | David S. Miller | 2020-09-17 17:01:38 -0700 |
---|---|---|
committer | David S. Miller | 2020-09-17 17:01:38 -0700 |
commit | 72d61d30097fea6c74cc06eee3d911788f5f4c6b (patch) | |
tree | 5438101781471e218d3ed222c4d84d9c518ed54d /net/hsr | |
parent | 4d11af5d008d57de12a3e0813313f9c099ddb084 (diff) | |
parent | 509f04ca6298981860544f03bc0e8ae407678438 (diff) |
Merge branch 'mlxsw-Support-dcbnl_setbuffer-dcbnl_getbuffer'
Ido Schimmel says:
====================
mlxsw: Support dcbnl_setbuffer, dcbnl_getbuffer
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.
====================
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/hsr')
0 files changed, 0 insertions, 0 deletions