summaryrefslogtreecommitdiff
path: root/include/linux/pkt_sched.h
diff options
context:
space:
mode:
authorHagen Paul Pfeifer <hagen@jauu.net>2011-12-12 18:30:00 +0400
committerDavid S. Miller <davem@davemloft.net>2011-12-13 04:44:48 +0400
commit90b41a1cd44cc4e507b554ae5a36562a1ba9a4e8 (patch)
tree4206cd6caab2dcec1d3937d5c0eed04085a153a4 /include/linux/pkt_sched.h
parentc7c6575f254e5621a8408c29bdab0d704c3fab6e (diff)
downloadlinux-90b41a1cd44cc4e507b554ae5a36562a1ba9a4e8.tar.xz
netem: add cell concept to simulate special MAC behavior
This extension can be used to simulate special link layer characteristics. Simulate because packet data is not modified, only the calculation base is changed to delay a packet based on the original packet size and artificial cell information. packet_overhead can be used to simulate a link layer header compression scheme (e.g. set packet_overhead to -20) or with a positive packet_overhead value an additional MAC header can be simulated. It is also possible to "replace" the 14 byte Ethernet header with something else. cell_size and cell_overhead can be used to simulate link layer schemes, based on cells, like some TDMA schemes. Another application area are MAC schemes using a link layer fragmentation with a (small) header each. Cell size is the maximum amount of data bytes within one cell. Cell overhead is an additional variable to change the per-cell-overhead (e.g. 5 byte header per fragment). Example (5 kbit/s, 20 byte per packet overhead, cell-size 100 byte, per cell overhead 5 byte): tc qdisc add dev eth0 root netem rate 5kbit 20 100 5 Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: Florian Westphal <fw@strlen.de> Acked-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.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/pkt_sched.h b/include/linux/pkt_sched.h
index 8786ea741f52..8daced32a014 100644
--- a/include/linux/pkt_sched.h
+++ b/include/linux/pkt_sched.h
@@ -502,6 +502,9 @@ struct tc_netem_corrupt {
struct tc_netem_rate {
__u32 rate; /* byte/s */
+ __s32 packet_overhead;
+ __u32 cell_size;
+ __s32 cell_overhead;
};
enum {