logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Author

       Generated automatically by Doxygen for DPDK from the source code.

DPDK                                             Version 24.11.2                                    rte_pci.h(3)

Detailed Description

       RTE PCI Library

       Definition in file rte_pci.h.

Function Documentation

voidrte_pci_device_name(conststructrte_pci_addr*addr,char*output,size_tsize)
       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().

       Parametersaddr The PCI Bus-Device-Function address
           output The output buffer string
           size The output buffer size

   intrte_pci_addr_cmp(conststructrte_pci_addr*addr,conststructrte_pci_addr*addr2)
       Utility function to compare two PCI device addresses.

       Parametersaddr 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.

   intrte_pci_addr_parse(constchar*str,structrte_pci_addr*addr)
       Utility function to parse a string into a PCI location.

       Parametersstr The string to parse
           addr The reference to the structure where the location is stored.

       Returns
           0 on success <0 otherwise

Macro Definition Documentation

#definePCI_PRI_FMT'%.4'PRIx32':%.2'PRIx8':%.2'PRIx8'.%'PRIx8
       Formatting string for PCI device identifier: Ex: 0000:00:01.0

       Definition at line 141 of file rte_pci.h.

   #definePCI_SHORT_PRI_FMT'%.2'PRIx8':%.2'PRIx8'.%'PRIx8
       Short formatting string, without domain, for PCI device: Ex: 00:01.0

       Definition at line 145 of file rte_pci.h.

   #definePCI_FMT_NVAL4
       Nb. of values in PCI device identifier format string.

       Definition at line 148 of file rte_pci.h.

   #definePCI_RESOURCE_FMT_NVAL3
       Nb. of values in PCI resource format.

       Definition at line 151 of file rte_pci.h.

   #definePCI_MAX_RESOURCE6
       Maximum number of PCI resources.

       Definition at line 154 of file rte_pci.h.

   #defineRTE_PCI_ANY_ID(0xffff)
       Any PCI device identifier (vendor, device, ...)

       Definition at line 179 of file rte_pci.h.

   #definePCI_ANY_IDRTE_DEPRECATED(PCI_ANY_ID)RTE_PCI_ANY_IDDeprecated
           Replaced with RTE_PCI_ANY_ID

       Definition at line 181 of file rte_pci.h.

Name

       rte_pci.h

Synopsis

       #include <stdio.h>
       #include <inttypes.h>
       #include <sys/types.h>

   DataStructures
       struct rte_pci_id
       struct rte_pci_addrMacros
       #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_IDRTE_DEPRECATED(PCI_ANY_ID) RTE_PCI_ANY_IDFunctions
       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)

See Also