[dpdk-dev] [PATCH v2 02/14] mbuf: add Rx timestamp dynamic flag

Thomas Monjalon thomas at monjalon.net
Sun Nov 1 19:06:14 CET 2020


There is already a dynamic field for timestamp,
used only for Tx scheduling, thanks to the dedicated flag.
The same field can be used for Rx timestamp filled by drivers.
The only missing part to get rid of the static timestamp field
was to declare a new dynamic flag for Rx usage.

After migrating all Rx timestamp usages, it will be possible
to remove the deprecated timestamp field.

Signed-off-by: Thomas Monjalon <thomas at monjalon.net>
Acked-by: Andrew Rybchenko <andrew.rybchenko at oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde at broadcom.com>
---
 lib/librte_mbuf/rte_mbuf_dyn.h | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lib/librte_mbuf/rte_mbuf_dyn.h b/lib/librte_mbuf/rte_mbuf_dyn.h
index 0ebac88b83..5fb85c0610 100644
--- a/lib/librte_mbuf/rte_mbuf_dyn.h
+++ b/lib/librte_mbuf/rte_mbuf_dyn.h
@@ -258,14 +258,14 @@ void rte_mbuf_dyn_dump(FILE *out);
  * timestamp. The dynamic Tx timestamp flag tells whether the field contains
  * actual timestamp value for the packets being sent, this value can be
  * used by PMD to schedule packet sending.
- *
- * After PKT_RX_TIMESTAMP flag and fixed timestamp field deprecation
- * and obsoleting, the dedicated Rx timestamp flag is supposed to be
- * introduced and the shared dynamic timestamp field will be used
- * to handle the timestamps on receiving datapath as well.
  */
 #define RTE_MBUF_DYNFIELD_TIMESTAMP_NAME "rte_dynfield_timestamp"
 
+/**
+ * Indicate that the timestamp field in the mbuf was filled by the driver.
+ */
+#define RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME "rte_dynflag_rx_timestamp"
+
 /**
  * When PMD sees the RTE_MBUF_DYNFLAG_TX_TIMESTAMP_NAME flag set on the
  * packet being sent it tries to synchronize the time of packet appearing
-- 
2.28.0



More information about the dev mailing list