[RFC 08/13] mbuf: add fields for mirroring

Stephen Hemminger stephen at networkplumber.org
Sat Apr 12 01:44:45 CEST 2025


Add field to union used for sched/event etc, for use when
an mbuf is mirrored.

Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
---
 lib/mbuf/rte_mbuf_core.h | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h
index a0df265b5d..1806dddd67 100644
--- a/lib/mbuf/rte_mbuf_core.h
+++ b/lib/mbuf/rte_mbuf_core.h
@@ -589,6 +589,14 @@ struct __rte_cache_aligned rte_mbuf {
 						 * @see rte_event_eth_tx_adapter_txq_set()
 						 */
 					} txadapter; /**< Eventdev ethdev Tx adapter */
+					struct rte_mbuf_mirror {
+						uint32_t orig_len;
+						uint16_t queue_id;
+						uint16_t direction;
+						/**< Port mirroring uses this to store origin
+						 * @see rte_eth_mirror()
+						 */
+					} mirror;
 					uint32_t usr;
 					/**< User defined tags. See rte_distributor_process() */
 				} hash;                   /**< hash information */
-- 
2.47.2



More information about the dev mailing list