All of lore.kernel.org
 help / color / mirror / Atom feed
From: Roman Mashak <mrv@mojatatu.com>
To: Petr Machata <petrm@mellanox.com>
Cc: netdev@vger.kernel.org, Jakub Kicinski <kuba@kernel.org>,
	jhs@mojatatu.com, xiyou.wangcong@gmail.com, davem@davemloft.net,
	jiri@mellanox.com, mlxsw@mellanox.com
Subject: Re: [PATCH net-next v2 1/6] selftests: qdiscs: Add TDC test for RED
Date: Wed, 11 Mar 2020 22:20:34 -0400	[thread overview]
Message-ID: <85ftee5n65.fsf@mojatatu.com> (raw)
In-Reply-To: <20200311173356.38181-2-petrm@mellanox.com> (Petr Machata's message of "Wed, 11 Mar 2020 19:33:51 +0200")

Petr Machata <petrm@mellanox.com> writes:

> Add a handful of tests for creating RED with different flags.
>
> Signed-off-by: Petr Machata <petrm@mellanox.com>
> ---
>
> Notes:
>     v2:
>     - Require nsPlugin in each RED test
>     - Match end-of-line to catch cases of more flags reported than
>       requested
>
>  .../tc-testing/tc-tests/qdiscs/red.json       | 117 ++++++++++++++++++
>  1 file changed, 117 insertions(+)
>  create mode 100644 tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json
>
> diff --git a/tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json
> new file mode 100644
> index 000000000000..b70a54464897
> --- /dev/null
> +++ b/tools/testing/selftests/tc-testing/tc-tests/qdiscs/red.json
> @@ -0,0 +1,117 @@
> +[
> +    {
> +        "id": "8b6e",
> +        "name": "Create RED with no flags",
> +        "category": [
> +            "qdisc",
> +            "red"
> +        ],
> +        "plugins": {
> +            "requires": "nsPlugin"
> +        },
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true"
> +        ],
> +        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red limit 1M avpkt 1500 min 100K max 300K",
> +        "expExitCode": "0",
> +        "verifyCmd": "$TC qdisc show dev $DUMMY",
> +        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb $",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY handle 1: root",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    },
> +    {
> +        "id": "342e",
> +        "name": "Create RED with adaptive flag",
> +        "category": [
> +            "qdisc",
> +            "red"
> +        ],
> +        "plugins": {
> +            "requires": "nsPlugin"
> +        },
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true"
> +        ],
> +        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red adaptive limit 1M avpkt 1500 min 100K max 300K",
> +        "expExitCode": "0",
> +        "verifyCmd": "$TC qdisc show dev $DUMMY",
> +        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb adaptive $",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY handle 1: root",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    },
> +    {
> +        "id": "2d4b",
> +        "name": "Create RED with ECN flag",
> +        "category": [
> +            "qdisc",
> +            "red"
> +        ],
> +        "plugins": {
> +            "requires": "nsPlugin"
> +        },
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true"
> +        ],
> +        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn limit 1M avpkt 1500 min 100K max 300K",
> +        "expExitCode": "0",
> +        "verifyCmd": "$TC qdisc show dev $DUMMY",
> +        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn $",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY handle 1: root",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    },
> +    {
> +        "id": "650f",
> +        "name": "Create RED with flags ECN, adaptive",
> +        "category": [
> +            "qdisc",
> +            "red"
> +        ],
> +        "plugins": {
> +            "requires": "nsPlugin"
> +        },
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true"
> +        ],
> +        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn adaptive limit 1M avpkt 1500 min 100K max 300K",
> +        "expExitCode": "0",
> +        "verifyCmd": "$TC qdisc show dev $DUMMY",
> +        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn adaptive $",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY handle 1: root",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    },
> +    {
> +        "id": "5f15",
> +        "name": "Create RED with flags ECN, harddrop",
> +        "category": [
> +            "qdisc",
> +            "red"
> +        ],
> +        "plugins": {
> +            "requires": "nsPlugin"
> +        },
> +        "setup": [
> +            "$IP link add dev $DUMMY type dummy || /bin/true"
> +        ],
> +        "cmdUnderTest": "$TC qdisc add dev $DUMMY handle 1: root red ecn harddrop limit 1M avpkt 1500 min 100K max 300K",
> +        "expExitCode": "0",
> +        "verifyCmd": "$TC qdisc show dev $DUMMY",
> +        "matchPattern": "qdisc red 1: root .* limit 1Mb min 100Kb max 300Kb ecn harddrop $",
> +        "matchCount": "1",
> +        "teardown": [
> +            "$TC qdisc del dev $DUMMY handle 1: root",
> +            "$IP link del dev $DUMMY type dummy"
> +        ]
> +    }
> +]

Reviewed-by: Roman Mashak <mrv@mojatatu.com>

  reply	other threads:[~2020-03-12  2:20 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-11 17:33 [PATCH net-next v2 0/6] RED: Introduce an ECN tail-dropping mode Petr Machata
2020-03-11 17:33 ` [PATCH net-next v2 1/6] selftests: qdiscs: Add TDC test for RED Petr Machata
2020-03-12  2:20   ` Roman Mashak [this message]
2020-03-11 17:33 ` [PATCH net-next v2 2/6] net: sched: Allow extending set of supported RED flags Petr Machata
2020-03-11 22:09   ` Jakub Kicinski
2020-03-12  0:12     ` Petr Machata
2020-03-11 17:33 ` [PATCH net-next v2 3/6] net: sched: RED: Introduce an ECN tail-dropping mode Petr Machata
2020-03-11 18:36   ` Eric Dumazet
2020-03-12  0:42     ` Petr Machata
2020-03-12  1:01       ` Eric Dumazet
2020-03-12  2:25         ` Jakub Kicinski
2020-03-12 10:16           ` Petr Machata
2020-03-12 10:17   ` Petr Machata
2020-03-11 17:33 ` [PATCH net-next v2 4/6] mlxsw: spectrum_qdisc: Offload RED " Petr Machata
2020-03-11 17:33 ` [PATCH net-next v2 5/6] selftests: qdiscs: RED: Add taildrop tests Petr Machata
2020-03-12  2:21   ` Roman Mashak
2020-03-11 17:33 ` [PATCH net-next v2 6/6] selftests: mlxsw: RED: Test RED ECN taildrop offload Petr Machata
2020-03-15  4:04 ` [PATCH net-next v2 0/6] RED: Introduce an ECN tail-dropping mode David Miller
2020-03-16 10:54   ` Petr Machata
2020-03-16 21:55     ` David Miller
2020-03-17 12:43       ` 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=85ftee5n65.fsf@mojatatu.com \
    --to=mrv@mojatatu.com \
    --cc=davem@davemloft.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.