mirror of
https://github.com/OpenAMP/open-amp.git
synced 2026-09-28 16:17:23 +08:00
virtio: add create_virtqueues and delete_virtqueues in virtio_dispatch
This is the first step to decoupling the virtio device and transport layer. Signed-off-by: Bowen Wang <wangbowen6@xiaomi.com>
This commit is contained in:
committed by
Arnaud Pouliquen
parent
dcc21e6657
commit
7f906105a9
File diff suppressed because it is too large
Load Diff
@@ -104,6 +104,14 @@ int virtio_create_virtqueues(struct virtio_device *vdev, unsigned int flags,
|
||||
int ret;
|
||||
(void)flags;
|
||||
|
||||
if (!vdev)
|
||||
return -EINVAL;
|
||||
|
||||
if (vdev->func && vdev->func->create_virtqueues) {
|
||||
return vdev->func->create_virtqueues(vdev, flags, nvqs,
|
||||
names, callbacks);
|
||||
}
|
||||
|
||||
num_vrings = vdev->vrings_num;
|
||||
if (nvqs > num_vrings)
|
||||
return ERROR_VQUEUE_INVLD_PARAM;
|
||||
|
||||
Reference in New Issue
Block a user