diff mbox series

[RFC,02/12] vhost: add vhost_restart_queue_op

Message ID 20230720181459.607008-3-eperezma@redhat.com (mailing list archive)
State New, archived
Headers show
Series Prefer to use SVQ to stall dataplane at NIC state restore through CVQ | expand

Commit Message

Eugenio Perez Martin July 20, 2023, 6:14 p.m. UTC
So different vhost backends can perform custom actions at queue restart.

Signed-off-by: Eugenio PĂ©rez <eperezma@redhat.com>
---
 include/hw/virtio/vhost-backend.h | 3 +++
 1 file changed, 3 insertions(+)
diff mbox series

Patch

diff --git a/include/hw/virtio/vhost-backend.h b/include/hw/virtio/vhost-backend.h
index 37e05fa1f9..651402af10 100644
--- a/include/hw/virtio/vhost-backend.h
+++ b/include/hw/virtio/vhost-backend.h
@@ -135,6 +135,8 @@  typedef void (*vhost_reset_status_op)(struct vhost_dev *dev);
 
 typedef void (*vhost_reset_queue_op)(struct vhost_dev *dev, int idx);
 
+typedef int (*vhost_restart_queue_op)(struct vhost_dev *dev, int idx);
+
 typedef struct VhostOps {
     VhostBackendType backend_type;
     vhost_backend_init vhost_backend_init;
@@ -184,6 +186,7 @@  typedef struct VhostOps {
     vhost_set_config_call_op vhost_set_config_call;
     vhost_reset_status_op vhost_reset_status;
     vhost_reset_queue_op vhost_reset_queue;
+    vhost_restart_queue_op vhost_restart_queue;
 } VhostOps;
 
 int vhost_backend_update_device_iotlb(struct vhost_dev *dev,