From: Petr Machata <petrm@nvidia.com>
To: <netdev@vger.kernel.org>
Cc: <mlxsw@nvidia.com>, Ido Schimmel <idosch@nvidia.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>, Petr Machata <petrm@nvidia.com>
Subject: [PATCH net-next 00/10] mlxsw: Refactor qdisc offload
Date: Tue, 20 Apr 2021 16:53:38 +0200 [thread overview]
Message-ID: <cover.1618928118.git.petrm@nvidia.com> (raw)
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, 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 patchset is a step towards the end goal of allowing more comprehensive
qdisc tree offload and cleans up the qdisc offload code.
- Patches #1-#4 contain small cleanups.
- Up until now, since mlxsw offloaded only a very simple qdisc
configurations, basically all bookkeeping was done using one container
for the root qdisc, and 8 containers for its children. Patches #5, #6, #8
and #9 gradually introduce a more dynamic structure, where parent-child
relationships are tracked directly at qdiscs, instead of being implicit.
- This tree management assumes only one qdisc is created at a time. In FIFO
handlers, this condition was enforced simply by asserting RTNL lock. But
instead of furthering this RTNL dependence, patch #7 converts the whole
qdisc offload logic to a per-port mutex.
- Patch #10 adds a selftest.
Petr Machata (10):
mlxsw: spectrum_qdisc: Drop one argument from check_params callback
mlxsw: spectrum_qdisc: Simplify mlxsw_sp_qdisc_compare()
mlxsw: spectrum_qdisc: Drop an always-true condition
mlxsw: spectrum_qdisc: Track tclass_num as int, not u8
mlxsw: spectrum_qdisc: Promote backlog reduction to
mlxsw_sp_qdisc_destroy()
mlxsw: spectrum_qdisc: Track children per qdisc
mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock
mlxsw: spectrum_qdisc: Allocate child qdiscs dynamically
mlxsw: spectrum_qdisc: Index future FIFOs by band number
selftests: mlxsw: sch_red_ets: Test proper counter cleaning in ETS
.../ethernet/mellanox/mlxsw/spectrum_qdisc.c | 448 ++++++++++++------
.../drivers/net/mlxsw/sch_red_ets.sh | 7 +
2 files changed, 306 insertions(+), 149 deletions(-)
--
2.26.2
next reply other threads:[~2021-04-20 14:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-20 14:53 Petr Machata [this message]
2021-04-20 14:53 ` [PATCH net-next 01/10] mlxsw: spectrum_qdisc: Drop one argument from check_params callback Petr Machata
2021-04-20 14:53 ` [PATCH net-next 02/10] mlxsw: spectrum_qdisc: Simplify mlxsw_sp_qdisc_compare() Petr Machata
2021-04-20 14:53 ` [PATCH net-next 03/10] mlxsw: spectrum_qdisc: Drop an always-true condition Petr Machata
2021-04-20 14:53 ` [PATCH net-next 04/10] mlxsw: spectrum_qdisc: Track tclass_num as int, not u8 Petr Machata
2021-04-20 14:53 ` [PATCH net-next 05/10] mlxsw: spectrum_qdisc: Promote backlog reduction to mlxsw_sp_qdisc_destroy() Petr Machata
2021-04-20 14:53 ` [PATCH net-next 06/10] mlxsw: spectrum_qdisc: Track children per qdisc Petr Machata
2021-04-20 14:53 ` [PATCH net-next 07/10] mlxsw: spectrum_qdisc: Guard all qdisc accesses with a lock Petr Machata
2021-04-20 14:53 ` [PATCH net-next 08/10] mlxsw: spectrum_qdisc: Allocate child qdiscs dynamically Petr Machata
2021-04-20 14:53 ` [PATCH net-next 09/10] mlxsw: spectrum_qdisc: Index future FIFOs by band number Petr Machata
2021-04-20 14:53 ` [PATCH net-next 10/10] selftests: mlxsw: sch_red_ets: Test proper counter cleaning in ETS Petr Machata
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=cover.1618928118.git.petrm@nvidia.com \
--to=petrm@nvidia.com \
--cc=davem@davemloft.net \
--cc=idosch@nvidia.com \
--cc=kuba@kernel.org \
--cc=mlxsw@nvidia.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).