DPDK  24.07.0
Typedefs | Functions
rte_byteorder.h File Reference
#include <stdint.h>
#include <rte_common.h>
#include <rte_config.h>

Go to the source code of this file.

Typedefs

typedef uint16_t rte_be16_t
 
typedef uint32_t rte_be32_t
 
typedef uint64_t rte_be64_t
 
typedef uint16_t rte_le16_t
 
typedef uint32_t rte_le32_t
 
typedef uint64_t rte_le64_t
 

Functions

static uint16_t rte_bswap16 (uint16_t _x)
 
static uint32_t rte_bswap32 (uint32_t x)
 
static uint64_t rte_bswap64 (uint64_t x)
 
static rte_le16_t rte_cpu_to_le_16 (uint16_t x)
 
static rte_le32_t rte_cpu_to_le_32 (uint32_t x)
 
static rte_le64_t rte_cpu_to_le_64 (uint64_t x)
 
static rte_be16_t rte_cpu_to_be_16 (uint16_t x)
 
static rte_be32_t rte_cpu_to_be_32 (uint32_t x)
 
static rte_be64_t rte_cpu_to_be_64 (uint64_t x)
 
static uint16_t rte_le_to_cpu_16 (rte_le16_t x)
 
static uint32_t rte_le_to_cpu_32 (rte_le32_t x)
 
static uint64_t rte_le_to_cpu_64 (rte_le64_t x)
 
static uint16_t rte_be_to_cpu_16 (rte_be16_t x)
 
static uint32_t rte_be_to_cpu_32 (rte_be32_t x)
 
static uint64_t rte_be_to_cpu_64 (rte_be64_t x)
 

Detailed Description

Byte Swap Operations

This file defines a generic API for byte swap operations. Part of the implementation is architecture-specific.

Definition in file rte_byteorder.h.

Typedef Documentation

◆ rte_be16_t

typedef uint16_t rte_be16_t

16-bit big-endian value.

Definition at line 112 of file rte_byteorder.h.

◆ rte_be32_t

typedef uint32_t rte_be32_t

32-bit big-endian value.

Definition at line 113 of file rte_byteorder.h.

◆ rte_be64_t

typedef uint64_t rte_be64_t

64-bit big-endian value.

Definition at line 114 of file rte_byteorder.h.

◆ rte_le16_t

typedef uint16_t rte_le16_t

16-bit little-endian value.

Definition at line 115 of file rte_byteorder.h.

◆ rte_le32_t

typedef uint32_t rte_le32_t

32-bit little-endian value.

Definition at line 116 of file rte_byteorder.h.

◆ rte_le64_t

typedef uint64_t rte_le64_t

64-bit little-endian value.

Definition at line 117 of file rte_byteorder.h.

Function Documentation

◆ rte_bswap16()

static uint16_t rte_bswap16 ( uint16_t  _x)
static

Swap bytes in a 16-bit value.

Examples:
examples/l3fwd/l3fwd_acl.c.

◆ rte_bswap32()

static uint32_t rte_bswap32 ( uint32_t  x)
static

◆ rte_bswap64()

static uint64_t rte_bswap64 ( uint64_t  x)
static

Swap bytes in a 64-bit value.

◆ rte_cpu_to_le_16()

static rte_le16_t rte_cpu_to_le_16 ( uint16_t  x)
static

Convert a 16-bit value from CPU order to little endian.

◆ rte_cpu_to_le_32()

static rte_le32_t rte_cpu_to_le_32 ( uint32_t  x)
static

Convert a 32-bit value from CPU order to little endian.

◆ rte_cpu_to_le_64()

static rte_le64_t rte_cpu_to_le_64 ( uint64_t  x)
static

Convert a 64-bit value from CPU order to little endian.

◆ rte_cpu_to_be_16()

static rte_be16_t rte_cpu_to_be_16 ( uint16_t  x)
static

◆ rte_cpu_to_be_32()

static rte_be32_t rte_cpu_to_be_32 ( uint32_t  x)
static

◆ rte_cpu_to_be_64()

static rte_be64_t rte_cpu_to_be_64 ( uint64_t  x)
static

Convert a 64-bit value from CPU order to big endian.

Examples:
examples/ipsec-secgw/esp.c.

◆ rte_le_to_cpu_16()

static uint16_t rte_le_to_cpu_16 ( rte_le16_t  x)
static

Convert a 16-bit value from little endian to CPU order.

◆ rte_le_to_cpu_32()

static uint32_t rte_le_to_cpu_32 ( rte_le32_t  x)
static

Convert a 32-bit value from little endian to CPU order.

◆ rte_le_to_cpu_64()

static uint64_t rte_le_to_cpu_64 ( rte_le64_t  x)
static

Convert a 64-bit value from little endian to CPU order.

◆ rte_be_to_cpu_16()

static uint16_t rte_be_to_cpu_16 ( rte_be16_t  x)
static

◆ rte_be_to_cpu_32()

static uint32_t rte_be_to_cpu_32 ( rte_be32_t  x)
static

◆ rte_be_to_cpu_64()

static uint64_t rte_be_to_cpu_64 ( rte_be64_t  x)
static

Convert a 64-bit value from big endian to CPU order.