common/sfc_efx/base: add NIC magic check on BAR lookup
[dpdk.git] / lib / librte_mbuf / rte_mbuf_core.h
index b9a59c8..8c2c206 100644 (file)
@@ -12,6 +12,8 @@
  * packet offload flags and some related macros.
  * For majority of DPDK entities, it is not recommended to include
  * this file directly, use include <rte_mbuf.h> instead.
+ *
+ * New fields and flags should fit in the "dynamic space".
  */
 
 #include <stdint.h>
@@ -474,11 +476,7 @@ struct rte_mbuf {
         * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes
         * working on vector drivers easier.
         */
-       RTE_STD_C11
-       union {
-               rte_iova_t buf_iova;
-               rte_iova_t buf_physaddr; /**< deprecated */
-       } __rte_aligned(sizeof(rte_iova_t));
+       rte_iova_t buf_iova __rte_aligned(sizeof(rte_iova_t));
 
        /* next 8 bytes are initialised on RX descriptor rearm */
        RTE_MARKER64 rearm_data;
@@ -493,12 +491,7 @@ struct rte_mbuf {
         * or non-atomic) is controlled by the CONFIG_RTE_MBUF_REFCNT_ATOMIC
         * config option.
         */
-       RTE_STD_C11
-       union {
-               rte_atomic16_t refcnt_atomic; /**< Atomically accessed refcnt */
-               /** Non-atomically accessed refcnt */
-               uint16_t refcnt;
-       };
+       uint16_t refcnt;
        uint16_t nb_segs;         /**< Number of segments. */
 
        /** Input port (16 bits to support more than 256 virtual ports).
@@ -521,11 +514,12 @@ struct rte_mbuf {
        RTE_STD_C11
        union {
                uint32_t packet_type; /**< L2/L3/L4 and tunnel information. */
+               __extension__
                struct {
-                       uint32_t l2_type:4; /**< (Outer) L2 type. */
-                       uint32_t l3_type:4; /**< (Outer) L3 type. */
-                       uint32_t l4_type:4; /**< (Outer) L4 type. */
-                       uint32_t tun_type:4; /**< Tunnel type. */
+                       uint8_t l2_type:4;   /**< (Outer) L2 type. */
+                       uint8_t l3_type:4;   /**< (Outer) L3 type. */
+                       uint8_t l4_type:4;   /**< (Outer) L4 type. */
+                       uint8_t tun_type:4;  /**< Tunnel type. */
                        RTE_STD_C11
                        union {
                                uint8_t inner_esp_next_proto;
@@ -541,7 +535,7 @@ struct rte_mbuf {
                                        /**< Inner L3 type. */
                                };
                        };
-                       uint32_t inner_l4_type:4; /**< Inner L4 type. */
+                       uint8_t inner_l4_type:4; /**< Inner L4 type. */
                };
        };
 
@@ -676,7 +670,7 @@ typedef void (*rte_mbuf_extbuf_free_callback_t)(void *addr, void *opaque);
 struct rte_mbuf_ext_shared_info {
        rte_mbuf_extbuf_free_callback_t free_cb; /**< Free callback function */
        void *fcb_opaque;                        /**< Free callback argument */
-       rte_atomic16_t refcnt_atomic;        /**< Atomically accessed refcnt */
+       uint16_t refcnt;
 };
 
 /**< Maximum number of nb_segs allowed. */