netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ido Schimmel <idosch@idosch.org>
To: netdev@vger.kernel.org
Cc: davem@davemloft.net, jiri@mellanox.com, petrm@mellanox.com,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, kuba@kernel.org,
	mlxsw@mellanox.com, Ido Schimmel <idosch@mellanox.com>
Subject: [PATCH net-next 0/6] RED: Introduce an ECN tail-dropping mode
Date: Mon,  9 Mar 2020 20:34:57 +0200	[thread overview]
Message-ID: <20200309183503.173802-1-idosch@idosch.org> (raw)

From: Ido Schimmel <idosch@mellanox.com>

Petr says:

When the RED Qdisc is currently configured to enable ECN, the RED algorithm
is used to decide whether a certain SKB should be marked. If that SKB is
not ECN-capable, it is early-dropped.

It is also possible to keep all traffic in the queue, and just mark the
ECN-capable subset of it, as appropriate under the RED algorithm. Some
switches support this mode, and some installations make use of it.
There is currently no way to put the RED qdiscs to this mode.

To that end, add a new RED flag, TC_RED_TAILDROP. When the Qdisc is
configured with this flag, non-ECT traffic is enqueued (and tail-dropped
when the queue size is exhausted) instead of being early-dropped.

- The patchset starts with adding in patch #1 a TDC testsuite that covers
  the existing RED flags. This test is extended with the new flag later
  in the patchset.

- Patches #2 and #3 add the taildrop support to the RED qdisc itself resp.
  mlxsw.

- Patches #4 and #5 add tests to, respectively, the newly-introduced TDC
  suite, and the mlxsw-specific RED selftests.

To test the qdisc itself (apart from offloading or configuration, which are
covered above), I took the mlxsw selftest and adapted it for SW datapath in
mostly obvious ways. The test is stable enough to verify that RED, ECN and
ECN taildrop actually work. However, I have no confidence in its
portability to other people's machines or mildly different configurations.
I therefore do not find it suitable for upstreaming.

Petr Machata (6):
  selftests: qdiscs: Add TDC test for RED
  net: sched: Add centralized RED flag checking
  net: sched: RED: Introduce an ECN tail-dropping mode
  mlxsw: spectrum_qdisc: Offload RED ECN tail-dropping mode
  selftests: qdiscs: RED: Add taildrop tests
  selftests: mlxsw: RED: Test RED ECN taildrop offload

 .../ethernet/mellanox/mlxsw/spectrum_qdisc.c  |   9 +-
 include/net/pkt_cls.h                         |   1 +
 include/net/red.h                             |  17 +++
 include/uapi/linux/pkt_sched.h                |   1 +
 net/sched/sch_choke.c                         |   5 +
 net/sched/sch_gred.c                          |   7 +-
 net/sched/sch_red.c                           |  35 ++++-
 net/sched/sch_sfq.c                           |  10 +-
 .../drivers/net/mlxsw/sch_red_core.sh         |  50 +++++-
 .../drivers/net/mlxsw/sch_red_ets.sh          |  11 ++
 .../drivers/net/mlxsw/sch_red_root.sh         |   8 +
 .../tc-testing/tc-tests/qdiscs/red.json       | 142 ++++++++++++++++++
 12 files changed, 273 insertions(+), 23 deletions(-)
 create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json

-- 
2.24.1


             reply	other threads:[~2020-03-09 18:35 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-09 18:34 Ido Schimmel [this message]
2020-03-09 18:34 ` [PATCH net-next 1/6] selftests: qdiscs: Add TDC test for RED Ido Schimmel
2020-03-10 15:40   ` Roman Mashak
2020-03-10 16:56     ` Petr Machata
2020-03-10 17:28       ` Roman Mashak
2020-03-09 18:34 ` [PATCH net-next 2/6] net: sched: Add centralized RED flag checking Ido Schimmel
2020-03-09 22:18   ` Jakub Kicinski
2020-03-10  9:48     ` Petr Machata
2020-03-10 19:53       ` Jakub Kicinski
2020-03-10 22:23         ` Petr Machata
2020-03-10 23:00           ` Jakub Kicinski
2020-03-10 23:53             ` Petr Machata
2020-03-09 18:35 ` [PATCH net-next 3/6] net: sched: RED: Introduce an ECN tail-dropping mode Ido Schimmel
2020-03-09 22:12   ` Jakub Kicinski
2020-03-10  9:48     ` Petr Machata
2020-03-09 18:35 ` [PATCH net-next 4/6] mlxsw: spectrum_qdisc: Offload RED " Ido Schimmel
2020-03-09 18:35 ` [PATCH net-next 5/6] selftests: qdiscs: RED: Add taildrop tests Ido Schimmel
2020-03-09 18:35 ` [PATCH net-next 6/6] selftests: mlxsw: RED: Test RED ECN taildrop offload Ido Schimmel

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=20200309183503.173802-1-idosch@idosch.org \
    --to=idosch@idosch.org \
    --cc=davem@davemloft.net \
    --cc=idosch@mellanox.com \
    --cc=jhs@mojatatu.com \
    --cc=jiri@mellanox.com \
    --cc=kuba@kernel.org \
    --cc=mlxsw@mellanox.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@mellanox.com \
    --cc=xiyou.wangcong@gmail.com \
    /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).