Project Home
Project Home
Wiki
Wiki
Discussion Forums
Discussions
Project Information
Project Info
BroadcastCommunity.qnx.com will be offline from May 31 6:00pm until June 2 12:00AM for upcoming system upgrades. For more information please go to https://community.qnx.com/sf/discussion/do/listPosts/projects.bazaar/discussion.bazaar.topc28418
Forum Topic - Need to understand mbuf w/respect to io-pkt drivers better: Page 1 of 2 (2 Items)
   
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.