From: Simon Horman <horms@kernel.org>
To: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
Cc: netdev@vger.kernel.org, davem@davemloft.net, kuba@kernel.org,
edumazet@google.com, pabeni@redhat.com,
linux-kselftest@vger.kernel.org,
Willem de Bruijn <willemb@google.com>
Subject: Re: [PATCH net-next] selftests: net: verify fq per-band packet limit
Date: Mon, 20 Nov 2023 08:42:05 +0000 [thread overview]
Message-ID: <20231120084205.GI186930@vergenet.net> (raw)
In-Reply-To: <20231116203449.2627525-1-willemdebruijn.kernel@gmail.com>
On Thu, Nov 16, 2023 at 03:34:43PM -0500, Willem de Bruijn wrote:
> From: Willem de Bruijn <willemb@google.com>
>
> Commit 29f834aa326e ("net_sched: sch_fq: add 3 bands and WRR
> scheduling") introduces multiple traffic bands, and per-band maximum
> packet count.
>
> Per-band limits ensures that packets in one class cannot fill the
> entire qdisc and so cause DoS to the traffic in the other classes.
>
> Verify this behavior:
> 1. set the limit to 10 per band
> 2. send 20 pkts on band A: verify that 10 are queued, 10 dropped
> 3. send 20 pkts on band A: verify that 0 are queued, 20 dropped
> 4. send 20 pkts on band B: verify that 10 are queued, 10 dropped
>
> Packets must remain queued for a period to trigger this behavior.
> Use SO_TXTIME to store packets for 100 msec.
>
> The test reuses existing upstream test infra. The script is a fork of
> cmsg_time.sh. The scripts call cmsg_sender.
>
> The test extends cmsg_sender with two arguments:
>
> * '-P' SO_PRIORITY
> There is a subtle difference between IPv4 and IPv6 stack behavior:
> PF_INET/IP_TOS sets IP header bits and sk_priority
> PF_INET6/IPV6_TCLASS sets IP header bits BUT NOT sk_priority
>
> * '-n' num pkts
> Send multiple packets in quick succession.
> I first attempted a for loop in the script, but this is too slow in
> virtualized environments, causing flakiness as the 100ms timeout is
> reached and packets are dequeued.
>
> Also do not wait for timestamps to be queued unless timestamps are
> requested.
>
> Signed-off-by: Willem de Bruijn <willemb@google.com>
Thanks Willem,
this looks nice and clean to me.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2023-11-20 8:42 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-16 20:34 [PATCH net-next] selftests: net: verify fq per-band packet limit Willem de Bruijn
2023-11-20 8:42 ` Simon Horman [this message]
2023-11-20 9:12 ` Eric Dumazet
2023-11-21 2:00 ` patchwork-bot+netdevbpf
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=20231120084205.GI186930@vergenet.net \
--to=horms@kernel.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--cc=linux-kselftest@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=willemb@google.com \
--cc=willemdebruijn.kernel@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