OSDN Git Service

vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail
authorEugenio Pérez <eperezma@redhat.com>
Tue, 23 Aug 2022 18:30:34 +0000 (20:30 +0200)
committerJason Wang <jasowang@redhat.com>
Fri, 2 Sep 2022 02:22:39 +0000 (10:22 +0800)
commitbe4278b65fc1be8fce87e1e7c01bc52602d304eb
treec4a71eeaca1ef1911f0ff77bab60938386c20168
parent7a7f87e94c4e75ca177564491595dd17b7e41a62
vdpa: extract vhost_vdpa_net_cvq_add from vhost_vdpa_net_handle_ctrl_avail

So we can reuse it to inject state messages.

Signed-off-by: Eugenio Pérez <eperezma@redhat.com>
Acked-by: Jason Wang <jasowang@redhat.com>
--
v7:
* Remove double free error

v6:
* Do not assume in buffer sent to the device is sizeof(virtio_net_ctrl_ack)

v5:
* Do not use an artificial !NULL VirtQueueElement
* Use only out size instead of iovec dev_buffers for these functions.

Signed-off-by: Jason Wang <jasowang@redhat.com>
net/vhost-vdpa.c