>> Which makes me think, that we probably shouldn't overwrite buf_len by >> rxq->mbuf_initializer. >> > I believe that it is perfectly safe to do so. All buffers from a mempool are > meant > to be the same size, therefore reading the length of one buffer should tell > you > what size all buffers are. If we do hit a scenario where we do need to support > variable size buffers from a single mempool, we can do that via the older > unoptimized > code paths, I think, since it's a definite edge case. >
I agree, and there is a place to store some values unique for all mbufs in a pool: struct rte_pktmbuf_pool_private { uint16_t mbuf_data_room_size; /**< Size of data space in each mbuf.*/ }; We could add a new field mbuf_buf_len here, it looks definitely better than new callbacks in rte_mempool. What do you think?