DPDK  18.11.11
Data Structures | Functions
rte_vdpa.h File Reference
#include <rte_pci.h>
#include "rte_vhost.h"

Go to the source code of this file.

Data Structures

struct  rte_vdpa_dev_addr
 
struct  rte_vdpa_dev_ops
 
struct  rte_vdpa_device
 

Functions

int __rte_experimental rte_vdpa_register_device (struct rte_vdpa_dev_addr *addr, struct rte_vdpa_dev_ops *ops)
 
int __rte_experimental rte_vdpa_unregister_device (int did)
 
int __rte_experimental rte_vdpa_find_device_id (struct rte_vdpa_dev_addr *addr)
 
struct rte_vdpa_device *__rte_experimental rte_vdpa_get_device (int did)
 
int __rte_experimental rte_vdpa_get_device_num (void)
 

Detailed Description

Device specific vhost lib

Definition in file rte_vdpa.h.

Function Documentation

int __rte_experimental rte_vdpa_register_device ( struct rte_vdpa_dev_addr addr,
struct rte_vdpa_dev_ops ops 
)
Warning
EXPERIMENTAL: this API may change without prior notice

Register a vdpa device

Parameters
addrthe vdpa device address
opsthe vdpa device operations
Returns
device id on success, -1 on failure
int __rte_experimental rte_vdpa_unregister_device ( int  did)
Warning
EXPERIMENTAL: this API may change without prior notice

Unregister a vdpa device

Parameters
didvdpa device id
Returns
device id on success, -1 on failure
int __rte_experimental rte_vdpa_find_device_id ( struct rte_vdpa_dev_addr addr)
Warning
EXPERIMENTAL: this API may change without prior notice

Find the device id of a vdpa device

Parameters
addrthe vdpa device address
Returns
device id on success, -1 on failure
Examples:
examples/vdpa/main.c.
struct rte_vdpa_device* __rte_experimental rte_vdpa_get_device ( int  did)
Warning
EXPERIMENTAL: this API may change without prior notice

Find a vdpa device based on device id

Parameters
diddevice id
Returns
rte_vdpa_device on success, NULL on failure
Examples:
examples/vdpa/main.c.
int __rte_experimental rte_vdpa_get_device_num ( void  )
Warning
EXPERIMENTAL: this API may change without prior notice

Get current available vdpa device number

Returns
available vdpa device number
Examples:
examples/vdpa/main.c.