diff options
author | Xuan Zhuo <xuanzhuo@linux.alibaba.com> | 2022-08-01 09:38:56 +0300 |
---|---|---|
committer | Michael S. Tsirkin <mst@redhat.com> | 2022-08-11 11:06:41 +0300 |
commit | fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4 (patch) | |
tree | 2983d288a826fc5dbb02fea006919b731deb0199 /include/linux/virtio_config.h | |
parent | fbed86abba6e0472d98079790e58060e4332608a (diff) | |
download | linux-fe3dc04e31aa51f91dc7f741a5f76cc4817eb5b4.tar.xz |
virtio: add helper virtio_find_vqs_ctx_size()
Introduce helper virtio_find_vqs_ctx_size() to call find_vqs and specify
the maximum size of each vq ring.
Signed-off-by: Xuan Zhuo <xuanzhuo@linux.alibaba.com>
Acked-by: Jason Wang <jasowang@redhat.com>
Message-Id: <20220801063902.129329-37-xuanzhuo@linux.alibaba.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
Diffstat (limited to 'include/linux/virtio_config.h')
-rw-r--r-- | include/linux/virtio_config.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/linux/virtio_config.h b/include/linux/virtio_config.h index 888f7e96f0c7..6adff09f7170 100644 --- a/include/linux/virtio_config.h +++ b/include/linux/virtio_config.h @@ -241,6 +241,18 @@ int virtio_find_vqs_ctx(struct virtio_device *vdev, unsigned nvqs, ctx, desc); } +static inline +int virtio_find_vqs_ctx_size(struct virtio_device *vdev, u32 nvqs, + struct virtqueue *vqs[], + vq_callback_t *callbacks[], + const char * const names[], + u32 sizes[], + const bool *ctx, struct irq_affinity *desc) +{ + return vdev->config->find_vqs(vdev, nvqs, vqs, callbacks, names, sizes, + ctx, desc); +} + /** * virtio_synchronize_cbs - synchronize with virtqueue callbacks * @vdev: the device |