01/18/2012 9:02 AM
I am implementing a net-driver for testing purpose. This is based on sam.c (sample network driver).
But instead of using interrupts for looping back the packets, they are looped back by another process in my setup.
Tx part is done, but in Rx I have some difficulties -
1. Can timer interrupt be replaced by Signal? I mean whenever io-pkt net-driver would receive SIG_USR1, Rx routine
is triggered. Is this valid approach?
2. How do I allocate/get m_buf from io-pkt rx thread pool? Sample net-driver uses -
m = m_getcl_wtp(M_DONTWAIT, MT_DATA, M_PKTHDR, wtp);
But in this case I don't have wtp.
How this situation could be resolved?
Any help is much appreciated. Thanks!