mbuf: remove seqn field
authorDavid Marchand <david.marchand@redhat.com>
Wed, 28 Oct 2020 12:20:13 +0000 (13:20 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Sat, 31 Oct 2020 21:14:44 +0000 (22:14 +0100)
As announced in the deprecation note, the field seqn is removed to give
more space to the dynamic fields.

This is how the mbuf layout looks like (pahole-style):

word  type                              name                byte  size
 0    void *                            buf_addr;         /*   0 +  8 */
 1    rte_iova_t                        buf_iova          /*   8 +  8 */
      /* --- RTE_MARKER64               rearm_data;                   */
 2    uint16_t                          data_off;         /*  16 +  2 */
      uint16_t                          refcnt;           /*  18 +  2 */
      uint16_t                          nb_segs;          /*  20 +  2 */
      uint16_t                          port;             /*  22 +  2 */
 3    uint64_t                          ol_flags;         /*  24 +  8 */
      /* --- RTE_MARKER                 rx_descriptor_fields1;        */
 4    uint32_t             union        packet_type;      /*  32 +  4 */
      uint32_t                          pkt_len;          /*  36 +  4 */
 5    uint16_t                          data_len;         /*  40 +  2 */
      uint16_t                          vlan_tci;         /*  42 +  2 */
 5.5  uint64_t             union        hash;             /*  44 +  8 */
 6.5  uint16_t                          vlan_tci_outer;   /*  52 +  2 */
      uint16_t                          buf_len;          /*  54 +  2 */
 7    uint64_t                          timestamp;        /*  56 +  8 */
      /* --- RTE_MARKER                 cacheline1;                   */
 8    struct rte_mempool *              pool;             /*  64 +  8 */
 9    struct rte_mbuf *                 next;             /*  72 +  8 */
10    uint64_t             union        tx_offload;       /*  80 +  8 */
11    struct rte_mbuf_ext_shared_info * shinfo;           /*  88 +  8 */
12    uint16_t                          priv_size;        /*  96 +  2 */
      uint16_t                          timesync;         /*  98 +  2 */
12.5  uint32_t                          dynfield1[7];     /* 100 + 28 */
16    /* --- END                                             128      */

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
doc/guides/rel_notes/deprecation.rst
doc/guides/rel_notes/release_20_11.rst
lib/librte_mbuf/rte_mbuf_core.h

index 0f6f1df..fe3fd39 100644 (file)
@@ -87,7 +87,6 @@ Deprecation Notices
   The following static fields will be moved as dynamic:
 
   - ``timestamp``
-  - ``seqn``
 
   As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged,
   avoiding impact on vectorized implementation of the driver datapaths,
index 70cefb6..88b9086 100644 (file)
@@ -445,6 +445,9 @@ API Changes
 * mbuf: Removed the unioned fields ``userdata`` and ``udata64``
   from the structure ``rte_mbuf``. It is replaced with dynamic fields.
 
+* mbuf: Removed the field ``seqn`` from the structure ``rte_mbuf``.
+  It is replaced with dynamic fields.
+
 * pci: Removed the ``rte_kernel_driver`` enum defined in rte_dev.h and
   replaced with a private enum in the PCI subsystem.
 
index a65eaaf..3fb5abd 100644 (file)
@@ -640,6 +640,11 @@ struct rte_mbuf {
                };
        };
 
+       /** Shared data for external buffer attached to mbuf. See
+        * rte_pktmbuf_attach_extbuf().
+        */
+       struct rte_mbuf_ext_shared_info *shinfo;
+
        /** Size of the application private data. In case of an indirect
         * mbuf, it stores the direct mbuf private data size.
         */
@@ -648,15 +653,7 @@ struct rte_mbuf {
        /** Timesync flags for use with IEEE1588. */
        uint16_t timesync;
 
-       /** Sequence number. See also rte_reorder_insert(). */
-       uint32_t seqn;
-
-       /** Shared data for external buffer attached to mbuf. See
-        * rte_pktmbuf_attach_extbuf().
-        */
-       struct rte_mbuf_ext_shared_info *shinfo;
-
-       uint64_t dynfield1[3]; /**< Reserved for dynamic fields. */
+       uint32_t dynfield1[7]; /**< Reserved for dynamic fields. */
 } __rte_cache_aligned;
 
 /**