[clue] [tech] How to get explicit notification from a network device driver?

Michael J. Hammel mjhammel at graphics-muse.org
Mon Apr 23 18:36:47 MDT 2012


On Mon, 2012-04-23 at 14:19 -0600, Jim Ockers wrote:
> It seems like it would be more deterministic, and less resource
> intensive, to just have the network card device driver DO something
> (or cause something to be done) when the link state changes.

I designed something like this for a driver at work but we never got
around to completing the implementation so can't say how well it works.
The driver was a PCIe driver that just needed to notify user space when
incoming data had arrived.

You can use an ioctl in the driver to have a process register its desire
to be notified an then have the driver raise a signal (in the top half
of an interrupt routine) for any process id that is registered.

I read that there are probably better ways to do this, and for a network
driver that is moving lots of data its probably not too good an idea,
but I think it can be done.
-- 
Michael J. Hammel                               
mjhammel at graphics-muse.org / http://www.graphics-muse.org
------------------------------------------------------------------------------
The only good is knowledge, and the only evil is ignorance.
 -- Atributed to Herodotus



More information about the clue mailing list