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_last
  • uint64_t nsec
  • uint64_t nsec_mask
  • uint64_t nsec_frac
  • uint64_t cc_mask
  • uint32_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