src/dpdk/lib/librte_mbuf/rte_mbuf.h
static inline void rte_pktmbuf_reset(struct rte_mbuf *m)
{
	m->next = NULL;
	m->pkt_len = 0;
	m->tx_offload = 0;
	m->vlan_tci = 0;
	m->vlan_tci_outer = 0;
	m->nb_segs = 1;
	m->port = RTE_MBUF_PORT_INVALID;

	m->ol_flags &= EXT_ATTACHED_MBUF;
	m->packet_type = 0;
#ifdef TREX_PATCH
    m->m_core_locality = RTE_MBUF_CORE_LOCALITY_MULTI;
#endif
	rte_pktmbuf_reset_headroom(m);

	m->data_len = 0;
	__rte_mbuf_sanity_check(m, 1);
}
/**
 * Reset the fields of a packet mbuf to their default values.
 *
 * The given mbuf must have only one segment.
 *
 * @param m
 *   The packet mbuf to be reset.
 */
Reset the fields of a packet mbuf to their default values.
The given mbuf must have only one segment.

@param m
The packet mbuf to be reset.
Reset the fields of a packet mbuf to their default values . The given mbuf must have only one segment . @param m The packet mbuf to be reset .
static inline void rte_pktmbuf_reset(struct rte_mbuf *m)
{
	m->next = NULL;
	m->pkt_len = 0;
	m->tx_offload = 0;
	m->vlan_tci = 0;
	m->vlan_tci_outer = 0;
	m->nb_segs = 1;
	m->port = RTE_MBUF_PORT_INVALID;
	m->ol_flags &= EXT_ATTACHED_MBUF;
	m->packet_type = 0;
#ifdef TREX_PATCH
    m->m_core_locality = RTE_MBUF_CORE_LOCALITY_MULTI;
#endif
	rte_pktmbuf_reset_headroom(m);
	m->data_len = 0;
	__rte_mbuf_sanity_check(m, 1);
}
static inline void rte_pktmbuf_reset ( struct rte_mbuf * m ) { m -> next = NULL ; m -> pkt_len = 0 ; m -> tx_offload = 0 ; m -> vlan_tci = 0 ; m -> vlan_tci_outer = 0 ; m -> nb_segs = 1 ; m -> port = RTE_MBUF_PORT_INVALID ; m -> ol_flags &= EXT_ATTACHED_MBUF ; m -> packet_type = 0 ; #ifdef TREX_PATCH m -> m_core_locality = RTE_MBUF_CORE_LOCALITY_MULTI ; #endif rte_pktmbuf_reset_headroom ( m ) ; m -> data_len = 0 ; __rte_mbuf_sanity_check ( m , 1 ) ; }
Reset the fields of a packet mbuf to their default values.
Reset the fields of a packet mbuf to their default values .