mbuf: fix VLAN flags documentation
[dpdk.git] / lib / librte_mbuf / rte_mbuf.h
index 2fd4f5e..719d04d 100644 (file)
@@ -244,7 +244,9 @@ extern "C" {
 /**
  * Second VLAN insertion (QinQ) flag.
  */
-#define PKT_TX_QINQ_PKT    (1ULL << 49)   /**< TX packet with double VLAN inserted. */
+#define PKT_TX_QINQ        (1ULL << 49)   /**< TX packet with double VLAN inserted. */
+/* this old name is deprecated */
+#define PKT_TX_QINQ_PKT    PKT_TX_QINQ
 
 /**
  * TCP segmentation offload. To enable this offload feature for a
@@ -305,7 +307,12 @@ extern "C" {
  */
 #define PKT_TX_IPV6          (1ULL << 56)
 
-#define PKT_TX_VLAN_PKT      (1ULL << 57) /**< TX packet is a 802.1q VLAN packet. */
+/**
+ * TX packet is a 802.1q VLAN packet.
+ */
+#define PKT_TX_VLAN          (1ULL << 57)
+/* this old name is deprecated */
+#define PKT_TX_VLAN_PKT      PKT_TX_VLAN
 
 /**
  * Offload the IP checksum of an external header in the hardware. The
@@ -510,7 +517,7 @@ struct rte_mbuf {
 
        uint32_t pkt_len;         /**< Total pkt len: sum of all segments. */
        uint16_t data_len;        /**< Amount of data in segment buffer. */
-       /** VLAN TCI (CPU order), valid if PKT_RX_VLAN_STRIPPED is set. */
+       /** VLAN TCI (CPU order), valid if PKT_RX_VLAN is set. */
        uint16_t vlan_tci;
 
        union {
@@ -536,7 +543,7 @@ struct rte_mbuf {
                uint32_t usr;     /**< User defined tags. See rte_distributor_process() */
        } hash;                   /**< hash information */
 
-       /** Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ_STRIPPED is set. */
+       /** Outer VLAN TCI (CPU order), valid if PKT_RX_QINQ is set. */
        uint16_t vlan_tci_outer;
 
        uint16_t buf_len;         /**< Length of segment buffer. */
@@ -1432,13 +1439,14 @@ rte_pktmbuf_free_seg(struct rte_mbuf *m)
  * segment is added back into its original mempool.
  *
  * @param m
- *   The packet mbuf to be freed.
+ *   The packet mbuf to be freed. If NULL, the function does nothing.
  */
 static inline void rte_pktmbuf_free(struct rte_mbuf *m)
 {
        struct rte_mbuf *m_next;
 
-       __rte_mbuf_sanity_check(m, 1);
+       if (m != NULL)
+               __rte_mbuf_sanity_check(m, 1);
 
        while (m != NULL) {
                m_next = m->next;