MCPcopy Create free account
hub / github.com/F-Stack/f-stack / add_timestamps

Function add_timestamps

dpdk/examples/rxtx_callbacks/main.c:56–67  ·  view source on GitHub ↗

Callback added to the RX port and applied to packets. 8< */

Source from the content-addressed store, hash-verified

54
55/* Callback added to the RX port and applied to packets. 8< */
56static uint16_t
57add_timestamps(uint16_t port __rte_unused, uint16_t qidx __rte_unused,
58 struct rte_mbuf **pkts, uint16_t nb_pkts,
59 uint16_t max_pkts __rte_unused, void *_ __rte_unused)
60{
61 unsigned i;
62 uint64_t now = rte_rdtsc();
63
64 for (i = 0; i < nb_pkts; i++)
65 *tsc_field(pkts[i]) = now;
66 return nb_pkts;
67}
68/* >8 End of callback addition and application. */
69
70/* Callback is added to the TX port. 8< */

Callers

nothing calls this directly

Calls 2

tsc_fieldFunction · 0.85
rte_rdtscFunction · 0.50

Tested by

no test coverage detected