rte_bus.h(3)
π rte_bus.h π
okay bestie, welcome to the rte_bus.h page from the Library Functions Manual, and no cap this one is lowkey the blueprint for how DPDK finds and wakes up your devices. let's get into it π«Ά
β¨ NAME β¨
rte_bus.h β literally the header, that's the name, slay
πΈ SYNOPSIS πΈ
#include <stdio.h>
#include <rte_eal.h>
π Typedefs
typedef 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_mode rte_bus_get_iommu_class (void)
π¦ Detailed Description π¦
DPDK device bus interface, periodt π
This file exposes the API and interfaces for bus abstraction over the devices and drivers in EAL. it's giving "let's make every bus speak the same language".
Definition in file rte_bus.h. π
π Typedef Documentation π
π typedef int(* rte_bus_cmp_t) (const struct rte_bus *bus, const void *data)
Bus comparison function. it's the vibe-check function, fr fr.
Parameters
busβ Bus under test. πdataβ Data to compare against.
Returns
0if the bus matches the data.!0if the bus does not match.<0if ordering is possible and the bus is lower than the data.>0if ordering is possible and the bus is greater than the data.
Definition at line 80 of file rte_bus.h. β¨
π Function Documentation π
π const char * rte_bus_name (const struct rte_bus * bus)
Retrieve a bus name. like asking the bus "what's ur name bestie".
Parameters
busβ A pointer to arte_busstructure.
Returns
A pointer to the bus name string. π
π int rte_bus_scan (void )
Scan all the buses. all of them. every single one. π
Returns
0 in case of success in scanning all buses, !0 in case of failure to scan π
π int rte_bus_probe (void )
For each device on the buses, perform a driver 'match' and call the driver-specific probe for device initialization. this is the matchmaking era we're in π
Returns
0 for successful match/probe, !0 otherwise.
π void rte_bus_dump (FILE * f)
Dump information of all the buses registered with EAL. a little info-dump, but make it iconic πΈ
Parameters
fβ A valid and open output stream handle. (valid AND open, don't play w me π«Ά)
π struct rte_bus * rte_bus_find (const struct rte_bus * start, rte_bus_cmp_t cmp, const void * data)
Bus iterator to find a particular bus. main character energy, honestly.
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. so you can pick up right where you left off, no restart needed β
Parameters
startβ 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. (if it's NULL we simply move on π)
π struct rte_bus * rte_bus_find_by_device (const struct rte_device * dev)
Find the registered bus for a particular device. match made in heaven π
π struct rte_bus * rte_bus_find_by_name (const char * busname)
Find the registered bus for a given name. name-drop and it shall appear β¨
π enum rte_iova_mode rte_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. like when someone says "idc, you pick" β that's RTE_IOVA_DC right there π
Returns
enum rte_iova_mode value.
π§ Author π§
Generated automatically by Doxygen for DPDK from the source code. (not a human, just a lil robot doing its thing π€π)
ok and that's the whole page bestie, every flag, every return, every line 80, all of it. you ate. periodt. π
DPDK, Version 25.11.3, rte_bus.h(3) β mwah, catch u on the next manpage π¦πΈπ
π¦ where this page comes from
- ubuntu resolute: dpdk-doc 25.11.3-0ubuntu0.26.04.1 Β· BSD-3-Clause
- ubuntu stonking: dpdk-doc 25.11.3-1 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms