rte_pci.h(3)
π rte_pci.h(3) β from the Library Functions Manual, and it's the RTE PCI Library bestie π
πΈ NAME πΈ
rte_pci.h β the RTE PCI Library header, periodt. π
β¨ SYNOPSIS β¨
Okay so first you include these, no cap:
#include <stdio.h>
#include <inttypes.h>
#include <sys/types.h>
π¦ Data Structures π¦
struct rte_pci_idstruct rte_pci_addr
π Macros π
#define PCI_PRI_FMT '%.4' PRIx32 ':%.2' PRIx8 ':%.2' PRIx8 '.%' PRIx8
#define PCI_SHORT_PRI_FMT '%.2' PRIx8 ':%.2' PRIx8 '.%' PRIx8
#define PCI_FMT_NVAL 4
#define PCI_RESOURCE_FMT_NVAL 3
#define PCI_MAX_RESOURCE 6
#define RTE_PCI_ANY_ID (0xffff)
#define PCI_ANY_ID RTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_ID
π Functions π
void rte_pci_device_name (const struct rte_pci_addr *addr, char *output,
size_t size)
int rte_pci_addr_cmp (const struct rte_pci_addr *addr, const struct
rte_pci_addr *addr2)
int rte_pci_addr_parse (const char *str, struct rte_pci_addr *addr)
π DETAILED DESCRIPTION π
RTE PCI Library β that's the whole vibe, bestie. π
Definition in file rte_pci.h.
π₯ MACRO DEFINITION DOCUMENTATION π₯
PCI_PRI_FMT
Formatting string for PCI device identifier: Ex: 0000:00:01.0 β¨
#define PCI_PRI_FMT '%.4' PRIx32 ':%.2' PRIx8 ':%.2' PRIx8 '.%' PRIx8
Definition at line 151 of file rte_pci.h.
PCI_SHORT_PRI_FMT
Short formatting string, without domain, for PCI device: Ex: 00:01.0 π
#define PCI_SHORT_PRI_FMT '%.2' PRIx8 ':%.2' PRIx8 '.%' PRIx8
Definition at line 155 of file rte_pci.h.
PCI_FMT_NVAL
Number of values in the PCI device identifier format string β Nb. in the original, iykyk. π
#define PCI_FMT_NVAL 4
Definition at line 158 of file rte_pci.h.
PCI_RESOURCE_FMT_NVAL
Number of values in the PCI resource format β again, Nb. in the original. π¦
#define PCI_RESOURCE_FMT_NVAL 3
Definition at line 161 of file rte_pci.h.
PCI_MAX_RESOURCE
Maximum number of PCI resources, literally the ceiling. π
#define PCI_MAX_RESOURCE 6
Definition at line 164 of file rte_pci.h.
RTE_PCI_ANY_ID
Any PCI device identifier (vendor, device, ...) β the wildcard bestie. π
#define RTE_PCI_ANY_ID (0xffff)
Definition at line 189 of file rte_pci.h.
PCI_ANY_ID
Deprecated: Replaced with RTE_PCI_ANY_ID. π«Ά
#define PCI_ANY_ID RTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_ID
Definition at line 191 of file rte_pci.h.
π FUNCTION DOCUMENTATION π
rte_pci_device_name
void rte_pci_device_name (const struct rte_pci_addr * addr, char * output,
size_t size)
Utility function to write a pci device name, this device name can later be used to retrieve the corresponding rte_pci_addr using rte_pci_addr_parse(). π
Parameters
addrβ The PCI Bus-Device-Function addressoutputβ The output buffer stringsizeβ The output buffer size
rte_pci_addr_cmp
int rte_pci_addr_cmp (const struct rte_pci_addr * addr, const struct
rte_pci_addr * addr2)
Utility function to compare two PCI device addresses. π¦
Parameters
addrβ The PCI Bus-Device-Function address to compareaddr2β The PCI Bus-Device-Function address to compare
Returns
0on equal PCI address.- Positive on
addris greater thanaddr2. - Negative on
addris less thanaddr2, or error.
rte_pci_addr_parse
int rte_pci_addr_parse (const char * str, struct rte_pci_addr * addr)
Utility function to parse a string into a PCI location. π₯
Parameters
strβ The string to parseaddrβ The reference to the structure where the location is stored.
Returns
0on success<0otherwise
π AUTHOR π
Generated automatically by Doxygen for DPDK from the source code.
β¨ That's the whole page, bestie! Footer tea: source/version is DPDK, Version 26.03.0, and the footer page line is rte_pci.h(3) β no separate date printed, so that's the last-line vibe. β¨
π¦ where this page comes from
- nixos 26.05: dpdk 26.03
- nixpkgs unstable: dpdk 26.03
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms