From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 208845697 for ; Thu, 7 May 2015 15:00:55 +0200 (CEST) Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga101.fm.intel.com with ESMTP; 07 May 2015 06:00:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.13,384,1427785200"; d="scan'208";a="725300086" Received: from shvmail01.sh.intel.com ([10.239.29.42]) by orsmga002.jf.intel.com with ESMTP; 07 May 2015 06:00:51 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shvmail01.sh.intel.com with ESMTP id t47D0n85004197; Thu, 7 May 2015 21:00:49 +0800 Received: from shecgisg004.sh.intel.com (localhost [127.0.0.1]) by shecgisg004.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id t47D0jEd027967; Thu, 7 May 2015 21:00:47 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id t47D0j5A027963; Thu, 7 May 2015 21:00:45 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Thu, 7 May 2015 21:00:39 +0800 Message-Id: <1431003645-27889-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.12.2 Subject: [dpdk-dev] [RFC PATCH 0/6] Support multiple queues in vhost X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 May 2015 13:00:58 -0000 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