DPDK
19.05.0
Main Page
Related Pages
Data Structures
Files
Examples
File List
Globals
lib
librte_vhost
rte_vdpa.h
Go to the documentation of this file.
1
/* SPDX-License-Identifier: BSD-3-Clause
2
* Copyright(c) 2018 Intel Corporation
3
*/
4
5
#ifndef _RTE_VDPA_H_
6
#define _RTE_VDPA_H_
7
14
#include <stdbool.h>
15
16
#include <
rte_pci.h
>
17
#include "
rte_vhost.h
"
18
19
#define MAX_VDPA_NAME_LEN 128
20
21
enum
vdpa_addr_type {
22
PCI_ADDR,
23
VDPA_ADDR_MAX
24
};
25
29
struct
rte_vdpa_dev_addr
{
31
enum
vdpa_addr_type
type
;
32
34
union
{
35
uint8_t __dummy[64];
36
struct
rte_pci_addr
pci_addr;
37
};
38
};
39
43
struct
rte_vdpa_dev_ops
{
45
int (*
get_queue_num
)(
int
did, uint32_t *queue_num);
46
48
int (*
get_features
)(
int
did, uint64_t *features);
49
51
int (*
get_protocol_features
)(
int
did, uint64_t *protocol_features);
52
54
int (*
dev_conf
)(
int
vid);
55
int (*dev_close)(
int
vid);
56
58
int (*
set_vring_state
)(
int
vid,
int
vring,
int
state);
59
61
int (*
set_features
)(
int
vid);
62
64
int (*
migration_done
)(
int
vid);
65
67
int (*
get_vfio_group_fd
)(
int
vid);
68
70
int (*
get_vfio_device_fd
)(
int
vid);
71
73
int (*
get_notify_area
)(
int
vid,
int
qid,
74
uint64_t *offset, uint64_t *size);
75
77
void
*
reserved
[5];
78
};
79
83
struct
rte_vdpa_device
{
85
struct
rte_vdpa_dev_addr
addr
;
87
struct
rte_vdpa_dev_ops
*
ops
;
88
}
__rte_cache_aligned
;
89
103
int
__rte_experimental
104
rte_vdpa_register_device
(
struct
rte_vdpa_dev_addr
*addr,
105
struct
rte_vdpa_dev_ops
*ops);
106
118
int
__rte_experimental
119
rte_vdpa_unregister_device
(
int
did);
120
132
int
__rte_experimental
133
rte_vdpa_find_device_id
(
struct
rte_vdpa_dev_addr
*addr);
134
146
struct
rte_vdpa_device
* __rte_experimental
147
rte_vdpa_get_device
(
int
did);
148
158
int
__rte_experimental
159
rte_vdpa_get_device_num
(
void
);
160
174
int
__rte_experimental
175
rte_vhost_host_notifier_ctrl
(
int
vid,
bool
enable);
176
194
int
__rte_experimental
195
rte_vdpa_relay_vring_used
(
int
vid, uint16_t qid,
void
*vring_m);
196
#endif
/* _RTE_VDPA_H_ */
Generated by
1.8.1.2