Both vhost_desc and vhost_buf can work for split and packed.static bool vhost_notify(struct vhost_dev *dev, struct vhost_virtqueue *vq)So it looks to me the struct vhost_buf can work for both split ring and
{
__u16 old, new;
diff --git a/drivers/vhost/vhost.h b/drivers/vhost/vhost.h
index a67bda9792ec..6c10e99ff334 100644
--- a/drivers/vhost/vhost.h
+++ b/drivers/vhost/vhost.h
@@ -67,6 +67,13 @@ struct vhost_desc {
u16 id;
};
+struct vhost_buf {
+ u32 out_len;
+ u32 in_len;
+ u16 descs;
+ u16 id;
+};
packed ring.
If this is true, we'd better make struct vhost_desc work for both.
Thanks
Do you mean we should add packed ring support based on this?
For sure, this is one of the motivators for the patchset.