virtio: Extend vhost multi-queues support beyond 8 queue pairs 79/30379/11
authorSteven Luong <sluong@cisco.com>
Fri, 11 Dec 2020 04:44:22 +0000 (20:44 -0800)
committerDamjan Marion <dmarion@me.com>
Fri, 25 Dec 2020 11:45:09 +0000 (11:45 +0000)
commit2c1084a69bccac812bf2d763b113d1e5b7f08686
tree5581bd1ac229153b373777e34d36fa5738f48de7
parent05bc31be20849e5994eb798d9eed0ad506a57d18
virtio: Extend vhost multi-queues support beyond 8 queue pairs

Current vhost multi-queues support has a hard limit of 8 queue pairs
due to static vring array. This limit was raised in qemu. VPP should
support more than 8 queue pairs also.

Change static vring allocation to dynamic. When the interface is
created, we allocate 8 queue pairs to begin with. We also keep track
of how many queue pairs that the interface actually uses.
We reply VHOST_USER_GET_QUEUE_NUM with 128 as our maximum number of
support queue pair. When qemu starts initializing queue pair greater
than 8, we expand the vrings as needed on demand.

Type: improvement

Signed-off-by: Steven Luong <sluong@cisco.com>
Change-Id: I4a02d987d52d1bbe601b00e71f650fe6ebfcc0d7
src/vnet/devices/virtio/vhost_user.c
src/vnet/devices/virtio/vhost_user.h
src/vnet/devices/virtio/vhost_user_output.c