| 35 | } |
| 36 | |
| 37 | static inline bool |
| 38 | is_timestamp_enabled(const struct rte_mbuf *mbuf) |
| 39 | { |
| 40 | static uint64_t timestamp_rx_dynflag; |
| 41 | int timestamp_rx_dynflag_offset; |
| 42 | |
| 43 | if (timestamp_rx_dynflag == 0) { |
| 44 | timestamp_rx_dynflag_offset = rte_mbuf_dynflag_lookup( |
| 45 | RTE_MBUF_DYNFLAG_RX_TIMESTAMP_NAME, NULL); |
| 46 | if (timestamp_rx_dynflag_offset < 0) |
| 47 | return false; |
| 48 | timestamp_rx_dynflag = RTE_BIT64(timestamp_rx_dynflag_offset); |
| 49 | } |
| 50 | |
| 51 | return (mbuf->ol_flags & timestamp_rx_dynflag) != 0; |
| 52 | } |
| 53 | |
| 54 | static inline rte_mbuf_timestamp_t |
| 55 | get_timestamp(const struct rte_mbuf *mbuf) |
no test coverage detected