mbox series

[net-next,0/9] mlxsw: Multi-level qdisc offload

Message ID 20211019080712.705464-1-idosch@idosch.org (mailing list archive)
Headers show
Series mlxsw: Multi-level qdisc offload | expand

Message

Ido Schimmel Oct. 19, 2021, 8:07 a.m. UTC
From: Ido Schimmel <idosch@nvidia.com>

Petr says:

Currently, mlxsw admits for offload a suitable root qdisc, and its
children. Thus up to two levels of hierarchy are offloaded. Often, this is
enough: one can configure TCs with RED and TCs with a shaper on, and can
even see counters for each TC by looking at a qdisc at a sufficiently
shallow position.

While simple, the system has obvious shortcomings. It is not possible to
configure both RED and shaping on one TC. It is not possible to place a
PRIO below root TBF, which would then be offloaded as port shaper. FIFOs
are only offloaded at root or directly below, which is confusing to users,
because RED and TBF of course have their own FIFO.

This patch set lifts assumptions that prevent offloading multi-level qdisc
trees.

In patch #1, offload of a graft operation is added to TBF. Grafts are
issued as another qdisc is linked to the qdisc in question, and give
drivers a chance to react to the linking. The absence of this event was not
a major issue so far, because TBF was not considered classful, which
changes with this patchset.

The codebase currently assumes that ETS and PRIO are the only classful
qdiscs. The following patches gradually lift this assumption.

In patch #2, calculation of traffic class and priomap of a qdisc is fixed.

Patch #3 fixes handling of future FIFOs. Child FIFO qdiscs may be created
and notified before their parent qdisc exists and therefore need special
handling.

Patches #4, #5 and #6 unify, respectively, child destruction, child
grafting, and cleanup of statistics.

Patch #7 adds a function that validates whether a given qdisc topology is
offloadable.

Finally in patch #8, TBF and RED become classful. At this point, FIFO
qdiscs grafted to an offloaded qdisc should always be offloaded.

Patch #9 adds a selftest to verify some offloadable and unoffloadable qdisc
trees.

Petr Machata (9):
  net: sch_tbf: Add a graft command
  mlxsw: spectrum_qdisc: Query tclass / priomap instead of caching it
  mlxsw: spectrum_qdisc: Extract two helpers for handling future FIFOs
  mlxsw: spectrum_qdisc: Destroy children in mlxsw_sp_qdisc_destroy()
  mlxsw: spectrum_qdisc: Unify graft validation
  mlxsw: spectrum_qdisc: Clean stats recursively when priomap changes
  mlxsw: spectrum_qdisc: Validate qdisc topology
  mlxsw: spectrum_qdisc: Make RED, TBF offloads classful
  selftests: mlxsw: Add a test for un/offloadable qdisc trees

 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  | 427 ++++++++++++++----
 include/net/pkt_cls.h                         |   2 +
 net/sched/sch_tbf.c                           |  16 +
 .../drivers/net/mlxsw/sch_offload.sh          | 276 +++++++++++
 4 files changed, 636 insertions(+), 85 deletions(-)
 create mode 100755 tools/testing/selftests/drivers/net/mlxsw/sch_offload.sh

Comments

patchwork-bot+netdevbpf@kernel.org Oct. 19, 2021, 11:30 a.m. UTC | #1
Hello:

This series was applied to netdev/net-next.git (master)
by David S. Miller <davem@davemloft.net>:

On Tue, 19 Oct 2021 11:07:03 +0300 you wrote:
> From: Ido Schimmel <idosch@nvidia.com>
> 
> Petr says:
> 
> Currently, mlxsw admits for offload a suitable root qdisc, and its
> children. Thus up to two levels of hierarchy are offloaded. Often, this is
> enough: one can configure TCs with RED and TCs with a shaper on, and can
> even see counters for each TC by looking at a qdisc at a sufficiently
> shallow position.
> 
> [...]

Here is the summary with links:
  - [net-next,1/9] net: sch_tbf: Add a graft command
    https://git.kernel.org/netdev/net-next/c/6b3efbfa4e68
  - [net-next,2/9] mlxsw: spectrum_qdisc: Query tclass / priomap instead of caching it
    https://git.kernel.org/netdev/net-next/c/76ff72a7204f
  - [net-next,3/9] mlxsw: spectrum_qdisc: Extract two helpers for handling future FIFOs
    https://git.kernel.org/netdev/net-next/c/91796f507afc
  - [net-next,4/9] mlxsw: spectrum_qdisc: Destroy children in mlxsw_sp_qdisc_destroy()
    https://git.kernel.org/netdev/net-next/c/65626e075714
  - [net-next,5/9] mlxsw: spectrum_qdisc: Unify graft validation
    https://git.kernel.org/netdev/net-next/c/be7e2a5a58d4
  - [net-next,6/9] mlxsw: spectrum_qdisc: Clean stats recursively when priomap changes
    https://git.kernel.org/netdev/net-next/c/01164dda0a64
  - [net-next,7/9] mlxsw: spectrum_qdisc: Validate qdisc topology
    https://git.kernel.org/netdev/net-next/c/c2792f38caae
  - [net-next,8/9] mlxsw: spectrum_qdisc: Make RED, TBF offloads classful
    https://git.kernel.org/netdev/net-next/c/2a18c08d75ee
  - [net-next,9/9] selftests: mlxsw: Add a test for un/offloadable qdisc trees
    https://git.kernel.org/netdev/net-next/c/29c1eac2e64e

You are awesome, thank you!
--
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html