- if (dpaa2_enable_ts == PMD_DPAA2_ENABLE_TS) {
- annotation = (struct dpaa2_annot_hdr *)
- ((size_t)DPAA2_IOVA_TO_VADDR(
- DPAA2_GET_FD_ADDR(fd)) + DPAA2_FD_PTA_SIZE);
- m->timestamp = annotation->word2;
- m->ol_flags |= PKT_RX_TIMESTAMP;
- DPAA2_PMD_DP_DEBUG("pkt timestamp:0x%" PRIx64 "", m->timestamp);
+ if (dpaa2_enable_ts[m->port]) {
+ *dpaa2_timestamp_dynfield(m) = annotation->word2;
+ m->ol_flags |= dpaa2_timestamp_rx_dynflag;
+ DPAA2_PMD_DP_DEBUG("pkt timestamp:0x%" PRIx64 "",
+ *dpaa2_timestamp_dynfield(m));