aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/pkt_sched.h
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-02-23 08:04:21 -0500
committerDavid S. Miller <davem@davemloft.net>2011-02-25 01:11:56 -0500
commit661b79725fea030803a89a16cda506bac8eeca78 (patch)
treeb13a294ecb7696c2c96db88f5b98627f5c4d4ad5 /include/linux/pkt_sched.h
parent10f6dfcfde884441db89dc66b945d6c948e1d356 (diff)
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. This patch adds two state machine based loss models. See: http://netgroup.uniroma2.it/twiki/bin/view.cgi/Main/NetemCLG Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/pkt_sched.h')
-rw-r--r--include/linux/pkt_sched.h26
1 files changed, 26 insertions, 0 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 891382268fe1..b1032a3fafdc 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -464,6 +464,7 @@ enum {
464 TCA_NETEM_DELAY_DIST, 464 TCA_NETEM_DELAY_DIST,
465 TCA_NETEM_REORDER, 465 TCA_NETEM_REORDER,
466 TCA_NETEM_CORRUPT, 466 TCA_NETEM_CORRUPT,
467 TCA_NETEM_LOSS,
467 __TCA_NETEM_MAX, 468 __TCA_NETEM_MAX,
468}; 469};
469 470
@@ -494,6 +495,31 @@ struct tc_netem_corrupt {
494 __u32 correlation; 495 __u32 correlation;
495}; 496};
496 497
498enum {
499 NETEM_LOSS_UNSPEC,
500 NETEM_LOSS_GI, /* General Intuitive - 4 state model */
501 NETEM_LOSS_GE, /* Gilbert Elliot models */
502 __NETEM_LOSS_MAX
503};
504#define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)
505
506/* State transition probablities for 4 state model */
507struct tc_netem_gimodel {
508 __u32 p13;
509 __u32 p31;
510 __u32 p32;
511 __u32 p14;
512 __u32 p23;
513};
514
515/* Gilbert-Elliot models */
516struct tc_netem_gemodel {
517 __u32 p;
518 __u32 r;
519 __u32 h;
520 __u32 k1;
521};
522
497#define NETEM_DIST_SCALE 8192 523#define NETEM_DIST_SCALE 8192
498#define NETEM_DIST_MAX 16384 524#define NETEM_DIST_MAX 16384
499 525