On Wed, 16 Jun 2010 18:31:17 EDT erik quanstrom <quans...@quanstro.net>  wrote:
> On Wed Jun 16 18:17:45 EDT 2010, n...@lsub.org wrote:
> > On programs where I control the client and the server, I simulated
> > it by spawning a process that did sleep and then do the write.
> > 
> > That is, you could send many things at once (i.e., same bandwidth)
> > but you could pretend the thing was delayed.
> > One tricky point was to be sure that sends were still in order, but that
> > was a non-issue in my case.
> > 
> > Perhaps being able to trigger delays on ip for testing/measuring
> > with a ctl would be a lot better, in the line of what you've done.
> 
> the ethernet, or shim ethernet, device seems like a better place for this.

Agreed. 

[Thinking aloud...]
You'd need some plumbing in devether to demultiplex incoming
packets addressed to this device (assuming it has its own MAC
address).

Something like a tap device would allow you to simulate high
latency link, a level-2 bridge or whatever in usercode.

[BTW, is there a strong reason why devether.c is in 9/pc/ and
 not 9/port/?  vlan code can be factored out from various
 ether*.c to a similar portable file (if not devether.c)]

> ip is not the only protocol!  that's what loopback(3) does, but without
> the real network.  it would be good to plug loopback or similar into a real
> ethernet.  it's also worth looking at loopback's implementation strategy,

Or bridge(3).

> which allows for µs delays.  sleep is just too course-grained for my
> testing.
> 
> dialing up random reordering would seem to me to be a feature at
> this level.

A user level simulator will make it easy to add random drops,
reordering, filtering, NAT, etc.

Reply via email to