Mitchell Schoenbrun
|
Need to understand mbuf w/respect to io-pkt drivers better
|
Mitchell Schoenbrun
01/17/2014 1:44 AM
post108005
|
Need to understand mbuf w/respect to io-pkt drivers better
I've been having a very serious problem doing an optimization of a driver and it leads me to believe that I really don't
understand mbuf's very well, ate least with respect to how io-pkt is using them.
The driver works if I copy data into on transmit and out of on receipt using the m_copydata() and m_copyback() routines.
I've been trying to switch over to having the hardware move the data directly from the mbuf data buffer (m->m_data).
This always fails.
I was under the (possibly misguided impression) that io-pkt was providing a contiguous buffer the size of MCLBYTES each
time I got an mbuf to transmit.
In particular, I find in the source for the e1000 driver transmit.c code a routine called i82544_defrag() which seems to
be trying to defragment a packet. If the data is delivered in a contiguous buffer, why would it ever need to be
defragmented? If the packet can be fragmented, then my problem is solved, because I will have no option other than
copying it.
Help please.
|
|
|