X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_mbuf%2Frte_mbuf.h;fp=lib%2Flibrte_mbuf%2Frte_mbuf.h;h=9dd8e807e28600bd8132594be290882deb5043a7;hb=918ae9dc775e4fe9033474619260611d2b4fb662;hp=349f0512eac5ce2b53b7bfd20c9013e2c9639fb8;hpb=a22659550c3bc5b03408b35c6b73abb9098b3c62;p=dpdk.git diff --git a/lib/librte_mbuf/rte_mbuf.h b/lib/librte_mbuf/rte_mbuf.h index 349f0512ea..9dd8e807e2 100644 --- a/lib/librte_mbuf/rte_mbuf.h +++ b/lib/librte_mbuf/rte_mbuf.h @@ -184,6 +184,11 @@ extern "C" { */ #define PKT_RX_LRO (1ULL << 16) +/** + * Indicate that the timestamp field in the mbuf is valid. + */ +#define PKT_RX_TIMESTAMP (1ULL << 17) + /* add new RX flags here */ /* add new TX flags here */ @@ -481,6 +486,12 @@ struct rte_mbuf { uint16_t vlan_tci_outer; uint16_t buf_len; /**< Length of segment buffer. */ + + /** Valid if PKT_RX_TIMESTAMP is set. The unit and time reference + * are not normalized but are always the same for a given port. + */ + uint64_t timestamp; + /* second cache line - fields only used in slow path or on TX */ MARKER cacheline1 __rte_cache_min_aligned; @@ -1208,6 +1219,7 @@ static inline void rte_pktmbuf_attach(struct rte_mbuf *mi, struct rte_mbuf *m) mi->nb_segs = 1; mi->ol_flags = m->ol_flags | IND_ATTACHED_MBUF; mi->packet_type = m->packet_type; + mi->timestamp = m->timestamp; __rte_mbuf_sanity_check(mi, 1); __rte_mbuf_sanity_check(m, 0);