linux/drivers/virtio
Xuan Zhuo c790e8e181 virtio_ring: introduce virtqueue_resize()
Introduce virtqueue_resize() to implement the resize of vring.
Based on these, the driver can dynamically adjust the size of the vring.
For example: ethtool -G.

virtqueue_resize() implements resize based on the vq reset function. In
case of failure to allocate a new vring, it will give up resize and use
the original vring.

During this process, if the re-enable reset vq fails, the vq can no
longer be used. Although the probability of this situation is not high.

The parameter recycle is used to recycle the buffer that is no longer
used.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220801063902.129329-25-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
2022-08-11 04:06:40 -04:00
..
Kconfig drivers/virtio: Clarify CONFIG_VIRTIO_MEM for unsupported architectures 2022-08-11 04:06:38 -04:00
Makefile virtio-pci: introduce legacy device module 2021-11-01 04:30:34 -04:00
virtio.c virtio: disable notification hardening by default 2022-06-24 02:49:48 -04:00
virtio_balloon.c virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_dma_buf.c dma-buf: move dma-buf symbols into the DMA_BUF module namespace 2021-10-25 14:53:08 +02:00
virtio_input.c virtio: wrap config->reset calls 2022-01-14 18:50:52 -05:00
virtio_mem.c drivers: virtio_mem: use pageblock size as the minimum virtio_mem size. 2022-05-13 07:20:13 -07:00
virtio_mmio.c virtio: record the maximum queue num supported by the device. 2022-08-11 04:06:38 -04:00
virtio_pci_common.c virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_pci_common.h virtio: Replace unsigned with unsigned int 2022-05-31 12:45:09 -04:00
virtio_pci_legacy.c virtio: record the maximum queue num supported by the device. 2022-08-11 04:06:38 -04:00
virtio_pci_legacy_dev.c virtio/virtio_pci_legacy_dev: ensure the correct return value 2022-01-14 18:50:53 -05:00
virtio_pci_modern.c virtio: record the maximum queue num supported by the device. 2022-08-11 04:06:38 -04:00
virtio_pci_modern_dev.c virtio: Remove unnecessary variable assignments 2022-06-24 02:49:48 -04:00
virtio_ring.c virtio_ring: introduce virtqueue_resize() 2022-08-11 04:06:40 -04:00
virtio_vdpa.c virtio: record the maximum queue num supported by the device. 2022-08-11 04:06:38 -04:00