From: Stephen Hemminger <stephen@networkplumber.org>
To: Francois Michel <francois.michel@uclouvain.be>
Cc: Jamal Hadi Salim <jhs@mojatatu.com>,
Cong Wang <xiyou.wangcong@gmail.com>,
Jiri Pirko <jiri@resnulli.us>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 net-next 0/3] netem: use a seeded PRNG for loss and corruption events
Date: Fri, 18 Aug 2023 17:17:09 -0700 [thread overview]
Message-ID: <20230818171709.56f8be07@hermes.local> (raw)
In-Reply-To: <20230815092348.1449179-1-francois.michel@uclouvain.be>
On Tue, 15 Aug 2023 11:23:37 +0200
Francois Michel <francois.michel@uclouvain.be> wrote:
> From: François Michel <francois.michel@uclouvain.be>
>
> In order to reproduce bugs or performance evaluation of
> network protocols and applications, it is useful to have
> reproducible test suites and tools. This patch adds
> a way to specify a PRNG seed through the
> TCA_NETEM_PRNG_SEED attribute for generating netem
> loss and corruption events. Initializing the qdisc
> with the same seed leads to the exact same loss
> and corruption patterns. If no seed is explicitly
> specified, the qdisc generates a random seed using
> get_random_u64().
>
> This patch can be and has been tested using tc from
> the following iproute2-next fork:
> https://github.com/francoismichel/iproute2-next
>
> For instance, setting the seed 42424242 on the loopback
> with a loss rate of 10% will systematically drop the 5th,
> 12th and 24th packet when sending 25 packets.
>
> v1 -> v2: Address comments and directly use
> prandom_u32_state() instead of get_random_u32() for
> generating loss and corruption events. Generates a random
> seed using get_random_u64() if none was provided explicitly.
>
> François Michel (3):
> netem: add prng attribute to netem_sched_data
> netem: use a seeded PRNG for generating random losses
> netem: use seeded PRNG for correlated loss events
>
> include/uapi/linux/pkt_sched.h | 1 +
> net/sched/sch_netem.c | 49 +++++++++++++++++++++++-----------
> 2 files changed, 35 insertions(+), 15 deletions(-)
>
>
> base-commit: f614a29d6ca6962139b0eb36b985e3dda80258a6
Would you please send an iproute2 patch now for iproute-next
prev parent reply other threads:[~2023-08-19 0:17 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-15 9:23 [PATCH v2 net-next 0/3] netem: use a seeded PRNG for loss and corruption events Francois Michel
2023-08-15 9:23 ` [PATCH v2 net-next 1/3] netem: add prng attribute to netem_sched_data Francois Michel
2023-08-15 9:23 ` [PATCH v2 net-next 2/3] netem: use a seeded PRNG for generating random losses Francois Michel
2023-08-15 9:23 ` [PATCH v2 net-next 3/3] netem: use seeded PRNG for correlated loss events Francois Michel
2023-08-16 9:36 ` [PATCH v2 net-next 0/3] netem: use a seeded PRNG for loss and corruption events Simon Horman
2023-08-16 15:02 ` Stephen Hemminger
2023-08-18 2:30 ` patchwork-bot+netdevbpf
2023-08-19 0:17 ` Stephen Hemminger [this message]
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=20230818171709.56f8be07@hermes.local \
--to=stephen@networkplumber.org \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=francois.michel@uclouvain.be \
--cc=jhs@mojatatu.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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).