mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-01 14:53:54 -06:00
vhost-net: control virtqueue support
We assume there's no cvq in the past, this is not true when we need control virtqueue support for vhost-user backends. So this patch implements the control virtqueue support for vhost-net. As datapath, the control virtqueue is also required to be coupled with the NetClientState. The vhost_net_start/stop() are tweaked to accept the number of datapath queue pairs plus the the number of control virtqueue for us to start and stop the vhost device. Signed-off-by: Jason Wang <jasowang@redhat.com> Message-Id: <20211020045600.16082-7-jasowang@redhat.com> Reviewed-by: Michael S. Tsirkin <mst@redhat.com> Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
This commit is contained in:
parent
2f849dbdb2
commit
05ba3f63d1
4 changed files with 40 additions and 17 deletions
|
@ -21,8 +21,10 @@ typedef struct VhostNetOptions {
|
|||
uint64_t vhost_net_get_max_queues(VHostNetState *net);
|
||||
struct vhost_net *vhost_net_init(VhostNetOptions *options);
|
||||
|
||||
int vhost_net_start(VirtIODevice *dev, NetClientState *ncs, int total_queues);
|
||||
void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs, int total_queues);
|
||||
int vhost_net_start(VirtIODevice *dev, NetClientState *ncs,
|
||||
int data_queue_pairs, int cvq);
|
||||
void vhost_net_stop(VirtIODevice *dev, NetClientState *ncs,
|
||||
int data_queue_pairs, int cvq);
|
||||
|
||||
void vhost_net_cleanup(VHostNetState *net);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue