]> git.baikalelectronics.ru Git - kernel.git/commit
virtio_ring: split: introduce virtqueue_resize_split()
authorXuan Zhuo <xuanzhuo@linux.alibaba.com>
Mon, 1 Aug 2022 06:38:36 +0000 (14:38 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Thu, 11 Aug 2022 08:06:39 +0000 (04:06 -0400)
commit05d9543ff51238beb65effd3276d07aa7ce39973
tree755fbd0c07bc95e2349ec6724ef856bc8351726c
parenteb8c4850fefb471dbcd3e5752a4fa0ab16bb73e4
virtio_ring: split: introduce virtqueue_resize_split()

virtio ring split supports resize.

Only after the new vring is successfully allocated based on the new num,
we will release the old vring. In any case, an error is returned,
indicating that the vring still points to the old vring.

In the case of an error, re-initialize(virtqueue_reinit_split()) the
virtqueue to ensure that the vring can be used.

Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220801063902.129329-17-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
drivers/virtio/virtio_ring.c