numam-dpdk/lib/librte_mbuf
Thomas Monjalon 4630290af4 mbuf: move pool pointer in first half
According to the Technical Board decision
(http://mails.dpdk.org/archives/dev/2020-November/191859.html),
the mempool pointer in the mbuf struct is moved
from the second to the first half.
It may increase performance in some cases
on systems having 64-byte cache line, i.e. mbuf split in two cache lines.

Due to this change, all fields after "pool" are moved up.
Hopefully no vector data path is impacted.

Moving this field gives more space to dynfield1
while dropping the temporary dynfield0.

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    struct rte_mempool *              pool;             /*  56 +  8 */
      /* --- RTE_MARKER                 cacheline1;                   */
 8    struct rte_mbuf *                 next;             /*  64 +  8 */
 9    uint64_t             union        tx_offload;       /*  72 +  8 */
10    struct rte_mbuf_ext_shared_info * shinfo;           /*  80 +  8 */
11    uint16_t                          priv_size;        /*  88 +  2 */
      uint16_t                          timesync;         /*  90 +  2 */
11.5  uint32_t                          dynfield1[9];     /*  92 + 36 */
16    /* --- END                                             128      */

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
2020-11-12 16:39:10 +01:00
..
meson.build build: disable experimental API check internally 2020-04-14 16:22:34 +02:00
rte_mbuf_core.h mbuf: move pool pointer in first half 2020-11-12 16:39:10 +01:00
rte_mbuf_dyn.c mbuf: move pool pointer in first half 2020-11-12 16:39:10 +01:00
rte_mbuf_dyn.h mbuf: add Tx timestamp registration helper 2020-11-03 16:21:15 +01:00
rte_mbuf_pool_ops.c mbuf: prevent setting mempool ops name empty 2020-04-25 22:56:10 +02:00
rte_mbuf_pool_ops.h mbuf: remove experimental tag from pool ops 2018-07-26 23:37:08 +02:00
rte_mbuf_ptype.c mbuf: add IGMP packet type 2018-10-25 15:51:16 +02:00
rte_mbuf_ptype.h doc: fix spelling reported by aspell in comments 2019-05-03 00:38:14 +02:00
rte_mbuf.c mbuf: clean up comments and prefix 2020-11-05 17:53:15 +01:00
rte_mbuf.h mbuf: move pool pointer in first half 2020-11-12 16:39:10 +01:00
version.map mbuf: add Tx timestamp registration helper 2020-11-03 16:21:15 +01:00