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_bus.h(3)

Detailed Description

       DPDK device bus interface

       This file exposes API and interfaces for bus abstraction over the devices and drivers in EAL.

       Definition in file rte_bus.h.

Function Documentation

constchar*rte_bus_name(conststructrte_bus*bus)
       Retrieve a bus name.

       Parametersbus A pointer to a rte_bus structure.

       Returns
           A pointer to the bus name string.

   intrte_bus_scan(void)
       Scan all the buses.

       Returns
           0 in case of success in scanning all buses !0 in case of failure to scan

   intrte_bus_probe(void)
       For each device on the buses, perform a driver 'match' and call the driver-specific probe for device
       initialization.

       Returns
           0 for successful match/probe !0 otherwise

   voidrte_bus_dump(FILE*f)
       Dump information of all the buses registered with EAL.

       Parametersf A valid and open output stream handle

   structrte_bus*rte_bus_find(conststructrte_bus*start,rte_bus_cmp_tcmp,constvoid*data)
       Bus iterator to find a particular bus.

       This function compares each registered bus to find one that matches the data passed as parameter.

       If the comparison function returns zero this function will stop iterating over any more buses. To
       continue a search the bus of a previous search can be passed via the start parameter.

       Parametersstart Starting point for the iteration.
           cmp Comparison function.
           data Data to pass to comparison function.

       Returns
           A pointer to a rte_bus structure or NULL in case no bus matches

   structrte_bus*rte_bus_find_by_device(conststructrte_device*dev)
       Find the registered bus for a particular device.

   structrte_bus*rte_bus_find_by_name(constchar*busname)
       Find the registered bus for a given name.

   enumrte_iova_moderte_bus_get_iommu_class(void)
       Get the common iommu class of devices bound on to buses available in the system. RTE_IOVA_DC means that
       no preference has been expressed.

       Returns
           enum rte_iova_mode value.

Name

       rte_bus.h

Synopsis

       #include <stdio.h>
       #include <rte_eal.h>

   Typedefstypedef int(* rte_bus_cmp_t) (const struct rte_bus *bus, const void *data)

   Functions
       const char * rte_bus_name (const struct rte_bus *bus)
       int rte_bus_scan (void)
       int rte_bus_probe (void)
       void rte_bus_dump (FILE *f)
       struct rte_bus * rte_bus_find (const struct rte_bus *start, rte_bus_cmp_t cmp, const void *data)
       struct rte_bus * rte_bus_find_by_device (const struct rte_device *dev)
       struct rte_bus * rte_bus_find_by_name (const char *busname)
       enum rte_iova_moderte_bus_get_iommu_class (void)

Typedef Documentation

typedefint(*rte_bus_cmp_t)(conststructrte_bus*bus,constvoid*data)
       Bus comparison function.

       Parametersbus Bus under test.
           data Data to compare against.

       Returns
           0 if the bus matches the data. !0 if the bus does not match. <0 if ordering is possible and the bus
           is lower than the data. >0 if ordering is possible and the bus is greater than the data.

       Definition at line 80 of file rte_bus.h.

See Also