17 #define MAX_VDPA_NAME_LEN 128
24 struct rte_vdpa_dev_addr {
25 enum vdpa_addr_type type;
32 struct rte_vdpa_dev_ops {
34 int (*get_queue_num)(
int did, uint32_t *queue_num);
35 int (*get_features)(
int did, uint64_t *features);
36 int (*get_protocol_features)(
int did, uint64_t *protocol_features);
39 int (*dev_conf)(
int vid);
40 int (*dev_close)(
int vid);
43 int (*set_vring_state)(
int vid,
int vring,
int state);
46 int (*set_features)(
int vid);
49 int (*migration_done)(
int vid);
52 int (*get_vfio_group_fd)(
int vid);
55 int (*get_vfio_device_fd)(
int vid);
58 int (*get_notify_area)(
int vid,
int qid,
59 uint64_t *offset, uint64_t *size);
65 struct rte_vdpa_device {
66 struct rte_vdpa_dev_addr addr;
67 struct rte_vdpa_dev_ops *ops;
71 int __rte_experimental
72 rte_vdpa_register_device(
struct rte_vdpa_dev_addr *addr,
73 struct rte_vdpa_dev_ops *ops);
76 int __rte_experimental
77 rte_vdpa_unregister_device(
int did);
80 int __rte_experimental
81 rte_vdpa_find_device_id(
struct rte_vdpa_dev_addr *addr);
84 struct rte_vdpa_device * __rte_experimental
85 rte_vdpa_get_device(
int did);