rte_pci.h(3)

πŸ“¦ version 26.03, in nixos 26.05, nixpkgs unstable

πŸ’– 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_id
  • struct 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 address
  • output β€” The output buffer string
  • size β€” 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 compare
  • addr2 β€” The PCI Bus-Device-Function address to compare

Returns

  • 0 on equal PCI address.
  • Positive on addr is greater than addr2.
  • Negative on addr is less than addr2, 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 parse
  • addr β€” The reference to the structure where the location is stored.

Returns

  • 0 on success
  • <0 otherwise

πŸŽ€ 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