> I realize that determinism is impossible in this framework, but that's
> a hit I am willing to take for my work. I wanted to know if there were
> any code examples on using ethertap.cc just like etherlink.cc
> (twosys-tsunami-simple-atomic.py)

Hi Anirudh,

I'm the one that wrote the tap interface (something like 8 or 10 years
ago) and I'm pretty certain that it hasn't been used in about that
long.  I'm guessing that it doesn't use the right raw interface
mechanism for example.  That said, getting tap itself to work should
be pretty easy.  I have a few comments/concerns.

1) While you may not be concerned about determinism, you need to make
sure that your clocks don't get wildly off.  If they do, TCP timeouts
start getting triggered and bad things happen.  It may be surprising,
but one thing that happens when doing networking stuff is that the
simulator can go too *fast*.  This is because we simply skip ahead
when the system is idle and the other system may not skip ahead.  Gabe
Black (I'm pretty sure it was him) wrote an event a while back that
would ensure that the simulator never got too far ahead of wall clock
time.  You may need to use this.

2) I personally wouldn't use the tap interface.  I'd probably start
with it, but I'd convert it to use a named pipe or something like that
so I could annotate the packets with timing information.  If you use
the real tap interface and involve the linux kernel, I'd just worry
that it would introduce timing issues and complexity that you just
don't want to deal with.

3) Steve Reinhardt did a lot of work around making the simulator
multithreaded.  I don't think that work ever made it into the tree,
but there were patches on reviewboard.  We should probably revive that
and make sure that you take advantage of whatever he has. You can use
this stuff to help with the barriers.

Good luck.  This is something I always wanted to do, but never managed
to make happen.  I hope you make it work and contribute any patches
back to the tree.

Thanks,

  Nate
_______________________________________________
gem5-dev mailing list
[email protected]
http://m5sim.org/mailman/listinfo/gem5-dev

Reply via email to