+ MKDUMPSTR(print_buf, buf_size, *cur_len, "%s%s", what, buf);
+}
+
+static inline bool
+is_timestamp_enabled(const struct rte_mbuf *mbuf)
+{
+ static uint64_t timestamp_rx_dynflag;
+ int timestamp_rx_dynflag_offset;
+
+ if (timestamp_rx_dynflag == 0) {
+ timestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup(
+ RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL);
+ if (timestamp_rx_dynflag_offset < 0)
+ return false;
+ timestamp_rx_dynflag = RTE_BIT64(timestamp_rx_dynflag_offset);
+ }
+
+ return (mbuf->ol_flags & timestamp_rx_dynflag) != 0;
+}
+
+static inline rte_mbuf_timestamp_t
+get_timestamp(const struct rte_mbuf *mbuf)
+{
+ static int timestamp_dynfield_offset = -1;
+
+ if (timestamp_dynfield_offset < 0) {
+ timestamp_dynfield_offset = rte_mbuf_dynfield_lookup(
+ RTE_MBUF_DYNFIELD_TIMESTAMP_NAME, NULL);
+ if (timestamp_dynfield_offset < 0)
+ return 0;
+ }
+
+ return *RTE_MBUF_DYNFIELD(mbuf,
+ timestamp_dynfield_offset, rte_mbuf_timestamp_t *);