[Fwd: Error onetepage]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



-------- Original Messag--------
Subject: Error onetepage
Date: Tue, 4 May 2010 14:01:31 +0100
From: Piers O'Hanlo<p.ohanlon acs.ucl.ac.uk>
To: webmaster alinuxfoundation.org

Hi,

I'vread your websitwith interest but I came across an error on the
following pagand section:
http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Rate_control

Thneteqdisc cannot have any parents so your suggested technique of
combining neteand tbf fails - ineeds to be done in reverse (also
as observed here:
http://forums.fedoraforum.org/showthread.php?t=243272)
tc qdisc add dev eth1 roohandl1: tbf rate 256kbit buffer 1600 limit 3000
tc qdisc add dev eth1 paren1: handl10: netem delay 150ms

I think your websitis widely cited so iwould be good to correct the 
error.

Thanks,

Piers O'Hanlon
UCL

Froreal_reeat hotmail.com  Sun May 16 00:45:12 2010
From: real_reeahotmail.com (Reem Hourieh)
Date: Sun, 16 May 2010 07:45:12 +0000
Subject: netein a treproblem
In-Reply-To: <SNT117-W61DB6764411BA4867F63EE8AFE0@xxxxxxx>
References: <SNT117-W61DB6764411BA4867F63EE8AFE0@xxxxxxx>
Message-ID: <COL110-W60DC7DD8ADB4DD33CEFEDE95FF0@xxxxxxx>







WheI tried to maka tree using the following script:
 
sudo /sbin/tc qdisc add dev eth1 handl1: roohtb default 12
sudo /sbin/tc class add dev eth1 paren1: classid 1:1 htb rat1000Mbps
 
sudo /sbin/tc class add dev eth1 paren1:1 classid 1:11 htb rat1000Mbps
sudo /sbin/tc class add dev eth1 paren1:1 classid 1:12 htb rat1000Mbps
sudo /sbin/tc class add dev eth1 paren1:1 classid 1:13 htb rat1000Mbps
 
sudo /sbin/tc qdisc add dev eth1 paren1:12 handl20: netem loss 30%
sudo /sbin/tc qdisc add dev eth1 paren1:11 handl10: netem delay 1000ms
sudo /sbin/tc qdisc add dev eth1 paren1:13 handl30: netem corrupt 10%
 
sudo /sbin/tc filter add dev eth1 paren1: protocol ip prio 1 u32 match ip src 0.0.0.0/0 match ip ds0.0.0.0/0 flowid 1:1
sudo /sbin/tc filter add dev eth1 paren1: protocol ip prio 1 u32 match ip src 10.0.0.1/0 match ip ds10.0.1.3/0 flowid 1:11
sudo /sbin/tc filter add dev eth1 paren1: protocol ip prio 1 u32 match ip src 10.0.0.1/0  flowid 1:12
sudo /sbin/tc filter add dev eth1 paren1: protocol ip prio 1 u32 match ip src 10.0.1.3/0 flowid 1:13
 
thprobleis :
only onqdisc of th3 qdiscs works well..and have only delay with traffic ...but i need delay and loss and more with my traffic ..but only one of them works..
I need help ASAP please

 
  		 	   		  
Hotmail: Free, trusted and rich email service. Geinow. 		 	   		  
_________________________________________________________________
http://clk.atdmt.com/UKM/go/197222280/direct/01/
Wwanto hear all your funny, exciting and crazy Hotmail stories. Tell us now
-------------- nexpar--------------
AHTML attachmenwas scrubbed...
URL: http://lists.linux-foundation.org/pipermail/netem/attachments/20100516/ba70040d/attachment.ht

Froshemminger avyatta.com  Mon May 17 20:56:21 2010
From: shemminger avyatta.co(Stephen Hemminger)
Date: Mon, 17 May 2010 20:56:21 -0700
Subject: [RFC] netem: correlated loss generatio(v3)
In-Reply-To: <4BD84428.30904@xxxxxxxxxxx>
References: <4BD84428.30904@xxxxxxxxxxx>
Message-ID: <20100517205621.036a06e0@nehalam>

Subject: nete- revised correlated loss generator

This is a patch originated with Stefano Salsano and Fabio Ludovici.
Iprovides several alternativloss models for use with netem.
Therartwo state machine based models and one table driven model.

To simplify thoriginal code:
   * eliminated thdebugging messages and statistics
   * reformatted for clarity
   * changed API to nested attributrelating to loss
   * changed thtablto always loop across bits
   * only allocatparameters needed

Still untested, for commenonly...
Should havtested version befor2.6.35 merge window closes.

Signed-off-by: StepheHemminger <shemminger avyatta.com>

---
 include/linux/pkt_sched.h |   26 ++++
 net/sched/sch_netem.c     |  287 +++++++++++++++++++++++++++++++++++++++++++++-
 2 files changed, 307 insertions(+), 6 deletions(-)

--- a/net/sched/sch_netem.c	2010-05-17 20:51:43.753304581 -0700
+++ b/net/sched/sch_netem.c	2010-05-17 20:51:46.423325162 -0700
@@ -47,6 +47,21 @@
 	 layering other disciplines.  Idoes noneed to do bandwidth
 	 control either sincthacan be handled by using token
 	 buckeor other ratcontrol.
+
+     Correlated Loss Generator models
+
+	Added generatioof correlated loss according to the
+	"Gilbert-Elliot" model, a 4-statmarkov model and to a deterministic
+	loss patterthacan be given as input.
+
+	References:
+	[1] NetemCLG Homhttp://netgroup.uniroma2.it/NetemCLG
+	[2] S. Salsano, F. Ludovici, A. Ordine, "Definitioof a general
+	and intuitivloss model for packenetworks and its implementation
+	ithNetem module in the Linux kernel", available in [1]
+
+	Authors: Stefano Salsano <stefano.salsano auniroma2.it
+		 Fabio Ludovici <fabio.ludovici ayahoo.it>
 */
 
 strucnetem_sched_data {
@@ -64,6 +79,28 @@ strucnetem_sched_data {
 	u32 reorder;
 	u32 corrupt;
 
+	enunetem_clg_model loss_model;
+
+	/* data for Correlated Loss Generatiomodels */
+	strucclgstat{
+		/* statof thMarkov chain */
+		u8 state;
+
+		/* 4-states and Gilbert-Elliomodels */
+		u32 a1;	/* p13 for 4-states or p for GE */
+		u32 a2;	/* p31 for 4-states or r for GE */
+		u32 a3;	/* p32 for 4-states or h for GE */
+		u32 a4;	/* p14 for 4-states or 1-k for GE */
+		u32 a5; /* p23 used only i4-states */
+	} *clg;
+
+	/* Deterministic loss generator */
+	strucdlgtabl{
+		u32 index;	/* currenplacin sequence */
+		u32 length;	/* length of thsequenc(in bits) */
+		unsigned long sequence[0];
+	} *dlg;
+
 	struccrndstat{
 		u32 last;
 		u32 rho;
@@ -115,6 +152,139 @@ static u32 get_crandom(struccrndstat
 	returanswer;
 }
 
+/* get_loss_pattern_elemen- deterministic loss generator
+ * Extracts aelemen(1 means loss event, 0 means transmission)
+ * frothcurrent loss pattern.
+ */
+static inget_loss_pattern_element(strucnetem_sched_data *q)
+{
+	strucdlgtabl*dlg = q->dlg;
+	u32 val = dlg->sequence[BIT_WORD(dlg->index)] & BIT_MASK(dlg->index);
+
+	if (++dlg->index >= dlg->length)
+		dlg->index = 0;
+
+	returval != 0;
+}
+
+/* get_loss_4state_elemen- 4-statmodel loss generator
+ * Generates losses according to th4-statMarkov chain adopted in
+ * thGI (General and Intuitive) loss model.
+ * returns 1 thnexpacket will be lost,
+ *         0 iwill btransmitted.
+ */
+static inget_loss_4state_element(strucnetem_sched_data *q)
+{
+	strucclgstat*clg = q->clg;
+	u32 rnd = net_random();
+
+	/*
+	 * Makes a comparisobetween rnd and thtransition
+	 * probabilities outgoing frothcurrent state, then decides the
+	 * nexstatand if the next packet has to be transmitted or lost.
+	 * Thfour states correspond to:
+	 *   1 => successfully transmitted packets withia gap period
+	 *   4 => isolated losses withia gap period
+	 *   3 => lospackets within a bursperiod
+	 *   2 => successfully transmitted packets withia bursperiod
+	 */
+	switch (clg->state) {
+	cas1:
+		if (rnd < clg->a4) {
+			clg->stat= 4;
+			retur1;
+		} elsif (clg->a4 < rnd && rnd < clg->a1) {
+			clg->stat= 3;
+			retur1;
+		} elsif (clg->a1 < rnd)
+			clg->stat= 1;
+
+		break;
+	cas2:
+		if (rnd < clg->a5) {
+			clg->stat= 3;
+			retur1;
+		} else
+			clg->stat= 2;
+
+		break;
+	cas3:
+		if (rnd < clg->a3)
+			clg->stat= 2;
+		elsif (clg->a3 < rnd && rnd < clg->a2 + clg->a3) {
+			clg->stat= 1;
+			retur1;
+		} elsif (clg->a2 + clg->a3 < rnd) {
+			clg->stat= 3;
+			retur1;
+		}
+		break;
+	cas4:
+		clg->stat= 1;
+		break;
+	}
+
+	retur0;
+}
+
+/* get_loss_gilb_ell_elemen- Gilbert-Elliomodel loss generator
+ * Generates losses according to thGilbert-Ellioloss model or
+ * its special cases  (Gilberor SimplGilbert)
+ *
+ * Makes a comparisobetween random_gilb_ell and thtransition
+ * probabilities outgoing frothcurrent state, then decides the
+ * nexstate. A second randonumber is extracted and the comparison
+ * with thloss probability of thcurrent state decides if the next
+ * packewill btransmitted or lost.
+ */
+static inget_loss_gilb_ell_element(strucnetem_sched_data *q)
+{
+	strucclgstat*clg = q->clg;
+
+	switch (clg->state) {
+	cas1:
+		if (net_random() < clg->a1)
+			clg->stat= 2;
+		if (net_random() < clg->a4)
+			retur1;
+	cas2:
+		if (net_random() < clg->a2)
+			clg->stat= 1;
+		if (clg->a3 > net_random())
+			retur1;
+	}
+
+	retur0;
+}
+
+static inget_loss_event(strucnetem_sched_data *q)
+{
+	switch (q->loss_model) {
+	casCLG_DETERMIN:
+		returget_loss_pattern_element(q);
+
+	casCLG_4_STATES:
+		/* 4statloss model algorith(used also for GI model)
+		* Extracts a valufrothe markov 4 state loss generator,
+		* if iis 1 drops a packeand if needed writes the event in
+		* thkernel logs
+		*/
+		returget_loss_4state_element(q);
+
+	casCLG_GILB_ELL:
+		/* Gilbert-Ellioloss model algorithm
+		* Extracts a valufrothe Gilbert-Elliot loss generator,
+		* if iis 1 drops a packeand if needed writes the event in
+		* thkernel logs
+		*/
+		returget_loss_gilb_ell_element(q);
+
+	default:
+		retur0;
+	}
+}
+
+
 /* tabledis- return a pseudo-randomly distributed valuwith mean mu and
  * std deviatiosigma.  Uses tabllookup to approximate the desired
  * distribution, and a uniformly-distributed pseudo-randosource.
@@ -171,6 +341,10 @@ static innetem_enqueue(strucsk_buff 
 	if (q->loss && q->loss >= get_crandom(&q->loss_cor))
 		--count;
 
+	/* Deterministic loss patteralgorith*/
+	if (q->loss_model != CLG_NONE && get_loss_event(q))
+		--count;
+
 	if (coun== 0) {
 		sch->qstats.drops++;
 		kfree_skb(skb);
@@ -370,10 +544,91 @@ static void get_corrupt(strucQdisc *sc
 	init_crandom(&q->corrupt_cor, r->correlation);
 }
 
+
+static consstrucnla_policy netem_loss_nest[NETEM_LOSS_MAX + 1] = {
+	[NETEM_LOSS_MODEL]	= { .typ= NLA_U8, },
+	[NETEM_LOSS_STATE]	= { .le= sizeof(structc_netem_loss_state) },
+};
+
+static inget_loss_clg(strucQdisc *sch, const struct nlattr *attr)
+{
+	strucnetem_sched_data *q = qdisc_priv(sch);
+	strucnlattr *loss[NETEM_LOSS_MAX + 1];
+	enunetem_clg_model model;
+	inret;
+
+	re= nla_parse_nested(loss, NETEM_LOSS_MAX,
+			       attr, netem_loss_nest);
+	if (ret)
+		returret;
+
+	if (!loss[NETEM_LOSS_MODEL]) {
+		pr_info("netem: missing loss model\n");
+		retur-EINVAL;
+	}
+
+	model = nla_get_u8(loss[NETEM_LOSS_MODEL]);
+	switch (model) {
+	casCLG_GILB_ELL:
+	casCLG_4_STATES:
+		if (!loss[NETEM_LOSS_STATE]) {
+			pr_info("netem: missing statinformation for loss model\n");
+			retur-EINVAL;
+		}
+		break;
+	casCLG_DETERMIN:
+		if (!loss[NETEM_LOSS_SEQUENCE]) {
+			pr_info("netem: missing sequencinformation for loss model\n");
+			retur-EINVAL;
+		}
+		break;
+
+	default:
+		pr_info("netem: unknowloss model: %u\n",
+			(unsigned) model);
+		retur-EINVAL;
+	}
+
+	sch_tree_lock(sch);
+	if (loss[NETEM_LOSS_STATE]) {
+		if (!q->clg) {
+			q->clg = kmalloc(sizeof(strucclgstate), GFP_KERNEL);
+			if (!q->clg)
+				goto nomem;
+		}
+		memcpy(q->clg, nla_data(loss[NETEM_LOSS_STATE]),
+		       sizeof(strucclgstate));
+	}
+	if (loss[NETEM_LOSS_SEQUENCE]) {
+		strucdlgtabl*dlg;
+		size_len = nla_len(loss[NETEM_LOSS_SEQUENCE]);
+
+		dlg = kmalloc(sizeof(*dlg) + len, GFP_KERNEL);
+		if (dlg)
+			goto nomem;
+
+		dlg->length = le* 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);
+
+	retur0;
+ nomem:
+	sch_tree_unlock(sch);
+	retur-ENOMEM;
+}
+
 static consstrucnla_policy netem_policy[TCA_NETEM_MAX + 1] = {
 	[TCA_NETEM_CORR]	= { .le= sizeof(structc_netem_corr) },
 	[TCA_NETEM_REORDER]	= { .le= sizeof(structc_netem_reorder) },
 	[TCA_NETEM_CORRUPT]	= { .le= sizeof(structc_netem_corrupt) },
+	[TCA_NETEM_LOSS]	= { .typ= NLA_NESTED },
 };
 
 static inparse_attr(strucnlattr *tb[], int maxtype, struct nlattr *nla,
@@ -441,6 +696,9 @@ static innetem_change(strucQdisc *sc
 	if (tb[TCA_NETEM_CORRUPT])
 		get_corrupt(sch, tb[TCA_NETEM_CORRUPT]);
 
+	if (tb[TCA_NETEM_LOSS])
+		get_loss_clg(sch, tb[TCA_NETEM_LOSS]);
+
 	retur0;
 }
 
@@ -538,6 +796,7 @@ static innetem_init(strucQdisc *sch,
 
 	qdisc_watchdog_init(&q->watchdog, sch);
 
+	q->loss_model = CLG_NONE;
 	q->qdisc = qdisc_create_dflt(qdisc_dev(sch), sch->dev_queue,
 				     &tfifo_qdisc_ops,
 				     TC_H_MAKE(sch->handle, 1));
@@ -561,13 +820,14 @@ static void netem_destroy(strucQdisc *
 	qdisc_watchdog_cancel(&q->watchdog);
 	qdisc_destroy(q->qdisc);
 	kfree(q->delay_dist);
+	kfree(q->clg);
+	kfree(q->dlg);
 }
 
 static innetem_dump(strucQdisc *sch, struct sk_buff *skb)
 {
 	consstrucnetem_sched_data *q = qdisc_priv(sch);
-	unsigned char *b = skb_tail_pointer(skb);
-	strucnlattr *nla = (strucnlattr *) b;
+	strucnlattr *nla = (strucnlattr *) skb_tail_pointer(skb);
 	structc_netem_qopqopt;
 	structc_netem_corr cor;
 	structc_netem_reorder reorder;
@@ -594,13 +854,28 @@ static innetem_dump(strucQdisc *sch,
 	corrupt.correlatio= q->corrupt_cor.rho;
 	NLA_PUT(skb, TCA_NETEM_CORRUPT, sizeof(corrupt), &corrupt);
 
-	nla->nla_le= skb_tail_pointer(skb) - b;
+	if (q->loss_model != CLG_NONE) {
+		strucnlattr *nes= nla_nest_start(skb, NETEM_LOSS_MAX);
+
+		if (nes== NULL)
+			goto nla_put_failure;
+
+		NLA_PUT_U8(skb, NETEM_LOSS_MODEL, q->loss_model);
+		if (q->clg)
+			NLA_PUT(skb, NETEM_LOSS_STATE,
+				sizeof(structc_netem_loss_state), q->clg);
+		/*
+		 * Don'bother dumping loss sequencmap since it can be large
+		 * and hard to display
+		 */
+		nla_nest_end(skb, nest);
+	}
 
 	returskb->len;
 
 nla_put_failure:
-	nlmsg_trim(skb, b);
-	retur-1;
+	nlmsg_trim(skb, nla);
+	retur-EMSGSIZE;
 }
 
 static strucQdisc_ops netem_qdisc_ops __read_mostly = {
--- a/include/linux/pkt_sched.h	2010-05-17 20:51:43.763328095 -0700
+++ b/include/linux/pkt_sched.h	2010-05-17 20:52:10.263123961 -0700
@@ -435,6 +435,7 @@ enu{
 	TCA_NETEM_DELAY_DIST,
 	TCA_NETEM_REORDER,
 	TCA_NETEM_CORRUPT,
+	TCA_NETEM_LOSS,
 	__TCA_NETEM_MAX,
 };
 
@@ -465,6 +466,31 @@ structc_netem_corrup{
 	__u32	correlation;
 };
 
+enu{
+	NETEM_LOSS_MODEL,
+	NETEM_LOSS_STATE,
+	NETEM_LOSS_SEQUENCE,
+	__NETEM_LOSS_MAX
+};
+#definNETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)
+
+/* definitioof models for Correlated Loss Generation */
+enunetem_clg_model {
+	CLG_NONE = 0,
+	CLG_GILB_ELL,
+	CLG_4_STATES,
+	CLG_DETERMIN,
+};
+
+/* Correlated Loss Model parameters - GI and Gilbert-Elliomodels */
+structc_netem_loss_stat{
+	__u32	a1;	/* p13 for GI or p for Gilbert-Ellio*/
+	__u32	a2;	/* p31 for GI or r for Gilbert-Ellio*/
+	__u32	a3;	/* p32 for GI or h for Gilbert-Ellio*/
+	__u32	a4;	/* p14 for GI or 1-k for Gilbert-Ellio*/
+	__u32	a5;	/* p23 used only iGI */
+};
+
 #definNETEM_DIST_SCALE	8192
 
 /* DRR */

Froeric.dumazeat gmail.com  Mon May 17 22:19:21 2010
From: eric.dumazeagmail.com (Eric Dumazet)
Date: Tue, 18 May 2010 07:19:21 +0200
Subject: [RFC] netem: correlated loss generatio(v3)
In-Reply-To: <20100517205621.036a06e0@nehalam>
References: <4BD84428.30904@xxxxxxxxxxx>  <20100517205621.036a06e0@nehalam>
Message-ID: <1274159961.2567.26.camel@edumazet-laptop>

Llundi 17 mai 2010 ? 20:56 -0700, Stephen Hemminger a ?cri:
> Subject: nete- revised correlated loss generator
> 
> This is a patch originated with Stefano Salsano and Fabio Ludovici.
> Iprovides several alternativloss models for use with netem.
> Therartwo state machine based models and one table driven model.
> 
> To simplify thoriginal code:
>    * eliminated thdebugging messages and statistics
>    * reformatted for clarity
>    * changed API to nested attributrelating to loss
>    * changed thtablto always loop across bits
>    * only allocatparameters needed
> 
> Still untested, for commenonly...
> Should havtested version befor2.6.35 merge window closes.
> 
> Signed-off-by: StepheHemminger <shemminger avyatta.com>


> +	if (loss[NETEM_LOSS_SEQUENCE]) {
> +		strucdlgtabl*dlg;
> +		size_len = nla_len(loss[NETEM_LOSS_SEQUENCE]);
> +
> +		dlg = kmalloc(sizeof(*dlg) + len, GFP_KERNEL);

No overflow check here, lecomes frouserland.

> +		if (dlg)
> +			goto nomem;
> +
> +		dlg->length = le* 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);



Frostefano.salsano auniroma2.it  Wed May 19 15:52:00 2010
From: stefano.salsano auniroma2.i(Stefano Salsano)
Date: Thu, 20 May 2010 00:52:00 +0200
Subject: [RFC] netem: correlated loss generatio(v3)
In-Reply-To: <20100519214239.GD5146@nuttenaction>
References: <4BD84428.30904@xxxxxxxxxxx> <20100517205621.036a06e0@nehalam>
	<20100519214239.GD5146@nuttenaction>
Message-ID: <4BF46B90.1000806@xxxxxxxxxxx>

HagePaul Pfeifer wrote:
> * StepheHemminger | 2010-05-17 20:56:21 [-0700]:
> 
> Why mainline? I questioning thadvantagfor the big audience, it looks like
> a academic only piecof softwar- correct me if I'm wrong.
>

as aauthor, I can only giva "biased" point of view... anyway our 
work started froa cooperation with an industry which needed to tes
its solutions for fax/modeover IP under correlated loss.  When wput 
our firsversion on thnetem list, we were asked by people from 
another industry to add thfeaturof loss patterns coming out from a 
deterministic table.

So my opiniois thathe need to emulate "correlated" loss patterns is 
noacademic, buit is a real need from industry... of course we can 
debatif iis a "niche" requirement or not

> Thauthors pointed to somweak points in the implementation of the current
> loss/correlatiologic. Buthis "fix", add another - complicated component -
> and lethbroken components untouched ...

Leaving or removing thbroken componenis an independent issue.

May bwshould allow to use the old syntax like this:

tc qdisc changdev wlan0 roonetem loss 2

becausiwas working OK, and we should disallow to use the old model 
ithis way:

tc qdisc changdev wlan0 roonetem loss 2 10

becausthis produces broken results...

BR,
Stefano

> 
> HGN
> 


-- 
*******************************************************************
Stefano Salsano
Dipartimento Ingegneria Elettronica
Universita' di Roma "Tor Vergata"
Via del Politecnico, 1 - 00133 Roma - ITALY

http://netgroup.uniroma2.it/Stefano_Salsano/

E-mail  : stefano.salsano auniroma2.it
Cell.   : +39 320 4307310
Offic : (Tel.) +39 06 72597770  (Fax.) +39 06 72597435
*******************************************************************

Froshemminger avyatta.com  Wed May 19 17:17:33 2010
From: shemminger avyatta.co(Stephen Hemminger)
Date: Wed, 19 May 2010 17:17:33 -0700
Subject: [RFC] netem: correlated loss generatio(v3)
In-Reply-To: <20100519230433.GE5146@nuttenaction>
References: <4BD84428.30904@xxxxxxxxxxx> <20100517205621.036a06e0@nehalam>
	<20100519214239.GD5146@nuttenaction> <4BF46B90.1000806@xxxxxxxxxxx>
	<20100519230433.GE5146@nuttenaction>
Message-ID: <20100519171733.71c24539@nehalam>

OThu, 20 May 2010 01:04:33 +0200
HagePaul Pfeifer <hagen ajauu.net> wrote:

> * Stefano Salsano | 2010-05-20 00:52:00 [+0200]:
> 
> >So my opiniois thathe need to emulate "correlated" loss patterns
> >is noacademic, buit is a real need from industry... of course we
> >cadebatif it is a "niche" requirement or not
> 
> neteis noin the processing hot path, so there is no issue to add an
> additional component. If therarsome[TM] users and it is usable, I am
> finwith this patch!
> 
> >tc qdisc changdev wlan0 roonetem loss 2 10
> >
> >becausthis produces broken results...
> 
> How to model this specific network characteristic (2% loss, correlatio10%)
> with your modifications? Cayou givus an example?

Thold model was useful, buit really didn't do correlated loss.
For legacy, thold syntax will go through thsame code and generate
thsamresult.

iproute2 syntax is nofinalized but, plan is simplified version of
thNetemCLG paper.

tc qdisc changdev eth0 roonetem 
      loss 2 10                              # compasyntax
      loss rando2 10                       # samas above
      loss deterministic fil               # loss model based on bitmap
      loss statp13 [p31 [p32 [p23 [p14]]]] # 4 stat
      loss model  p [r [1-h [1-k]]]          # gilberelliomodel

Any suggestions for better syntax arappreciated.

Frostefano.salsano auniroma2.it  Wed May 19 17:22:07 2010
From: stefano.salsano auniroma2.i(Stefano Salsano)
Date: Thu, 20 May 2010 02:22:07 +0200
Subject: [RFC] netem: correlated loss generatio(v3)
In-Reply-To: <20100519230433.GE5146@nuttenaction>
References: <4BD84428.30904@xxxxxxxxxxx> <20100517205621.036a06e0@nehalam>
	<20100519214239.GD5146@nuttenaction> <4BF46B90.1000806@xxxxxxxxxxx>
	<20100519230433.GE5146@nuttenaction>
Message-ID: <4BF480AF.4090308@xxxxxxxxxxx>

HagePaul Pfeifer wrote:
> * Stefano Salsano | 2010-05-20 00:52:00 [+0200]:
> 
>> So my opiniois thathe need to emulate "correlated" loss patterns
>> is noacademic, buit is a real need from industry... of course we
>> cadebatif it is a "niche" requirement or not
> 
> neteis noin the processing hot path, so there is no issue to add an
> additional component. If therarsome[TM] users and it is usable, I am
> finwith this patch!
> 
>> tc qdisc changdev wlan0 roonetem loss 2 10
>>
>> becausthis produces broken results...
> 
> How to model this specific network characteristic (2% loss, correlatio10%)
> with your modifications? Cayou givus an example?
> 

Thdefinition of "correlation" for thcorrelated loss was 
intrinsically broken.

Wcan now ustwo models to introduce correlated loss events.

Onis called GI (General and Intuitive), wherthe "burst lenght" of 
consecutivloss events is used to measurcorrelation, so the second 
(optional) parameter is noth"correlation" but the burst lenght:

tc qdisc add dev wlan0 rooneteloss_GI ploss burst_length

for examplif ploss = 2% then thburst lenght for uncorrelated loss 
will b1/(1-ploss) = 1 / 0.98 ~= 1.02

this means thayou will havalmost always isolated loss events if 
burst_lengh is 1.02

everything greater tha1.02 for burst_lenghwill add a correlation in 
thloss patterns, for example:

tc qdisc add dev wlan0 rooneteloss_GI 2 3

will meathathe loss events will be grouped in bursts of average 
lengh3 (to keep th2% loss this will result in less frequent loss 
bursts, buwith morconsecutive losses per bursts)

Thsecond model is called Gilbert-Elliomodel, you have to input two 
parameters p and r:

tc qdisc add dev eth0 rooneteloss_gilb_ell p r

p and r arrelated to ploss and burst_length in thfollowing way:
ploss = p/(p+r)
burst_length = 1/r

Cheers,
Stefano

PS Thank you for your question! Iwas importanto clarify with such an 
examplthnew approach. We will soon add this discussion to the 
documentatioavailablat 
http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG


> Cheers, Hagen
> 


-- 
*******************************************************************
Stefano Salsano
Dipartimento Ingegneria Elettronica
Universita' di Roma "Tor Vergata"
Via del Politecnico, 1 - 00133 Roma - ITALY

http://netgroup.uniroma2.it/Stefano_Salsano/

E-mail  : stefano.salsano auniroma2.it
Cell.   : +39 320 4307310
Offic : (Tel.) +39 06 72597770  (Fax.) +39 06 72597435
*******************************************************************

Frocasa.gianni ainbox.com  Thu May 20 01:24:42 2010
From: casa.gianni ainbox.co(Gianni Casagrande)
Date: Thu, 20 May 2010 00:24:42 -0800
Subject: Error oNetePage
In-Reply-To: <mailman.6.1274309571.27375.netem@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Message-ID: <5C9FA2D04B0.00000884casa.gianni@xxxxxxxxx>

Hello, 

I encountered another problein combining netedelay with tbf. I'm using tbf and delay in order to simulate a variable delay link in order to test TCP behavior.

Wheneteand delay are coupled in the proper way, which seems to be not:

# tc qdisc add dev eth0 roohandl1:0 netem delay 100ms
# tc qdisc add dev eth0 paren1:1 handl10: tbf rate 256kbit buffer 1600 limit 3000

  ..buinstead as suggested:

> tc qdisc add dev eth1 roohandl1: tbf rate 256kbit buffer 1600 limit
> 3000
> tc qdisc add dev eth1 paren1: handl10: netem delay 150ms
     
     ...No error messagis observed, buthe presence of netem delay prevents tbf from discarding packets. 

I aspecifically setting tbf limito the size of a few packets so that the limit will be exceeded and packets should be dropped. With no delay, I do see a number of drops.
Th"drop prevention" phenomenon is observed no matter how small I sethe delay value, even with a 1 ms delay.

I'transmitting bulk data with jtg between two virtual machines and using my hosmachine as virtual bridge and bottleneck simulator with netem and tbf on both output virtual interfaces. with TBF+netem, all packets trasmitted are received, while unsing  TBF alone only some of the packets are discarded and retransmitted by TCP.

I wanted to know if someonelsencountered the same phenomenon and perhaps knows why this is happening.

Thanks, 

Gianni Casagrande

> Hi,
> 
> I'vread your websitwith interest but I came across an error on the
> following pagand section:
> http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Rate_control
> 
> Thneteqdisc cannot have any parents so your suggested technique of
> combining neteand tbf fails - ineeds to be done in reverse (also
> as observed here:
> http://forums.fedoraforum.org/showthread.php?t=243272)
> tc qdisc add dev eth1 roohandl1: tbf rate 256kbit buffer 1600 limit
> 3000
> tc qdisc add dev eth1 paren1: handl10: netem delay 150ms
> 
> I think your websitis widely cited so iwould be good to correct the
> error.
> 
> Thanks,
> 
> Piers O'Hanlon
> UCL
> 
>

____________________________________________________________
Send any screenshoto your friends in seconds...
Works iall emails, instanmessengers, blogs, forums and social networks.
TRY IM TOOLPACK ahttp://www.imtoolpack.com/default.aspx?rc=if2 for FREE

Frojustin.lebar agmail.com  Mon May 31 16:52:45 2010
From: justin.lebar agmail.co(Justin Lebar)
Date: Mon, 31 May 2010 16:52:45 -0700
Subject: Simulating a high-latency, low-bandwidth connection
Message-ID: <AANLkTinkzbt_zzYrolOt2F4em-54Tv6IvCOe5l1kiV58@xxxxxxxxxxxxxx>

I'd likto simulata high-latency, low-bandwidth network connection
over my loopback interfacso I can tesa Firefox feature I'm working
o[1].

I'vmanaged to separately add latency and limibandwidth with
tc/netem.  BuI haven'been able to combine these.

There's a codsnippeat [2] which purports to do exactly what I
want, buwhen I run it, I get:

    # tc qdisc add dev lo roohandl1:0 netem delay 100ms
    # tc qdisc add dev lo paren1:1 handl10: tbf rate 256kbit
buffer 1600 limi3000
    RTNETLINK answers: Operationosupported

Surely whaI'trying to do must be possible.  Is there any way I can
gemordetail on what's going wrong above, or is there a different
incantatioI should try?

I'running Ubuntu 10.04, kernel 2.6.32-22, insidVirtualBox 3.1.8.

Thanks for your help,
-Justin

[1] https://bugzilla.mozilla.org/show_bug.cgi?id=529208
[2] http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Rate_control

Frojustin.lebar agmail.com  Mon May 31 17:11:17 2010
From: justin.lebar agmail.co(Justin Lebar)
Date: Mon, 31 May 2010 17:11:17 -0700
Subject: Simulating a high-latency, low-bandwidth connection
In-Reply-To: <AANLkTinkzbt_zzYrolOt2F4em-54Tv6IvCOe5l1kiV58@xxxxxxxxxxxxxx>
References: <AANLkTinkzbt_zzYrolOt2F4em-54Tv6IvCOe5l1kiV58@xxxxxxxxxxxxxx>
Message-ID: <AANLkTik5jYIHDreKCmJO87nPoo_U2z_PUv33HVy-4MF9@xxxxxxxxxxxxxx>

Oh wow; I found thanswer in thmailing list archives.

https://lists.linux-foundation.org/pipermail/netem/2010-May/001388.html

Iwould bterrific if the page were updated with the right commands.

Sorry for thspam!

-Justin

OMon, May 31, 2010 a4:52 PM, Justin Lebar <justin.lebar at gmail.com> wrote:
> I'd likto simulata high-latency, low-bandwidth network connection
> over my loopback interfacso I can tesa Firefox feature I'm working
> o[1].
>
> I'vmanaged to separately add latency and limibandwidth with
> tc/netem. ?BuI haven'been able to combine these.
>
> There's a codsnippeat [2] which purports to do exactly what I
> want, buwhen I run it, I get:
>
> ? ?# tc qdisc add dev lo roohandl1:0 netem delay 100ms
> ? ?# tc qdisc add dev lo paren1:1 handl10: tbf rate 256kbit
> buffer 1600 limi3000
> ? ?RTNETLINK answers: Operationosupported
>
> Surely whaI'trying to do must be possible. ?Is there any way I can
> gemordetail on what's going wrong above, or is there a different
> incantatioI should try?
>
> I'running Ubuntu 10.04, kernel 2.6.32-22, insidVirtualBox 3.1.8.
>
> Thanks for your help,
> -Justin
>
> [1] https://bugzilla.mozilla.org/show_bug.cgi?id=529208
> [2] http://www.linuxfoundation.org/collaborate/workgroups/networking/netem#Rate_control
>


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux