mbuf: fix reset on mbuf free
[dpdk.git] / lib / librte_mbuf / rte_mbuf_core.h
index 567551d..78a1fcc 100644 (file)
@@ -495,7 +495,12 @@ struct rte_mbuf {
         * or non-atomic) is controlled by the RTE_MBUF_REFCNT_ATOMIC flag.
         */
        uint16_t refcnt;
-       uint16_t nb_segs;         /**< Number of segments. */
+
+       /**
+        * Number of segments. Only valid for the first segment of an mbuf
+        * chain.
+        */
+       uint16_t nb_segs;
 
        /** Input port (16 bits to support more than 256 virtual ports).
         * The event eth Tx adapter uses this field to specify the output port.
@@ -591,7 +596,11 @@ struct rte_mbuf {
        /* second cache line - fields only used in slow path or on TX */
        RTE_MARKER cacheline1 __rte_cache_min_aligned;
 
-       struct rte_mbuf *next;    /**< Next segment of scattered packet. */
+       /**
+        * Next segment of scattered packet. Must be NULL in the last segment or
+        * in case of non-segmented packet.
+        */
+       struct rte_mbuf *next;
 
        /* fields to support TX offloads */
        RTE_STD_C11