rte_timecounter(3)
๐ rte_timecounter ๐
okay bestie, quick vibe check before we dive in: this is rte_timecounter(3), a libc-style manual page from the DPDK gang โ Library Functions Manual energy, iykyk. Today we're getting to know a struct. That's it. That's the girl. And honestly? She's iconic. โจ
๐ธ NAME ๐ธ
rte_timecounter โ the little struct that keeps all the deets for a running cycle counter so you can turn cycles into nanoseconds. ๐โก๏ธ๐ข
๐ SYNOPSIS ๐
#include <rte_time.h>
โจ Data Fields โจ
uint64_t cycle_lastuint64_t nsecuint64_t nsec_maskuint64_t nsec_fracuint64_t cc_maskuint32_t cc_shift
๐ฆ Detailed Description ๐ฆ
So basically, this struct is the main character ๐ โ she holds onto all the parameters of a running cycle counter, and her whole job, her entire purpose, her slay, is to help you convert cycles into nanoseconds.
No cap, she's a support act and she's thriving.
Defined at line 21 of file rte_time.h. ๐
๐ Field Documentation ๐
uint64_t cycle_last
The last cycle counter value that got read. Like, the most recent one. The freshest read. ๐ซถ
Defined at line 23 of file rte_time.h. ๐
uint64_t nsec
The nanoseconds count, fr fr. โฑ๏ธ
Defined at line 25 of file rte_time.h. ๐
uint64_t nsec_mask
A bitmask that separates the nanoseconds from the sub-nanoseconds. She's the bouncer at the club, keeping those two apart. ๐ง
Defined at line 27 of file rte_time.h. ๐
uint64_t nsec_frac
The sub-nanoseconds count โ yes, we're going below a nanosecond, don't even worry about it, it's giving precision. ๐ฌ
Defined at line 29 of file rte_time.h. ๐
uint64_t cc_mask
A bitmask for two's complement subtraction of counters that are not 64-bit. Lowkey the math baddie of the group. ๐งฎ
Defined at line 31 of file rte_time.h. ๐
uint32_t cc_shift
The cycle-to-nanosecond divisor, and plot twist: it's a power of two. ๐
Defined at line 33 of file rte_time.h. ๐
๐ Author ๐
This page was generated automatically by Doxygen for DPDK from the source code. Not a human, just a robot bestie doing her thing. ๐คโจ
and that's the whole page, periodt. ๐ this was rte_timecounter(3) from DPDK, Version 25.11.3 โ mwah, go read some source code, you ate ๐๐โญ
๐ฆ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 ยท BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 ยท BSD-3-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms