Build mbuf and lists of mbufs in a way compliant with the checks performed
by the function __rte_mbuf_sanity_check() when CONFIG_RTE_LIBRTE_MBUF_DEBUG=y
Signed-off-by: Ivan Boule <ivan.boule@6wind.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
mb_ctor_arg = (struct mbuf_ctor_arg *) opaque_arg;
mb = (struct rte_mbuf *) raw_mbuf;
+ mb->type = RTE_MBUF_PKT;
mb->pool = mp;
mb->buf_addr = (void *) ((char *)mb + mb_ctor_arg->seg_buf_offset);
mb->buf_physaddr = (uint64_t) (rte_mempool_virt2phy(mp, mb) +
for (i = 1; i < tx_pkt_nb_segs; i++) {
pkt_seg->pkt.next = tx_mbuf_alloc(mbp);
if (pkt_seg->pkt.next == NULL) {
+ pkt->pkt.nb_segs = i;
rte_pktmbuf_free(pkt);
goto nomore_mbuf;
}