rte_byteorder.h(3)

πŸ’– rte_byteorder.h πŸ’–

okay bestie, pull up a chair 🫢 you're looking at the manual page for rte_byteorder.h, and it lives in section 3 (that's the Library Functions Manual girlies, we don't do commands here, we do functions) ✨


🌸 NAME 🌸

rte_byteorder.h β€” no cap, that's literally it, that's the whole name πŸ’…


✨ SYNOPSIS ✨

First things first, you gotta invite the right people to the party:

#include <stdint.h>
#include <rte_common.h>
#include <rte_config.h>

πŸŽ€ Typedefs

these are the little guys, the glow-ups for ints:

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

and here's the whole squad, every single one, in order, no skipping πŸ‘‘

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 🌈

bestie, this file is the blueprint for a generic API for byte swap operations. It's giving "one interface to rule them all" energy β€” and the plot twist? Part of the implementation is architecture-specific. so the vibes are portable, but the guts under the hood change depending on what you're running on. iconic, honestly. πŸ’…

Definition in file rte_byteorder.h.


🌟 Typedef Documentation 🌟

  • typedef uint16_t rte_be16_t β€” a 16-bit big-endian value. πŸ“ Definition at line 116 of file rte_byteorder.h.
  • typedef uint32_t rte_be32_t β€” a 32-bit big-endian value. πŸ“ Definition at line 117 of file rte_byteorder.h.
  • typedef uint64_t rte_be64_t β€” a 64-bit big-endian value. πŸ“ Definition at line 118 of file rte_byteorder.h.
  • typedef uint16_t rte_le16_t β€” a 16-bit little-endian value. 🧚 Definition at line 119 of file rte_byteorder.h.
  • typedef uint32_t rte_le32_t β€” a 32-bit little-endian value. 🧚 Definition at line 120 of file rte_byteorder.h.
  • typedef uint64_t rte_le64_t β€” a 64-bit little-endian value. 🧚 Definition at line 121 of file rte_byteorder.h.

πŸ”₯ Function Documentation πŸ”₯

uint16_t rte_bswap16 (uint16_t _x) [static]

Swap bytes in a 16-bit value. πŸ”„

uint32_t rte_bswap32 (uint32_t x) [static]

Swap bytes in a 32-bit value. πŸ”„

uint64_t rte_bswap64 (uint64_t x) [static]

Swap bytes in a 64-bit value. πŸ”„


rte_le16_t rte_cpu_to_le_16 (uint16_t x) [static]

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

rte_le32_t rte_cpu_to_le_32 (uint32_t x) [static]

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

rte_le64_t rte_cpu_to_le_64 (uint64_t x) [static]

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


rte_be16_t rte_cpu_to_be_16 (uint16_t x) [static]

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

rte_be32_t rte_cpu_to_be_32 (uint32_t x) [static]

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

rte_be64_t rte_cpu_to_be_64 (uint64_t x) [static]

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


uint16_t rte_le_to_cpu_16 (rte_le16_t x) [static]

Convert a 16-bit value from little endian to CPU order. πŸ’«

uint32_t rte_le_to_cpu_32 (rte_le32_t x) [static]

Convert a 32-bit value from little endian to CPU order. πŸ’«

uint64_t rte_le_to_cpu_64 (rte_le64_t x) [static]

Convert a 64-bit value from little endian to CPU order. πŸ’«


uint16_t rte_be_to_cpu_16 (rte_be16_t x) [static]

Convert a 16-bit value from big endian to CPU order. πŸ¦‹

uint32_t rte_be_to_cpu_32 (rte_be32_t x) [static]

Convert a 32-bit value from big endian to CPU order. πŸ¦‹

uint64_t rte_be_to_cpu_64 (rte_be64_t x) [static]

Convert a 64-bit value from big endian to CPU order. πŸ¦‹


πŸ‘‘ Author πŸ‘‘

Generated automatically by Doxygen for DPDK from the source code. not me being a whole auto-generated document and still serving cunt πŸ’€βœ¨


okay that's the whole page bestie, you ate 🫢 this was DPDK, Version 25.11.3, and it's the rte_byteorder.h(3) page from the section 3 function manual β€” that's the whole footer and I said what I said πŸ’– bye mwah πŸ’…πŸŒΈ

πŸ“¦ where this page comes from