[v2,2/2] mbuf: minor cleanup
Checks
Commit Message
The mbuf header files had some commenting style errors that affected the
API documentation.
Also, the RTE_ prefix was missing on a macro and a definition.
Note: This patch does not touch the offload and attachment flags that are
also missing the RTE_ prefix.
Changes only affecting documentation:
* Removed the MBUF_INVALID_PORT definition from rte_mbuf.h; it is
already defined in rte_mbuf_core.h.
This removal also reestablished the description of the
rte_pktmbuf_reset() function.
* Corrected the comment related to RTE_MBUF_MAX_NB_SEGS.
* Corrected the comment related to PKT_TX_QINQ_PKT.
Changes regarding missing RTE_ prefix:
* Converted the MBUF_RAW_ALLOC_CHECK() macro to an
__rte_mbuf_raw_sanity_check() inline function.
Added backwards compatible macro with the original name.
* Renamed the MBUF_INVALID_PORT definition to RTE_MBUF_PORT_INVALID.
Added backwards compatible definition with the original name.
v2:
* Use RTE_MBUF_PORT_INVALID intead of MBUF_INVALID_PORT in rte_mbuf.c.
Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
---
lib/librte_mbuf/rte_mbuf.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
@@ -104,7 +104,7 @@ rte_pktmbuf_init(struct rte_mempool *mp,
/* 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;
}
@@ -207,7 +207,7 @@ __rte_pktmbuf_init_extmem(struct rte_mempool *mp,
/* 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;