rte_io.h(3)
π rte_io.h(3) β Library Functions Manual π
okay bestie, sit down, hydrate, and get comfy, because we're about to talk about I/O device memory operations π
this whole page lives in rte_io.h, a header full of tiny static inline read/write functions that talk straight to hardware registers. it's giving "low-level but make it cute". no cap. β¨
πΈ NAME πΈ
rte_io.h β the generic API for I/O device memory read/write operations π¦
β¨ SYNOPSIS β¨
so first of all, you gotta bring your friends:
#include <stdint.h>
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_atomic.h>
π Functions π
here's the whole roster, bestie. every single one. no gatekeeping here:
static uint8_t rte_read8_relaxed (const volatile void *addr)
static uint16_t rte_read16_relaxed (const volatile void *addr)
static uint32_t rte_read32_relaxed (const volatile void *addr)
static uint64_t rte_read64_relaxed (const volatile void *addr)
static void rte_write8_relaxed (uint8_t value, volatile void *addr)
static void rte_write16_relaxed (uint16_t value, volatile void *addr)
static void rte_write32_relaxed (uint32_t value, volatile void *addr)
static void rte_write64_relaxed (uint64_t value, volatile void *addr)
static uint8_t rte_read8 (const volatile void *addr)
static uint16_t rte_read16 (const volatile void *addr)
static uint32_t rte_read32 (const volatile void *addr)
static uint64_t rte_read64 (const volatile void *addr)
static void rte_write8 (uint8_t value, volatile void *addr)
static void rte_write16 (uint16_t value, volatile void *addr)
static void rte_write32 (uint32_t value, volatile void *addr)
static void rte_write64 (uint64_t value, volatile void *addr)
static __rte_experimental void rte_write32_wc (uint32_t value, volatile
void *addr)
static __rte_experimental void rte_write32_wc_relaxed (uint32_t value,
volatile void *addr)
π Detailed Description π
I/O device memory operations π
this file defines the generic API for I/O device memory read/write operations. that's it, that's the whole vibe.
Definition in file rte_io.h.
π Function Documentation π
π __rte_always_inline uint8_t rte_read8_relaxed (const volatile void * addr)
[inline], [static]
Read a 8-bit value from I/O device memory address addr. π
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 276 of file rte_io.h.
π __rte_always_inline uint16_t rte_read16_relaxed (const volatile void * addr)
[inline], [static]
Read a 16-bit value from I/O device memory address addr. π
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 282 of file rte_io.h.
π __rte_always_inline uint32_t rte_read32_relaxed (const volatile void * addr)
[inline], [static]
Read a 32-bit value from I/O device memory address addr. π
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 288 of file rte_io.h.
π __rte_always_inline uint64_t rte_read64_relaxed (const volatile void * addr)
[inline], [static]
Read a 64-bit value from I/O device memory address addr. π
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 294 of file rte_io.h.
π __rte_always_inline void rte_write8_relaxed (uint8_t value, volatile void * addr)
[inline], [static]
Write a 8-bit value to I/O device memory address addr. π¦
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 300 of file rte_io.h.
π __rte_always_inline void rte_write16_relaxed (uint16_t value, volatile void * addr)
[inline], [static]
Write a 16-bit value to I/O device memory address addr. π¦
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 306 of file rte_io.h.
π __rte_always_inline void rte_write32_relaxed (uint32_t value, volatile void * addr)
[inline], [static]
Write a 32-bit value to I/O device memory address addr. π¦
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 312 of file rte_io.h.
π __rte_always_inline void rte_write64_relaxed (uint64_t value, volatile void * addr)
[inline], [static]
Write a 64-bit value to I/O device memory address addr. π¦
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 318 of file rte_io.h.
π __rte_always_inline uint8_t rte_read8 (const volatile void * addr)
[inline], [static]
Read a 8-bit value from I/O device memory address addr. πΈ (this one is the not relaxed one, so bestie, it's got the memory barrier energy)
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 324 of file rte_io.h.
π __rte_always_inline uint16_t rte_read16 (const volatile void * addr)
[inline], [static]
Read a 16-bit value from I/O device memory address addr. πΈ
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 333 of file rte_io.h.
π __rte_always_inline uint32_t rte_read32 (const volatile void * addr)
[inline], [static]
Read a 32-bit value from I/O device memory address addr. πΈ
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 342 of file rte_io.h.
π __rte_always_inline uint64_t rte_read64 (const volatile void * addr)
[inline], [static]
Read a 64-bit value from I/O device memory address addr. πΈ
Parameters
- addr β I/O memory address to read the value from
Returns
- read value
Definition at line 351 of file rte_io.h.
π __rte_always_inline void rte_write8 (uint8_t value, volatile void * addr)
[inline], [static]
Write a 8-bit value to I/O device memory address addr. π
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 360 of file rte_io.h.
π __rte_always_inline void rte_write16 (uint16_t value, volatile void * addr)
[inline], [static]
Write a 16-bit value to I/O device memory address addr. π
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 367 of file rte_io.h.
π __rte_always_inline void rte_write32 (uint32_t value, volatile void * addr)
[inline], [static]
Write a 32-bit value to I/O device memory address addr. π
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 374 of file rte_io.h.
π __rte_always_inline void rte_write64 (uint64_t value, volatile void * addr)
[inline], [static]
Write a 64-bit value to I/O device memory address addr. π
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 381 of file rte_io.h.
π __rte_always_inline void rte_write32_wc (uint32_t value, volatile void * addr)
[inline], [static]
Write a 32-bit value to I/O device memory address addr using the write combining memory write protocol. π
okay heads up bestie, this is the important bit: depending on the platform, write combining may not be available and/or it may be treated as a hint, and the behavior may fallback to a regular store. so like. don't build your entire personality on it, fr fr. π
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 389 of file rte_io.h.
π __rte_always_inline void rte_write32_wc_relaxed (uint32_t value, volatile void * addr)
[inline], [static]
Write a 32-bit value to I/O device memory address addr using the write combining memory write protocol. π
same warning as above, no cap: depending on the platform, write combining may not be available and/or it may be treated as a hint, and the behavior may fallback to a regular store. β οΈ
the relaxed version does not have an additional I/O memory barrier β which is super useful when you're accessing the device registers of integrated controllers that are implicitly strongly ordered with respect to memory access. iykyk β¨
Parameters
- value β Value to write
- addr β I/O memory address to write the value to
Definition at line 395 of file rte_io.h.
π«Ά Author π«Ά
Generated automatically by Doxygen for DPDK from the source code. (yeah it's not a person, it's a doc generator, and honestly? it ate. π )
and that's the whole page bestie, you understood it, you're literally the main character of low-level memory-mapped I/O now πβ¨ this was DPDK, Version 25.11.3, and it's rte_io.h(3) β go forth and rte_write32 responsibly, mwah ππ¦π
π¦ 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