Joost Mulders wrote:
No, you need to guard against race conditions. That implies locking.
This area is really tricky to get right, and almost every driver that
has ever tried to do this has gotten it WRONG.
The extra overhead this implies is painful. I'd *really* recommend
you consider just using bcopy.
What driver does it right then? A right example would be useful.
It looks like there are quite a few network drivers in ON that use
desballoc(). One assumes that, since they are integrated, they get it
right! nxge is the example I picked to look at.
FWIW I'm trying to integrate a 10G ethernet driver at the moment. I use
a derivation of desballoc() called xesballoc() (that I created myself).
You can see my code at
http://cr.opensolaris.org/~pdurrant/webrev/usr/src/uts/common/io/sfc/sfxge/sfxge_rx.c.html
Paul
--
===================================
Paul Durrant
http://www.linkedin.com/in/pdurrant
===================================
_______________________________________________
driver-discuss mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/driver-discuss