Commit f98a65e0 authored by Stephen Hemminger's avatar Stephen Hemminger Committed by David S. Miller

[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: default avatarStephen Hemminger <shemminger@osdl.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 83856742
...@@ -402,6 +402,16 @@ enum { ...@@ -402,6 +402,16 @@ enum {
#define TCA_ATM_MAX TCA_ATM_STATE #define TCA_ATM_MAX TCA_ATM_STATE
/* Network emulator */ /* 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 struct tc_netem_qopt
{ {
__u32 latency; /* added delay (us) */ __u32 latency; /* added delay (us) */
...@@ -411,4 +421,19 @@ struct tc_netem_qopt ...@@ -411,4 +421,19 @@ struct tc_netem_qopt
__u32 duplicate; /* random packet dup (0=none ~0=100%) */ __u32 duplicate; /* random packet dup (0=none ~0=100%) */
__u32 jitter; /* random jitter in latency (us) */ __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 #endif
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment