summaryrefslogtreecommitdiffstats
path: root/vhost_user_loopback.h
diff options
context:
space:
mode:
authorTimos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>2022-11-04 15:32:11 +0100
committerAngelos Mouzakitis <a.mouzakitis@virtualopensystems.com>2023-10-03 15:18:54 +0300
commita3fcee5911bf760f9f4522e94cb9e6ab22a7eb95 (patch)
tree9bc175084b6bc1da48651fdc3767567e2a54c22e /vhost_user_loopback.h
parent2b09c69cc896841c7828408083f6cb443fef8612 (diff)
Virtio-loopback-adapter Beta version for review:
- Beta version of the code to be discussed during the review planned on the 09/11/2022 - Before being merged into master, this code might be changed with fixes and optimization Signed-off-by: Timos Ampelikiotis <t.ampelikiotis@virtualopensystems.com>
Diffstat (limited to 'vhost_user_loopback.h')
-rw-r--r--vhost_user_loopback.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/vhost_user_loopback.h b/vhost_user_loopback.h
index 4a98516..a56a1d2 100644
--- a/vhost_user_loopback.h
+++ b/vhost_user_loopback.h
@@ -59,6 +59,11 @@ struct vhost_virtqueue {
struct vhost_dev *dev;
};
+typedef struct VhostDevConfigOps {
+ /* Vhost device config space changed callback */
+ int (*vhost_dev_config_notifier)(struct vhost_dev *dev);
+} VhostDevConfigOps;
+
struct vhost_dev {
VirtIODevice *vdev;
struct vhost_virtqueue *vqs;
@@ -81,6 +86,7 @@ struct vhost_dev {
void *migration_blocker;
/* Vhost-user struct */
uint64_t memory_slots;
+ const VhostDevConfigOps *config_ops;
};
struct vhost_user {
@@ -798,5 +804,18 @@ int vhost_user_set_vring_base(struct vhost_dev *dev,
struct vhost_vring_state *ring);
int vhost_user_set_vring_addr(struct vhost_dev *dev,
struct vhost_vring_addr *addr);
+int vhost_user_get_config(struct vhost_dev *dev, uint8_t *config,
+ uint32_t config_len);
+int vhost_user_set_config(struct vhost_dev *dev, const uint8_t *data,
+ uint32_t offset, uint32_t size, uint32_t flags);
+
+/* FIXME: This need to move in a better place */
+struct vhost_inflight;
+int vhost_user_get_inflight_fd(struct vhost_dev *dev,
+ uint16_t queue_size,
+ struct vhost_inflight *inflight);
+int vhost_user_set_inflight_fd(struct vhost_dev *dev,
+ struct vhost_inflight *inflight);
+
#endif /* LIBVHOST_USER_H */