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

Stephen Hemminger stephen at networkplumber.org
Tue May 27 02:17:01 CEST 2014


On Fri,  9 May 2014 16:50:30 +0200
Olivier Matz <olivier.matz at 6wind.com> wrote:

> The initial role of rte_ctrlmbuf is to carry generic messages (data
> pointer + data length) but it's not used by the DPDK or it applications.
> Keeping it implies:
>   - loosing 1 byte in the rte_mbuf structure
>   - having some dead code rte_mbuf.[ch]
> 
> This patch removes this feature. Thanks to it, it is now possible to
> simplify the rte_mbuf structure by merging the rte_pktmbuf structure
> in it. This is done in next commit.
> 
> Signed-off-by: Olivier Matz <olivier.matz at 6wind.com>

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.



More information about the dev mailing list