Skip to content

Commit

Permalink
ON-15255: use new unified ef_vi timestamping API
Browse files Browse the repository at this point in the history
  • Loading branch information
jfeather-amd committed Jul 2, 2024
1 parent ace0b69 commit da134ec
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions src/lib/zf/private/reactor.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,13 +154,12 @@ zf_reactor_handle_rx_ref_discard(struct zf_stack* st, int nic, ef_vi *vi,
ZF_HOT static void
efct_pkt_prefix(ef_vi* vi, char* pkt, uint32_t pkt_id)
{
struct timespec ts;
unsigned flags;
int rc = efct_vi_rxpkt_get_timestamp(vi, pkt_id, &ts, &flags);
ef_precisetime ts;
int rc = ef_vi_receive_get_precise_timestamp(vi, pkt, &ts);
*(uint32_t*)(pkt + RX_PREFIX_TSYNC_MAJOR_OFST) = ts.tv_sec;
*(uint32_t*)(pkt + RX_PREFIX_TSYNC_MINOR_OFST) = ts.tv_nsec;
*(uint16_t*)(pkt + RX_PREFIX_NICNO_OFST) = RX_PREFIX_NICNO_EFCT;
*(uint16_t*)(pkt + RX_PREFIX_TS_FLAGS_OFST) = flags;
*(uint16_t*)(pkt + RX_PREFIX_TS_FLAGS_OFST) = ts.tv_flags;
*(uint16_t*)(pkt + RX_PREFIX_TS_RESULT_OFST) = -rc;
}

Expand Down

0 comments on commit da134ec

Please sign in to comment.