Re: ethercons updated for -CURRENT

From: Andrew Gallatin <gallatin_at_cs.duke.edu>
Date: Fri, 9 Jul 2004 10:48:18 -0400 (EDT)
Robert Watson writes:
 > In order to support really low level I/O, you basically need a polled
 > network API that doesn't really care where it's called from -- the
 > physical console and sio both fall into this category, but the current
 > ethernet stack pieces don't as well.  It's not impossible to imagine
 > writing one, but the tricks that are pulled in the 4.x gdb-over-ethernet
 > kernel debugging won't work -- they call into the mbuf allocator and
 > assume it's "safe" -- in 4.x, it was risky, in 5.x you would get a panic
 > for trying to acquire locks in the debugger.

For what its worth, Darwin has this for their KDP ethernet debugging.
To receive something, the debugger provides a buffer and specifies a
timeout.  The driver keeps the same memory mapped for DMA, and just
copies into the provided void *buffer.  There is also a polled
transmit routine, where the driver does not return until the outgoing
packet has been DMA'ed.  In both cases, the driver is not allowed to
allocate memory, or do anything which can block.

One thing that's always concerned me is how do they ensure the driver
is not in the middle of a "normal" transmit or recv when the debugger
is entered..

Drew
Received on Fri Jul 09 2004 - 12:48:25 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:38:01 UTC