[dpdk-dev] [PATCH RFC 03/11] mbuf: remove rte_ctrlmbuf

Ananyev, Konstantin konstantin.ananyev at intel.com
Wed May 28 11:45:15 CEST 2014


Hi,

>The only win from this is to save the byte for the type field.
>Yes bits here are precious.

>Does external application mix control and data mbuf's in the same ring?
>The stuff in the tree only uses type field for debug validation/sanity
>checks.

>Since it is only one bit, maybe you can find one bit to store that. 
>Since buffer and pool addresses are going to be at least 32 bit aligned
>maybe you can use the old GC trick of using the LSB as flag.

Or, as an alternative we can move mbuf type up into the mempool.
In most cases user has to deal only with one particular type of mbufs and he already knows what mbuf type it would be.
For the rare cases when code need to deal with mix of mbuf types,
it is probably ok to read mbuf type from the corresponding mempool. 
Of course, it would mean  that all elements in the mempool should have the same type,
but I don't think right now people using mempools with mix of pktmbuf/ctrlmbuf anyway.   

Konstantin 


More information about the dev mailing list