Re: [PATCH v14 00/42] virtio pci support VIRTIO_F_RING_RESET

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 30 Aug 2022 11:13:34 +0200, "Ricardo Cañuelo" <ricardo.canuelo@xxxxxxxxxxxxx> wrote:
> Hi Xuan,
>
> Patches 24 (virtio_ring: introduce virtqueue_resize())
> and 28 (virtio_ring: struct virtqueue introduce reset)
> break the tools/virtio build:

Can you test this patch?

diff --git a/tools/virtio/linux/virtio.h b/tools/virtio/linux/virtio.h
index 363b98228301..5d3440f474dd 100644
--- a/tools/virtio/linux/virtio.h
+++ b/tools/virtio/linux/virtio.h
@@ -14,6 +14,7 @@ struct virtio_device {
        u64 features;
        struct list_head vqs;
        spinlock_t vqs_list_lock;
+       const struct virtio_config_ops *config;
 };

 struct virtqueue {
@@ -23,7 +24,9 @@ struct virtqueue {
        struct virtio_device *vdev;
         unsigned int index;
         unsigned int num_free;
+       unsigned int num_max;
        void *priv;
+       bool reset;
 };

 /* Interfaces exported by virtio_ring. */
diff --git a/tools/virtio/linux/virtio_config.h b/tools/virtio/linux/virtio_config.h
index f2640e505c4e..2a8a70e2a950 100644
--- a/tools/virtio/linux/virtio_config.h
+++ b/tools/virtio/linux/virtio_config.h
@@ -3,6 +3,11 @@
 #include <linux/virtio.h>
 #include <uapi/linux/virtio_config.h>

+struct virtio_config_ops {
+       int (*disable_vq_and_reset)(struct virtqueue *vq);
+       int (*enable_vq_after_reset)(struct virtqueue *vq);
+};
+
 /*
  * __virtio_test_bit - helper to test feature bits. For use by transports.
  *                     Devices should normally use virtio_has_feature,
_______________________________________________
Virtualization mailing list
Virtualization@xxxxxxxxxxxxxxxxxxxxxxxxxx
https://lists.linuxfoundation.org/mailman/listinfo/virtualization




[Index of Archives]     [KVM Development]     [Libvirt Development]     [Libvirt Users]     [CentOS Virtualization]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite Forum]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux