#include <stdbool.h>
#include <rte_pci.h>
#include "rte_vhost.h"
Go to the source code of this file.
Device specific vhost lib
Definition in file rte_vdpa.h.
◆ rte_vdpa_register_device()
- Warning
- EXPERIMENTAL: this API may change without prior notice
Register a vdpa device
- Parameters
-
addr | the vdpa device address |
ops | the vdpa device operations |
- Returns
- device id on success, -1 on failure
◆ rte_vdpa_unregister_device()
int __rte_experimental rte_vdpa_unregister_device |
( |
int |
did | ) |
|
- Warning
- EXPERIMENTAL: this API may change without prior notice
Unregister a vdpa device
- Parameters
-
- Returns
- device id on success, -1 on failure
◆ rte_vdpa_find_device_id()
- Warning
- EXPERIMENTAL: this API may change without prior notice
Find the device id of a vdpa device
- Parameters
-
addr | the vdpa device address |
- Returns
- device id on success, -1 on failure
- Examples
- examples/vdpa/main.c.
◆ rte_vdpa_get_device()
- Warning
- EXPERIMENTAL: this API may change without prior notice
Find a vdpa device based on device id
- Parameters
-
- Returns
- rte_vdpa_device on success, NULL on failure
- Examples
- examples/vdpa/main.c.
◆ rte_vdpa_get_device_num()
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.
◆ rte_vhost_host_notifier_ctrl()
int __rte_experimental rte_vhost_host_notifier_ctrl |
( |
int |
vid, |
|
|
bool |
enable |
|
) |
| |
- Warning
- EXPERIMENTAL: this API may change without prior notice
Enable/Disable host notifier mapping for a vdpa port.
- Parameters
-
vid | vhost device id |
enable | true for host notifier map, false for host notifier unmap |
- Returns
- 0 on success, -1 on failure
◆ rte_vdpa_relay_vring_used()
int __rte_experimental rte_vdpa_relay_vring_used |
( |
int |
vid, |
|
|
uint16_t |
qid, |
|
|
void * |
vring_m |
|
) |
| |
- Warning
- EXPERIMENTAL: this API may change without prior notice
Synchronize the used ring from mediated ring to guest, log dirty page for each writeable buffer, caller should handle the used ring logging before device stop.
- Parameters
-
vid | vhost device id |
qid | vhost queue id |
vring_m | mediated virtio ring pointer |
- Returns
- number of synced used entries on success, -1 on failure