Commit Graph

31 Commits

Author SHA1 Message Date
Vijay Subramanian 14a1c164d1 netem: Fail cleanly if user input is wrong
(Resending patch since it looks like my earlier mail did not make it to
netdev).

netem reordering requires that the delay parameter be given. Currently, if no
delay is given, tc prints the error message but still installs the qdisc. Fix
this by printing the usage and failing cleanly.

Signed-off-by: Vijay Subramanian <subramanian.vijay@gmail.com>
2012-01-20 11:21:58 -08:00
Hagen Paul Pfeifer 6b8dc4deea tc: netem rate shaping and cell extension
This patch add rate shaping as well as cell support. The link-rate can be
specified via rate options. Three optional arguments control the cell
knobs: packet-overhead, cell-size, cell-overhead. To ratelimit eth0 root
queue to 5kbit/s, with a 20 byte packet overhead, 100 byte cell size and
a 5 byte per cell overhead:

	tc qdisc add dev eth0 root netem rate 5kbit 20 100 5

Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net>
2012-01-19 14:28:27 -08:00
Eric Dumazet d060de7f8d netem: fix a typo in explain()
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com>
2011-12-24 11:21:33 -08:00
Stephen Hemminger 3c7950af59 netem: add support for 4 state and GE loss model
Incorporate support for new loss models.
2011-12-22 17:08:11 -08:00
Thomas Jarosch fcbd0165fc tc: Use correct variable type for get_distribution() result
get_distribution() returns an int.

cppcheck reported:
[tc/q_netem.c:243]: (style) Checking if unsigned variable 'dist_size' is less than zero.

The mismatch actually rendered the error checking
after get_distribution() ineffective.

Signed-off-by: Thomas Jarosch <thomas.jarosch@intra2net.com>
2011-11-23 14:46:24 -08:00
Stephen Hemminger 59a935d204 Update email address of netem 2011-04-12 14:24:01 -07:00
Florian Westphal 8d8de1139c tc: remove stale code
remove unused #define and "ok" statements.

Signed-off-by: Florian Westphal <fwestphal@astaro.com>
2010-01-21 10:13:01 -08:00
Stephen Hemminger 985f4578c6 Fix warning about strtod() return value 2009-12-26 10:20:50 -08:00
Stephen Hemminger c1b81cb5fe netem potential dist table overflow
Fix possible stack overflow when given distribution table that is
too large.

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-12-12 15:02:51 -08:00
Stephen Hemminger aa27f88c84 Add TC_LIB_DIR environment variable.
Don't hardcode /usr/lib/tc as a path

Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-06-20 15:31:40 -07:00
Patrick McHardy bd29e35d9d Add sprint_ticks() function and use in CBQ
[IPROUTE]: Add sprint_ticks() function and use in CBQ

Add helper function to print ticks to avoid assumptions about clock
resolution in CBQ.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-03-13 14:42:18 -07:00
Patrick McHardy 8f34caafbd Replace "usec" by "time" in function names
[IPROUTE]: Replace "usec" by "time" in function names

Rename functions containing "usec" since they don't necessarily return
usec units anymore.

Signed-off-by: Patrick McHardy <kaber@trash.net>
Signed-off-by: Stephen Hemminger <shemminger@linux-foundation.org>
2007-03-13 14:42:17 -07:00
Stephen Hemminger 40076f622e netem parameters to change command
When using tc to change netem attributes, only those values
on the command line should be passed down, others should
remain unchanged.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2007-01-09 15:46:55 -08:00
Stephen Hemminger ae665a522b Remove trailing whitespace
Go through source files and remove all trailing whitespace

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-12-05 10:10:22 -08:00
Stephen Hemminger fa56513034 Trap possible overflow in usec values to netem
If user asks for large usec value it could overflow 32 bits.

Signed-off-by: Stephen Hemminger <shemminger@osdl.org>
2006-10-19 13:10:26 -07:00
shemminger e9bc3c40d0 Always send reorder message (for compatiablity)
and parse response correctly with netem.
2005-12-10 00:01:02 +00:00
shemminger a31a5d5904 Add corrupt option for netem 2005-12-09 23:27:44 +00:00
shemminger ea8fc1047d Netem support for reorder
Update include files and add support for TCP_CONG
2005-06-22 18:27:49 +00:00
net[shemminger]!shemminger 1d2d1cb522 Import patch thomas.1
(Logical change 1.147)
2005-03-10 19:00:42 +00:00
osdl.net!shemminger fb9b1d0f6a fix potential memory corruption
(Logical change 1.136)
2005-02-07 18:15:04 +00:00
17!tgraf 1a1d22a722 Use NLMSG_TAIL
(Logical change 1.127)
2005-01-18 01:24:18 +00:00
net[shemminger]!kaber 95812b56a5 : prevent tc crashes
(Logical change 1.81)
2004-09-28 18:35:49 +00:00
osdl.net!shemminger f2f99e2eef no longer need xstats stub
(Logical change 1.77)
2004-08-31 17:45:21 +00:00
osdl.net!shemminger 2e21655e39 Use getline() and nested attributes.
(Logical change 1.73)
2004-08-30 20:54:46 +00:00
osdl.net!shemminger b7be3d0cd2 Cleanup cli for new version.
2004/08/09 16:46:47-07:00 osdl.net!shemminger
Add distribution table loading (undebugged as yet).

(Logical change 1.71)
2004-08-23 20:21:21 +00:00
osdl.net!shemminger 025dc69a25 Fix errors in netem scheduler when using PSCHED_CLOCK_CPU,
correct value before passing to kernel.

(Logical change 1.63)
2004-08-09 17:12:23 +00:00
osdl.net!shemminger 31fa60e00f Replace rate with jitter
(Logical change 1.55)
2004-07-12 21:03:29 +00:00
osdl.net!shemminger 7b9868343a Fix netem display of rate and limit.
(Logical change 1.50)
2004-07-02 20:40:35 +00:00
osdl.net!shemminger ffb79d0691 Add new rate and duplicate arguments.
(Logical change 1.41)
2004-07-01 11:02:04 +00:00
osdl.net!shemminger 309a4c90a5 Rename netsim to netem in latest code.
2004/06/28 13:39:57-07:00 osdl.net!shemminger
Rename: tc/q_netsim.c -> tc/q_netem.c

(Logical change 1.39)
2004-06-28 20:41:55 +00:00
osdl.net!shemminger d3bc14fba8 Initial revision 2004-06-28 20:37:01 +00:00