This RFC patch set supports the multiple queues for each virtio device in vhost.
The vhost-user is used to enable the multiple queues feature, It's not ready 
for vhost-cuse.

One prerequisite to enable this feature is that a QEMU patch plus a fix is 
required to apply
on QEMU, pls refer to this link for the details of the patch and the fix:
http://lists.nongnu.org/archive/html/qemu-devel/2015-04/msg00917.html

Basicaly vhost sample leverages the VMDq+RSS in HW to receive packets and 
distribute them
into different queue in the pool according to their 5 tuples.

On the other hand, it enables multiple queues mode in vhost/virtio layer by 
setting the queue
number as the value larger than 1.

HW queue numbers in pool is required to be exactly same with the queue number 
in each virtio
device, e.g. rxq = 4, the queue number is 4, it means there are 4 HW queues in 
each VMDq pool,
and 4 queues in each virtio device/port, every queue in pool maps to one qeueu 
in virtio device.

=========================================
==================|   |==================|
       vport0     |   |      vport1      |
---  ---  ---  ---|   |---  ---  ---  ---|
q0 | q1 | q2 | q3 |   |q0 | q1 | q2 | q3 |
/\= =/\= =/\= =/\=|   |/\= =/\= =/\= =/\=|
||   ||   ||   ||      ||   ||   ||   ||
||   ||   ||   ||      ||   ||   ||   ||
||= =||= =||= =||=|   =||== ||== ||== ||=|
q0 | q1 | q2 | q3 |   |q0 | q1 | q2 | q3 |

------------------|   |------------------|
     VMDq pool0   |   |    VMDq pool1    |
==================|   |==================|

In RX side, it firstly polls each queue of the pool and gets the packets from
it and enqueue them into its corresponding queue in virtio device/port.
In TX side, it dequeue packets from each queue of virtio device/port and send
to either physical port or another virtio device according to its destination
MAC address.

It includes a workaround here in virtio as control queue not work for vhost-user
multiple queues. It needs further investigate to root the cause.

Changchun Ouyang (6):
  ixgbe: Support VMDq RSS in non-SRIOV environment
  lib_vhost: Support multiple queues in virtio dev
  lib_vhost: Set memory layout for multiple queues mode
  vhost: Add new command line option: rxq
  vhost: Support multiple queues
  virtio: Resolve for control queue

 examples/vhost/main.c                         | 199 +++++++++++++++++---------
 lib/librte_ether/rte_ethdev.c                 |  40 ++++++
 lib/librte_pmd_ixgbe/ixgbe_rxtx.c             |  82 +++++++++--
 lib/librte_pmd_virtio/virtio_ethdev.c         |   6 +
 lib/librte_vhost/rte_virtio_net.h             |  25 +++-
 lib/librte_vhost/vhost_cuse/virtio-net-cdev.c |  57 ++++----
 lib/librte_vhost/vhost_rxtx.c                 |  53 +++----
 lib/librte_vhost/vhost_user/virtio-net-user.c | 100 +++++++------
 lib/librte_vhost/virtio-net.c                 | 143 +++++++++++-------
 9 files changed, 475 insertions(+), 230 deletions(-)

-- 
1.8.4.2

Reply via email to