* [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace
@ 2006-08-22 14:32 Rainer Baumann
0 siblings, 0 replies; 5+ messages in thread
From: Rainer Baumann @ 2006-08-22 14:32 UTC (permalink / raw)
To: Stephen Hemminger, netdev, netem
Trace Control for Netem: Emulate network properties such as
long-dependency and self-similarity of cross-traffic.
The delay, drop, duplication and corruption values are readout in user
space and sent to kernel space via procfs.
The kernel determines the time when new values should be sent by the use
of SIGSTOP and SIGCONT signals.
In order to have always packet action values ready to apply, there are
two buffers that hold these values.
Packet action values can be read from one buffer and the other buffer
can be refilled with new values simultaneously.
If a buffer is empty it will be switched to the other buffer and a
SIGCONT signal is sent in order to receive new packet action values.
Having applied the delay value to a packet, the packet gets processed by
the original netem functions.
Signed-off-by: Rainer Baumann <baumann@tik.ee.ethz.ch>
---
Patch for linux kernel 2.6.16.19: http://tcn.hypert.net/tcnKernel.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace
@ 2006-09-22 6:15 Rainer Baumann
2006-09-22 15:19 ` Hagen Paul Pfeifer
2006-09-22 17:20 ` Stephen Hemminger
0 siblings, 2 replies; 5+ messages in thread
From: Rainer Baumann @ 2006-09-22 6:15 UTC (permalink / raw)
To: Stephen Hemminger, netdev, netem
Trace Control for Netem: Emulate network properties such as long range dependency and self-similarity of cross-traffic.
kernel space:
The delay, drop, duplication and corruption values are readout in user space and sent to kernel space via configfs. The userspace process will "hang on write" until the kernel needs new data.
In order to have always packet action values ready to apply, there are two buffers that hold these values. Packet action values can be read from one buffer and the other buffer can be refilled with new values simultaneously. The synchronization of "need more delay values" and "return from write" is done with the use of wait queues.
Having applied the delay value to a packet, the packet gets processed by the original netem functions.
Signed-off-by: Rainer Baumann <baumann@tik.ee.ethz.ch>
---
Patch for linux kernel 2.6.16.19: http://tcn.hypert.net/tcnKernel_procfs.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace
2006-09-22 6:15 Rainer Baumann
@ 2006-09-22 15:19 ` Hagen Paul Pfeifer
2006-09-22 17:20 ` Stephen Hemminger
1 sibling, 0 replies; 5+ messages in thread
From: Hagen Paul Pfeifer @ 2006-09-22 15:19 UTC (permalink / raw)
To: Rainer Baumann; +Cc: Stephen Hemminger, netdev, netem
* Rainer Baumann | 2006-09-22 08:15:13 [+0200]:
>Patch for linux kernel 2.6.16.19: http://tcn.hypert.net/tcnKernel_procfs.patch
Coding Style need at least some work ...
Whitespaces around operators and parentheses, useless parentheses, braces for
the else branch, mixes C99/C89 comments, indentation, ....
proc_read_stats() look unclean (bzero) and maybe some other stuff too - the
code at a whole look a little bit grubby.
HGN
--
43rd Law of Computing:
Anything that can go wr
fortune: Segmentation violation -- Core dumped
^ permalink raw reply [flat|nested] 5+ messages in thread* Re: [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace
2006-09-22 6:15 Rainer Baumann
2006-09-22 15:19 ` Hagen Paul Pfeifer
@ 2006-09-22 17:20 ` Stephen Hemminger
1 sibling, 0 replies; 5+ messages in thread
From: Stephen Hemminger @ 2006-09-22 17:20 UTC (permalink / raw)
To: Rainer Baumann; +Cc: netdev, netem
On Fri, 22 Sep 2006 08:15:13 +0200
Rainer Baumann <baumann@tik.ee.ethz.ch> wrote:
> Trace Control for Netem: Emulate network properties such as long range dependency and self-similarity of cross-traffic.
>
> kernel space:
> The delay, drop, duplication and corruption values are readout in user space and sent to kernel space via configfs. The userspace process will "hang on write" until the kernel needs new data.
>
> In order to have always packet action values ready to apply, there are two buffers that hold these values. Packet action values can be read from one buffer and the other buffer can be refilled with new values simultaneously. The synchronization of "need more delay values" and "return from write" is done with the use of wait queues.
>
> Having applied the delay value to a packet, the packet gets processed by the original netem functions.
>
> Signed-off-by: Rainer Baumann <baumann@tik.ee.ethz.ch>
>
> ---
>
> Patch for linux kernel 2.6.16.19: http://tcn.hypert.net/tcnKernel_procfs.patch
I like the concept of the trace based delay stuff, it is just that the implementation
needs more work.
Style:
* whitespace around operators, keywords etc
* use /* for comments not //
* indentation
scripts/Lindent may help
* accidental blank line changes introduced in patch as well
* You don't really change Makefile
Code:
* now netem depends on CONFIG_PROC_FS
* why not use a miscdevice (/dev/netem_trace?) instead of /proc
* still has signal flow control to process. This is an awkward way
to do flow control and I don't think it is safe.
* hard coding MAX_FLOWS leads to scaling problems. Not all users will
want to waste the memory, and what if there are more flows. Can't you
figure out a way to allocate and scale flow buffers.
--
Stephen Hemminger <shemminger@osdl.org>
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace
@ 2006-08-02 17:21 Rainer Baumann
0 siblings, 0 replies; 5+ messages in thread
From: Rainer Baumann @ 2006-08-02 17:21 UTC (permalink / raw)
To: Stephen Hemminger, netdev
Trace Control for Netem: Emulate network properties such as
long-dependency and self-similarity of cross-traffic.
The delay, drop, duplication and corruption values are readout in user
space and sent to kernel space via procfs.
The kernel determines the time when new values should be sent by the use
of SIGSTOP and SIGCONT signals.
In order to have always packet action values ready to apply, there are
two buffers that hold these values.
Packet action values can be read from one buffer and the other buffer
can be refilled with new values simultaneously.
If a buffer is empty it will be switched to the other buffer and a
SIGCONT signal is sent in order to receive new packet action values.
Having applied the delay value to a packet, the packet gets processed by
the original netem functions.
Signed-off-by: Rainer Baumann <baumann@tik.ee.ethz.ch>
---
Patch for linux kernel 2.6.16.19: http://tcn.hypert.net/tcnKernel.patch
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-09-22 17:20 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-08-22 14:32 [PATCH 2.6.16.19 2/2] LARTC: trace control for netem: kernelspace Rainer Baumann
-- strict thread matches above, loose matches on Subject: below --
2006-09-22 6:15 Rainer Baumann
2006-09-22 15:19 ` Hagen Paul Pfeifer
2006-09-22 17:20 ` Stephen Hemminger
2006-08-02 17:21 Rainer Baumann
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).