linux/net
Hagen Paul Pfeifer 7bc0f28c7a netem: rate extension
Currently netem is not in the ability to emulate channel bandwidth. Only static
delay (and optional random jitter) can be configured.

To emulate the channel rate the token bucket filter (sch_tbf) can be used.  But
TBF has some major emulation flaws. The buffer (token bucket depth/rate) cannot
be 0. Also the idea behind TBF is that the credit (token in buckets) fills if
no packet is transmitted. So that there is always a "positive" credit for new
packets. In real life this behavior contradicts the law of nature where
nothing can travel faster as speed of light. E.g.: on an emulated 1000 byte/s
link a small IPv4/TCP SYN packet with ~50 byte require ~0.05 seconds - not 0
seconds.

Netem is an excellent place to implement a rate limiting feature: static
delay is already implemented, tfifo already has time information and the
user can skip TBF configuration completely.

This patch implement rate feature which can be configured via tc. e.g:

	tc qdisc add dev eth0 root netem rate 10kbit

To emulate a link of 5000byte/s and add an additional static delay of 10ms:

	tc qdisc add dev eth0 root netem delay 10ms rate 5KBps

Note: similar to TBF the rate extension is bounded to the kernel timing
system. Depending on the architecture timer granularity, higher rates (e.g.
10mbit/s and higher) tend to transmission bursts. Also note: further queues
living in network adaptors; see ethtool(8).

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
Acked-by: Eric Dumazet <eric.dumazet@gmail.com>
Signed-off-by: David S. Miller <davem@drr.davemloft.net>
2011-11-30 23:18:35 -05:00
..
9p net/9p: Convert net/9p protocol dumps to tracepoints 2011-10-24 11:13:12 -05:00
802 net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
8021q net: introduce and use netdev_features_t for device features sets 2011-11-16 17:43:10 -05:00
appletalk net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
atm atm: clip: Use device neigh support on top of "arp_tbl". 2011-11-30 18:51:03 -05:00
ax25 NET: AX.25: Check ioctl arguments to avoid overflows further down the road. 2011-11-29 00:23:12 -05:00
batman-adv batman-adv: Fix range check for expected packets 2011-11-20 13:08:35 +01:00
bluetooth Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2011-11-22 14:05:46 -05:00
bridge net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
caif caif: fix endian conversion in cffrml_transmit() 2011-11-21 16:46:24 -05:00
can can: remove references to berlios mailinglist 2011-10-17 19:22:46 -04:00
ceph net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
core neigh: Add device constructor/destructor capability. 2011-11-30 18:48:03 -05:00
dcb net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
dccp Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
decnet Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
dns_resolver
dsa dsa: Move switch drivers to new directory drivers/net/dsa 2011-11-29 00:21:36 -05:00
econet net: Remove all uses of LL_ALLOCATED_SPACE 2011-11-18 14:37:09 -05:00
ethernet net: don't clear IFF_XMIT_DST_RELEASE in ether_setup 2011-09-15 14:49:44 -04:00
ieee802154 net: Remove all uses of LL_ALLOCATED_SPACE 2011-11-18 14:37:09 -05:00
ipv4 ipv4 : igmp : Delete useless parameter in ip_mc_add1_src() 2011-11-30 23:10:01 -05:00
ipv6 ipv6 : mcast : Delete useless parameter in ip6_mc_add1_src() 2011-11-30 23:10:02 -05:00
ipx net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
irda irttp: Use kmemdup rather than duplicating its implementation 2011-11-21 15:02:17 -05:00
iucv net: more accurate skb truesize 2011-10-13 16:05:07 -04:00
key net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
l2tp l2tp: fix l2tp_udp_recv_core() 2011-11-08 13:59:44 -05:00
lapb wan: make LAPB callbacks const 2011-09-16 19:20:20 -04:00
llc net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
mac80211 Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2011-11-28 14:11:18 -05:00
netfilter Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
netlabel Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
netlink af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
netrom NET: NETROM: Fix formatting. 2011-11-29 00:23:13 -05:00
nfc Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2011-11-22 14:05:46 -05:00
packet packet: Add needed_tailroom to packet_sendmsg_spkt 2011-11-18 14:37:10 -05:00
phonet Phonet: set the pipe handle using setsockopt 2011-11-18 14:37:40 -05:00
rds rds: drop "select LLIST" 2011-11-14 00:10:50 -05:00
rfkill Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux 2011-11-22 14:05:46 -05:00
rose net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
rxrpc RxRPC: Use kmemdup rather than duplicating its implementation 2011-11-21 15:02:36 -05:00
sched netem: rate extension 2011-11-30 23:18:35 -05:00
sctp net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
sunrpc net: remove ipv6_addr_copy() 2011-11-22 16:43:32 -05:00
tipc net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
unix af_unix: dont send SCM_CREDENTIALS by default 2011-09-28 13:29:50 -04:00
wanrouter wanrouter: Remove kernel_lock annotations 2011-11-07 13:27:30 -05:00
wimax net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
wireless Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/linville/wireless-next into for-davem 2011-11-28 14:11:18 -05:00
x25 Merge branch 'modsplit-Oct31_2011' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux 2011-11-06 19:44:47 -08:00
xfrm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2011-11-26 14:47:03 -05:00
compat.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00
Kconfig bql: Byte queue limits 2011-11-29 12:46:19 -05:00
Makefile
nonet.c
socket.c net: add network priority cgroup infrastructure (v4) 2011-11-22 15:22:23 -05:00
sysctl_net.c net: Add export.h for EXPORT_SYMBOL/THIS_MODULE to non-modules 2011-10-31 19:30:30 -04:00