mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[PKT_SCHED] netem: packet corruption option
Here is a new feature for netem in 2.6.16. It adds the ability to randomly corrupt packets with netem. A version was done by Hagen Paul Pfeifer, but I redid it to handle the cases of backwards compatibility with netlink interface and presence of hardware checksum offload. It is useful for testing hardware offload in devices. Signed-off-by: Stephen Hemminger <shemminger@osdl.org> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
8cbb512e50
commit
c865e5d99e
2 changed files with 53 additions and 3 deletions
|
@ -429,6 +429,7 @@ enum
|
|||
TCA_NETEM_CORR,
|
||||
TCA_NETEM_DELAY_DIST,
|
||||
TCA_NETEM_REORDER,
|
||||
TCA_NETEM_CORRUPT,
|
||||
__TCA_NETEM_MAX,
|
||||
};
|
||||
|
||||
|
@ -457,6 +458,12 @@ struct tc_netem_reorder
|
|||
__u32 correlation;
|
||||
};
|
||||
|
||||
struct tc_netem_corrupt
|
||||
{
|
||||
__u32 probability;
|
||||
__u32 correlation;
|
||||
};
|
||||
|
||||
#define NETEM_DIST_SCALE 8192
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue