From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [143.182.124.21]) by dpdk.org (Postfix) with ESMTP id 3ED6168C3 for ; Wed, 28 May 2014 10:10:30 +0200 (CEST) Received: from azsmga001.ch.intel.com ([10.2.17.19]) by azsmga101.ch.intel.com with ESMTP; 28 May 2014 01:10:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.98,926,1392192000"; d="scan'208";a="437930795" Received: from shilc102.sh.intel.com ([10.239.39.44]) by azsmga001.ch.intel.com with ESMTP; 28 May 2014 01:06:45 -0700 Received: from shecgisg004.sh.intel.com (shecgisg004.sh.intel.com [10.239.29.89]) by shilc102.sh.intel.com (8.13.6/8.13.6/SuSE Linux 0.8) with ESMTP id s4S86f6b004448; Wed, 28 May 2014 16:06:43 +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 s4S86c7A001390; Wed, 28 May 2014 16:06:40 +0800 Received: (from couyang@localhost) by shecgisg004.sh.intel.com (8.13.6/8.13.6/Submit) id s4S86cc4001386; Wed, 28 May 2014 16:06:38 +0800 From: Ouyang Changchun To: dev@dpdk.org Date: Wed, 28 May 2014 16:06:35 +0800 Message-Id: <1401264398-1289-1-git-send-email-changchun.ouyang@intel.com> X-Mailer: git-send-email 1.7.0.7 Subject: [dpdk-dev] [PATCH v3 0/3] Support zero copy RX/TX in user space 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: Wed, 28 May 2014 08:10:30 -0000 This patch v3 fixes some errors and warnings reported by checkpatch.pl, please ignore previous 2 patches: patch v1 and patch v2, only apply this v3 patch for zero copy RX/TX in user space vhost. This patch series support user space vhost zero copy. It removes packets copying between host and guest in RX/TX. And it introduces an extra ring to store the detached mbufs. At initialization stage all mbufs put into this ring; when one guest starts, vhost gets the available buffer address allocated by guest for RX and translates them into host space addresses, then attaches them to mbufs and puts the attached mbufs into mempool. Queue starting and DMA refilling will get mbufs from mempool and use them to set the DMA addresses. For TX, it gets the buffer addresses of available packets to be transmitted from guest and translates them to host space addresses, then attaches them to mbufs and puts them to TX queues. After TX finishes, it pulls mbufs out from mempool, detaches them and puts them back into the extra ring. This patch series also implement queue start and stop functionality in IXGBE PMD; and enable hardware loopback for VMDQ mode in IXGBE PMD. Ouyang Changchun (3): Add API to support queue start and stop functionality for RX/TX. Implement queue start and stop functionality in IXGBE PMD; Enable hardware loopback for VMDQ mode in IXGBE PMD. Support user space vhost zero copy, it removes packets copying between host and guest in RX/TX. examples/vhost/main.c | 1476 ++++++++++++++++++++++++++++-- examples/vhost/virtio-net.c | 186 +++- examples/vhost/virtio-net.h | 23 +- lib/librte_eal/linuxapp/eal/eal_memory.c | 2 +- lib/librte_ether/rte_ethdev.c | 104 +++ lib/librte_ether/rte_ethdev.h | 80 ++ lib/librte_pmd_ixgbe/ixgbe_ethdev.c | 4 + lib/librte_pmd_ixgbe/ixgbe_ethdev.h | 8 + lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 239 ++++- lib/librte_pmd_ixgbe/ixgbe_rxtx.h | 6 + 10 files changed, 2028 insertions(+), 100 deletions(-) -- 1.9.0