From: Eric Dumazet <eric.dumazet@gmail.com>
To: Stephen Hemminger <shemminger@vyatta.com>
Cc: Stefano Salsano <stefano.salsano@uniroma2.it>,
David Miller <davem@davemloft.net>,
Fabio Ludovici <fabio.ludovici@yahoo.it>,
netdev@vger.kernel.org, netem@lists.linuxfoundation.org
Subject: Re: [RFC] netem: correlated loss generation (v3)
Date: Tue, 18 May 2010 07:19:21 +0200 [thread overview]
Message-ID: <1274159961.2567.26.camel@edumazet-laptop> (raw)
In-Reply-To: <20100517205621.036a06e0@nehalam>
Le lundi 17 mai 2010 à 20:56 -0700, Stephen Hemminger a écrit :
> Subject: netem - revised correlated loss generator
>
> This is a patch originated with Stefano Salsano and Fabio Ludovici.
> It provides several alternative loss models for use with netem.
> There are two state machine based models and one table driven model.
>
> To simplify the original code:
> * eliminated the debugging messages and statistics
> * reformatted for clarity
> * changed API to nested attribute relating to loss
> * changed the table to always loop across bits
> * only allocate parameters needed
>
> Still untested, for comment only...
> Should have tested version before 2.6.35 merge window closes.
>
> Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
> + if (loss[NETEM_LOSS_SEQUENCE]) {
> + struct dlgtable *dlg;
> + size_t len = nla_len(loss[NETEM_LOSS_SEQUENCE]);
> +
> + dlg = kmalloc(sizeof(*dlg) + len, GFP_KERNEL);
No overflow check here, len comes from userland.
> + if (dlg)
> + goto nomem;
> +
> + dlg->length = len * BITS_PER_LONG;
> + dlg->index = 0;
> + memcpy(dlg->sequence, nla_data(loss[NETEM_LOSS_SEQUENCE]), len);
> +
> + kfree(q->dlg);
> + q->dlg = dlg;
> + }
> +
> + q->loss_model = model;
> + sch_tree_unlock(sch);
next prev parent reply other threads:[~2010-05-18 5:19 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4BD84428.30904@uniroma2.it>
2010-05-18 3:56 ` [RFC] netem: correlated loss generation (v3) Stephen Hemminger
2010-05-18 5:19 ` Eric Dumazet [this message]
2010-05-19 21:42 ` Hagen Paul Pfeifer
2010-05-19 22:52 ` Stefano Salsano
2010-05-19 23:04 ` Hagen Paul Pfeifer
2010-05-20 0:17 ` Stephen Hemminger
2010-05-20 0:43 ` Hagen Paul Pfeifer
2010-05-20 0:22 ` Stefano Salsano
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=1274159961.2567.26.camel@edumazet-laptop \
--to=eric.dumazet@gmail.com \
--cc=davem@davemloft.net \
--cc=fabio.ludovici@yahoo.it \
--cc=netdev@vger.kernel.org \
--cc=netem@lists.linuxfoundation.org \
--cc=shemminger@vyatta.com \
--cc=stefano.salsano@uniroma2.it \
/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