.TH "rte_bus.h" 3 "Version 25.11.0" "DPDK" \" -*- nroff -*-
.ad l
.nh
.SH NAME
rte_bus.h
.SH SYNOPSIS
.br
.PP
\fR#include <stdio\&.h>\fP
.br
\fR#include <rte_eal\&.h>\fP
.br

.SS "Typedefs"

.in +1c
.ti -1c
.RI "\fBtypedef\fP int(* \fBrte_bus_cmp_t\fP) (const struct rte_bus *bus, const void *data)"
.br
.in -1c
.SS "Functions"

.in +1c
.ti -1c
.RI "const char * \fBrte_bus_name\fP (const struct rte_bus *bus)"
.br
.ti -1c
.RI "int \fBrte_bus_scan\fP (void)"
.br
.ti -1c
.RI "int \fBrte_bus_probe\fP (void)"
.br
.ti -1c
.RI "void \fBrte_bus_dump\fP (FILE *f)"
.br
.ti -1c
.RI "struct rte_bus * \fBrte_bus_find\fP (const struct rte_bus *start, \fBrte_bus_cmp_t\fP cmp, const void *data)"
.br
.ti -1c
.RI "struct rte_bus * \fBrte_bus_find_by_device\fP (const struct rte_device *dev)"
.br
.ti -1c
.RI "struct rte_bus * \fBrte_bus_find_by_name\fP (const char *busname)"
.br
.ti -1c
.RI "enum \fBrte_iova_mode\fP \fBrte_bus_get_iommu_class\fP (void)"
.br
.in -1c
.SH "Detailed Description"
.PP 
DPDK device bus interface

.PP
This file exposes API and interfaces for bus abstraction over the devices and drivers in EAL\&. 
.PP
Definition in file \fBrte_bus\&.h\fP\&.
.SH "Typedef Documentation"
.PP 
.SS "\fBtypedef\fP int(* rte_bus_cmp_t) (const struct rte_bus *bus, const void *data)"
Bus comparison function\&.

.PP
\fBParameters\fP
.RS 4
\fIbus\fP Bus under test\&.
.br
\fIdata\fP Data to compare against\&.
.RE
.PP
\fBReturns\fP
.RS 4
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\&. 
.RE
.PP

.PP
Definition at line \fB80\fP of file \fBrte_bus\&.h\fP\&.
.SH "Function Documentation"
.PP 
.SS "const char * rte_bus_name (const struct rte_bus * bus)"
Retrieve a bus name\&.

.PP
\fBParameters\fP
.RS 4
\fIbus\fP A pointer to a rte_bus structure\&. 
.RE
.PP
\fBReturns\fP
.RS 4
A pointer to the bus name string\&. 
.RE
.PP

.SS "int rte_bus_scan (void )"
Scan all the buses\&.

.PP
\fBReturns\fP
.RS 4
0 in case of success in scanning all buses !0 in case of failure to scan 
.RE
.PP

.SS "int rte_bus_probe (void )"
For each device on the buses, perform a driver 'match' and call the driver-specific probe for device initialization\&.

.PP
\fBReturns\fP
.RS 4
0 for successful match/probe !0 otherwise 
.RE
.PP

.SS "void rte_bus_dump (FILE * f)"
Dump information of all the buses registered with EAL\&.

.PP
\fBParameters\fP
.RS 4
\fIf\fP A valid and open output stream handle 
.RE
.PP

.SS "struct rte_bus * rte_bus_find (const struct rte_bus * start, \fBrte_bus_cmp_t\fP cmp, const void * data)"
Bus iterator to find a particular bus\&.

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

.PP
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\&.

.PP
\fBParameters\fP
.RS 4
\fIstart\fP Starting point for the iteration\&.
.br
\fIcmp\fP Comparison function\&.
.br
\fIdata\fP Data to pass to comparison function\&.
.RE
.PP
\fBReturns\fP
.RS 4
A pointer to a rte_bus structure or NULL in case no bus matches 
.RE
.PP

.SS "struct rte_bus * rte_bus_find_by_device (const struct rte_device * dev)"
Find the registered bus for a particular device\&. 
.SS "struct rte_bus * rte_bus_find_by_name (const char * busname)"
Find the registered bus for a given name\&. 
.SS "enum \fBrte_iova_mode\fP 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\&.

.PP
\fBReturns\fP
.RS 4
enum \fBrte_iova_mode\fP value\&. 
.RE
.PP

.SH "Author"
.PP 
Generated automatically by Doxygen for DPDK from the source code\&.
