Scroll to navigation

rte_bus.h(3) DPDK rte_bus.h(3)

NAME

rte_bus.h

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

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

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.

Parameters

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

Function Documentation

const char* rte_bus_name (const struct rte_bus * bus)

Retrieve a bus name.

Parameters

bus A pointer to a rte_bus structure.

Returns

A pointer to the bus name string.

int rte_bus_scan (void)

Scan all the buses.

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.

Returns

0 for successful match/probe !0 otherwise

void rte_bus_dump (FILE * f)

Dump information of all the buses registered with EAL.

Parameters

f A valid and open output stream handle

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.

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.

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

struct rte_bus* rte_bus_find_by_device (const struct rte_device * dev)

Find the registered bus for a particular device.

struct rte_bus* rte_bus_find_by_name (const char * busname)

Find the registered bus for a given name.

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.

Returns

enum rte_iova_mode value.

Author

Generated automatically by Doxygen for DPDK from the source code.

Fri Dec 15 2023 Version 23.11.0