DPDK  21.08.0
Functions
rte_io.h File Reference
#include <stdint.h>
#include <rte_common.h>
#include <rte_compat.h>
#include <rte_atomic.h>

Go to the source code of this file.

Functions

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

Definition in file rte_io.h.

Function Documentation

◆ rte_read8_relaxed()

static __rte_always_inline uint8_t rte_read8_relaxed ( const volatile void *  addr)
inlinestatic

Read a 8-bit value from I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 272 of file rte_io.h.

◆ rte_read16_relaxed()

static __rte_always_inline uint16_t rte_read16_relaxed ( const volatile void *  addr)
inlinestatic

Read a 16-bit value from I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 278 of file rte_io.h.

◆ rte_read32_relaxed()

static __rte_always_inline uint32_t rte_read32_relaxed ( const volatile void *  addr)
inlinestatic

Read a 32-bit value from I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 284 of file rte_io.h.

◆ rte_read64_relaxed()

static __rte_always_inline uint64_t rte_read64_relaxed ( const volatile void *  addr)
inlinestatic

Read a 64-bit value from I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 290 of file rte_io.h.

◆ rte_write8_relaxed()

static __rte_always_inline void rte_write8_relaxed ( uint8_t  value,
volatile void *  addr 
)
inlinestatic

Write a 8-bit value to I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 296 of file rte_io.h.

◆ rte_write16_relaxed()

static __rte_always_inline void rte_write16_relaxed ( uint16_t  value,
volatile void *  addr 
)
inlinestatic

Write a 16-bit value to I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 302 of file rte_io.h.

◆ rte_write32_relaxed()

static __rte_always_inline void rte_write32_relaxed ( uint32_t  value,
volatile void *  addr 
)
inlinestatic

Write a 32-bit value to I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 308 of file rte_io.h.

◆ rte_write64_relaxed()

static __rte_always_inline void rte_write64_relaxed ( uint64_t  value,
volatile void *  addr 
)
inlinestatic

Write a 64-bit value to I/O device memory address addr.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 314 of file rte_io.h.

◆ rte_read8()

static __rte_always_inline uint8_t rte_read8 ( const volatile void *  addr)
inlinestatic

Read a 8-bit value from I/O device memory address addr.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 320 of file rte_io.h.

◆ rte_read16()

static __rte_always_inline uint16_t rte_read16 ( const volatile void *  addr)
inlinestatic

Read a 16-bit value from I/O device memory address addr.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 329 of file rte_io.h.

◆ rte_read32()

static __rte_always_inline uint32_t rte_read32 ( const volatile void *  addr)
inlinestatic

Read a 32-bit value from I/O device memory address addr.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 338 of file rte_io.h.

◆ rte_read64()

static __rte_always_inline uint64_t rte_read64 ( const volatile void *  addr)
inlinestatic

Read a 64-bit value from I/O device memory address addr.

Parameters
addrI/O memory address to read the value from
Returns
read value

Definition at line 347 of file rte_io.h.

◆ rte_write8()

static __rte_always_inline void rte_write8 ( uint8_t  value,
volatile void *  addr 
)
inlinestatic

Write a 8-bit value to I/O device memory address addr.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 356 of file rte_io.h.

◆ rte_write16()

static __rte_always_inline void rte_write16 ( uint16_t  value,
volatile void *  addr 
)
inlinestatic

Write a 16-bit value to I/O device memory address addr.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 363 of file rte_io.h.

◆ rte_write32()

static __rte_always_inline void rte_write32 ( uint32_t  value,
volatile void *  addr 
)
inlinestatic

Write a 32-bit value to I/O device memory address addr.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 370 of file rte_io.h.

◆ rte_write64()

static __rte_always_inline void rte_write64 ( uint64_t  value,
volatile void *  addr 
)
inlinestatic

Write a 64-bit value to I/O device memory address addr.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 377 of file rte_io.h.

◆ rte_write32_wc()

static __rte_always_inline void rte_write32_wc ( uint32_t  value,
volatile void *  addr 
)
inlinestatic

Write a 32-bit value to I/O device memory address addr using write combining memory write protocol. Depending on the platform write combining may not be available and/or may be treated as a hint and the behavior may fallback to a regular store.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 385 of file rte_io.h.

◆ rte_write32_wc_relaxed()

static __rte_always_inline void rte_write32_wc_relaxed ( uint32_t  value,
volatile void *  addr 
)
inlinestatic

Write a 32-bit value to I/O device memory address addr using write combining memory write protocol. Depending on the platform write combining may not be available and/or may be treated as a hint and the behavior may fallback to a regular store.

The relaxed version does not have additional I/O memory barrier, useful in accessing the device registers of integrated controllers which implicitly strongly ordered with respect to memory access.

Parameters
valueValue to write
addrI/O memory address to write the value to

Definition at line 391 of file rte_io.h.