DPDK patches and discussions
 help / color / mirror / Atom feed
From: Ouyang Changchun <changchun.ouyang@intel.com>
To: dev@dpdk.org
Subject: [dpdk-dev] [RFC PATCH 0/6] Support multiple queues in vhost
Date: Thu,  7 May 2015 21:00:39 +0800	[thread overview]
Message-ID: <1431003645-27889-1-git-send-email-changchun.ouyang@intel.com> (raw)

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	other threads:[~2015-05-07 13:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-07 13:00 Ouyang Changchun [this message]
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 1/6] ixgbe: Support VMDq RSS in non-SRIOV environment Ouyang Changchun
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 2/6] lib_vhost: Support multiple queues in virtio dev Ouyang Changchun
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 3/6] lib_vhost: Set memory layout for multiple queues mode Ouyang Changchun
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 4/6] vhost: Add new command line option: rxq Ouyang Changchun
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 5/6] vhost: Support multiple queues Ouyang Changchun
2015-05-07 13:00 ` [dpdk-dev] [RFC PATCH 6/6] virtio: Resolve for control queue Ouyang Changchun

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1431003645-27889-1-git-send-email-changchun.ouyang@intel.com \
    --to=changchun.ouyang@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).