summaryrefslogtreecommitdiff
path: root/include/linux/pkt_sched.h
diff options
context:
space:
mode:
authorstephen hemminger <shemminger@vyatta.com>2011-02-23 13:04:21 +0000
committerDavid S. Miller <davem@davemloft.net>2011-02-24 22:11:56 -0800
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 {
TCA_NETEM_DELAY_DIST,
TCA_NETEM_REORDER,
TCA_NETEM_CORRUPT,
+ TCA_NETEM_LOSS,
__TCA_NETEM_MAX,
};
@@ -494,6 +495,31 @@ struct tc_netem_corrupt {
__u32 correlation;
};
+enum {
+ NETEM_LOSS_UNSPEC,
+ NETEM_LOSS_GI, /* General Intuitive - 4 state model */
+ NETEM_LOSS_GE, /* Gilbert Elliot models */
+ __NETEM_LOSS_MAX
+};
+#define NETEM_LOSS_MAX (__NETEM_LOSS_MAX - 1)
+
+/* State transition probablities for 4 state model */
+struct tc_netem_gimodel {
+ __u32 p13;
+ __u32 p31;
+ __u32 p32;
+ __u32 p14;
+ __u32 p23;
+};
+
+/* Gilbert-Elliot models */
+struct tc_netem_gemodel {
+ __u32 p;
+ __u32 r;
+ __u32 h;
+ __u32 k1;
+};
+
#define NETEM_DIST_SCALE 8192
#define NETEM_DIST_MAX 16384