Non-interrupt packet sending and receiving
Sean Fagan
sef at ixsystems.com
Tue Mar 25 18:36:07 UTC 2014
This isn't the same as the polled driver; this is sending and receiving a single packet at a time.
I've gotten (at least to a somewhat workable degree) Apple's KDP ported to FreeBSD. I've only changed the dev/e1000/if_lem.c driver for now (that's the one VMWare shows up as :)), but since I'm not particularly comfortable with device drivers, let alone ethernet drivers, I needed some feedback.
Diffs are attached below. Feedback would be appreciated.
(To answer some of the questions I've already gotten: no, i can't use the DEVICE_POLLING routines, because that still goes through the entire stack. It's not here, because I am not yet happy with it, but the code that uses this runs in the kernel debugger, and it needs to be able to send and receive a single packet at a time -- and it can't let it be shuffled off through other layers, for reasons that I hope are fairly clear. Now, one change I would like to make is the mbuf allocation that it uses; ideally, honestly, it should have its own mbufs -- the protocol never sends more than 1538 bytes in a UDP packet -- but I would probably try working on another ethernet driver first, modeling it after this.)
(The bulk of the diffs is moving some code out of lem_rxeof into a function that gets a single packet.)
Thanks,
Sean.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: if_lem-diffs.txt
URL: <http://lists.freebsd.org/pipermail/freebsd-net/attachments/20140325/44c070e9/attachment.txt>
-------------- next part --------------
More information about the freebsd-net
mailing list