typedef uint64_t MARKER64[0]; /**< marker that allows us to overwrite 8 bytes
* with a single assignment */
+/** Opaque rte_mbuf_offload structure declarations */
+struct rte_mbuf_offload;
+
/**
* The generic rte_mbuf, containing a packet mbuf.
*/
/**< First 4 flexible bytes or FD ID, dependent on
PKT_RX_FDIR_* flag in ol_flags. */
} fdir; /**< Filter identifier if FDIR enabled */
- uint32_t sched; /**< Hierarchical scheduler */
+ struct {
+ uint32_t lo;
+ uint32_t hi;
+ } sched; /**< Hierarchical scheduler */
uint32_t usr; /**< User defined tags. See rte_distributor_process() */
} hash; /**< hash information */
uint16_t vlan_tci_outer; /**< Outer VLAN Tag Control Identifier (CPU order) */
/* second cache line - fields only used in slow path or on TX */
- MARKER cacheline1 __rte_cache_aligned;
+ MARKER cacheline1 __rte_cache_min_aligned;
union {
void *userdata; /**< Can be used for external metadata */
/** Timesync flags for use with IEEE1588. */
uint16_t timesync;
+
+ /* Chain of off-load operations to perform on mbuf */
+ struct rte_mbuf_offload *offload_ops;
} __rte_cache_aligned;
static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp);
*/
#define rte_pktmbuf_mtod(m, t) rte_pktmbuf_mtod_offset(m, t, 0)
+/**
+ * A macro that returns the physical address that points to an offset of the
+ * start of the data in the mbuf
+ *
+ * @param m
+ * The packet mbuf.
+ * @param o
+ * The offset into the data to calculate address from.
+ */
+#define rte_pktmbuf_mtophys_offset(m, o) \
+ (phys_addr_t)((m)->buf_physaddr + (m)->data_off + (o))
+
+/**
+ * A macro that returns the physical address that points to the start of the
+ * data in the mbuf
+ *
+ * @param m
+ * The packet mbuf.
+ */
+#define rte_pktmbuf_mtophys(m) rte_pktmbuf_mtophys_offset(m, 0)
+
/**
* A macro that returns the length of the packet.
*