summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorStephen Hemminger <shemminger@osdl.org>2004-08-27 02:38:24 -0700
committerDavid S. Miller <davem@nuts.davemloft.net>2004-08-27 02:38:24 -0700
commitf98a65e0d5ee12696f0edb558ae4da692080359e (patch)
treea84f4e2ac8e9749011c2708a8cbbe8eb4a98b24d /include/linux
parent838567427e14e9003578623151ab0e6af0265b4c (diff)
[PKT_SCHED]: Update for netem scheduler.
This is a third revision of the netem extensions which provides * packet duplication * correlated random number * loading distribution table The API is backwards compatible and now uses nested elements to allow for easier future changes. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/pkt_sched.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index d98d8cfcd08d..386d85c0c68c 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -402,6 +402,16 @@ enum {
#define TCA_ATM_MAX TCA_ATM_STATE
/* Network emulator */
+
+enum
+{
+ TCA_NETEM_UNSPEC,
+ TCA_NETEM_CORR,
+ TCA_NETEM_DELAY_DIST,
+};
+
+#define TCA_NETEM_MAX TCA_NETEM_DELAY_DIST
+
struct tc_netem_qopt
{
__u32 latency; /* added delay (us) */
@@ -411,4 +421,19 @@ struct tc_netem_qopt
__u32 duplicate; /* random packet dup (0=none ~0=100%) */
__u32 jitter; /* random jitter in latency (us) */
};
+
+struct tc_netem_corr
+{
+ __u32 delay_corr; /* delay correlation */
+ __u32 loss_corr; /* packet loss correlation */
+ __u32 dup_corr; /* duplicate correlation */
+};
+
+struct tc_netem_dist
+{
+ __u32 size; /* table size */
+ __u32 factor; /* table scaling factor */
+ __s16 data[0]; /* distribution table values */
+};
+
#endif