us extending existing enum/define.
One solution can be using a fixed size array instead of ``.*MAX.*`` value.
-* mbuf: Some fields will be converted to dynamic API in DPDK 20.11
- in order to reserve more space for the dynamic fields, as explained in
- `this presentation <https://www.youtube.com/watch?v=Ttl6MlhmzWY>`_.
- As a consequence, the layout of the ``struct rte_mbuf`` will be re-arranged,
- avoiding impact on vectorized implementation of the driver datapaths,
- while evaluating performance gains of a better use of the first cache line.
-
* ethdev: The flow director API, including ``rte_eth_conf.fdir_conf`` field,
and the related structures (``rte_fdir_*`` and ``rte_eth_fdir_*``),
will be removed in DPDK 20.11.
char pad2[4];
uint32_t pkt_len; /**< Total pkt len: sum of all segment data_len. */
uint16_t data_len; /**< Amount of data in segment buffer. */
+ char pad3[14];
+ void *pool;
/* fields on second cache line */
__attribute__((__aligned__(RTE_CACHE_LINE_MIN_SIZE)))
- void *pool;
void *next; /**< Physical address of next mbuf in kernel. */
};
static inline void
rte_mbuf_dynfield_copy(struct rte_mbuf *mdst, const struct rte_mbuf *msrc)
{
- memcpy(&mdst->dynfield0, msrc->dynfield0, sizeof(mdst->dynfield0));
memcpy(&mdst->dynfield1, msrc->dynfield1, sizeof(mdst->dynfield1));
}
uint16_t buf_len; /**< Length of segment buffer. */
- uint64_t dynfield0[1]; /**< Reserved for dynamic fields. */
+ struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
/* second cache line - fields only used in slow path or on TX */
RTE_MARKER cacheline1 __rte_cache_min_aligned;
- struct rte_mempool *pool; /**< Pool from which mbuf was allocated. */
struct rte_mbuf *next; /**< Next segment of scattered packet. */
/* fields to support TX offloads */
/** Timesync flags for use with IEEE1588. */
uint16_t timesync;
- uint32_t dynfield1[7]; /**< Reserved for dynamic fields. */
+ uint32_t dynfield1[9]; /**< Reserved for dynamic fields. */
} __rte_cache_aligned;
/**
* rte_mbuf_dynfield_copy().
*/
memset(shm, 0, sizeof(*shm));
- mark_free(dynfield0);
mark_free(dynfield1);
/* init free_flags */