/* init some constant fields */
m->pool = mp;
m->nb_segs = 1;
- m->port = MBUF_INVALID_PORT;
+ m->port = RTE_MBUF_PORT_INVALID;
rte_mbuf_refcnt_set(m, 1);
m->next = NULL;
}
rte_mbuf_ext_refcnt_set(m->shinfo, 1);
m->ol_flags = EXT_ATTACHED_MBUF;
- if (m->next != NULL) {
+ if (m->next != NULL)
m->next = NULL;
+ if (m->nb_segs != 1)
m->nb_segs = 1;
- }
rte_mbuf_raw_free(m);
}
/* init some constant fields */
m->pool = mp;
m->nb_segs = 1;
- m->port = MBUF_INVALID_PORT;
+ m->port = RTE_MBUF_PORT_INVALID;
m->ol_flags = EXT_ATTACHED_MBUF;
rte_mbuf_refcnt_set(m, 1);
m->next = NULL;