OSDN Git Service

vdpa: Use iovec for vhost_vdpa_net_cvq_add()
authorHawkins Jiawei <yin31149@gmail.com>
Fri, 13 Oct 2023 08:09:36 +0000 (16:09 +0800)
committerMichael S. Tsirkin <mst@redhat.com>
Wed, 18 Oct 2023 14:41:49 +0000 (10:41 -0400)
commit0e6bff0d43bf04c6e7a16c2775879816ca056b3d
treea5d68f05d349d2248173b04540d8c9389d418823
parentec6f9f135d5e5596ab0258da2ddd048f1fd8c359
vdpa: Use iovec for vhost_vdpa_net_cvq_add()

Next patches in this series will no longer perform an
immediate poll and check of the device's used buffers
for each CVQ state load command. Consequently, there
will be multiple pending buffers in the shadow VirtQueue,
making it a must for every control command to have its
own buffer.

To achieve this, this patch refactor vhost_vdpa_net_cvq_add()
to accept `struct iovec`, which eliminates the coupling of
control commands to `s->cvq_cmd_out_buffer` and `s->status`,
allowing them to use their own buffer.

Signed-off-by: Hawkins Jiawei <yin31149@gmail.com>
Acked-by: Eugenio PĂ©rez <eperezma@redhat.com>
Message-Id: <8a328f146fb043f34edb75ba6d043d2d6de88f99.1697165821.git.yin31149@gmail.com>
Reviewed-by: Michael S. Tsirkin <mst@redhat.com>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
net/vhost-vdpa.c