I've been wondering about the possibility to decouple the mbuf header (and the private data) from the payload. If I'm reading the code correctly, right now the payload is placed (together with the header and the private data) in one memory object dequeued from the mempool.
I can use a specific mempool for pktbuf_pool by using rte_pktmbuf_pool_create_by_ops(). However, there is no way to have the header and buffer go to separate mempools, is that correct? As I see that struct rte_mbuf contains a pointer to the segment buffer (both VA and PA) and rte_pktmbuf_init() initializes those pointers. So one could expect that the rest of DPDK would not depend on the fact that the segment buffer is at some offset from the mbuf header, right? I was also looking at the rte_pktmbuf_attach_extbuf() patches from April. It seems that I could spin up my own (possibly non-RTE) memory pool and then rte_mempool_obj_iter() the pktbuf_pool to attach external buffers to all the mbufs in the original pool. The obvious downside here would be that some memory would be wasted in the mbuf pool (because the segment buffer would be allocated but unused) but in principle that should also work, right? Can you think of any other obvious downsides to that approach? Regards, Wojtek