From patchwork Wed Mar 14 16:24:16 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: junjie.j.chen@intel.com X-Patchwork-Id: 36088 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1F2332BF1; Wed, 14 Mar 2018 09:45:57 +0100 (CET) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by dpdk.org (Postfix) with ESMTP id 9CF702A66 for ; Wed, 14 Mar 2018 09:45:55 +0100 (CET) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 14 Mar 2018 01:45:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,469,1515484800"; d="scan'208";a="211149758" Received: from dpdk-dev.sh.intel.com ([10.67.111.147]) by fmsmga006.fm.intel.com with ESMTP; 14 Mar 2018 01:45:52 -0700 From: Junjie Chen To: jianfeng.tan@intel.com, maxime.coquelin@redhat.com, yliu@fridaylinux.org Cc: dev@dpdk.org, Junjie Chen Date: Wed, 14 Mar 2018 12:24:16 -0400 Message-Id: <1521044656-105962-1-git-send-email-junjie.j.chen@intel.com> X-Mailer: git-send-email 2.0.1 In-Reply-To: <1520590048-151284-1-git-send-email-junjie.j.chen@intel.com> References: <1520590048-151284-1-git-send-email-junjie.j.chen@intel.com> Subject: [dpdk-dev] [PATCH v4] doc: add driver limitation for vhost dequeue zero copy X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In vhost-switch example, when binding nic to vfio-pci with iommu enabled, dequeue zero copy cannot work in VM2NIC mode due to no iommu dma mapping is setup for guest memory currently. Signed-off-by: Junjie Chen Reviewed-by: Jianfeng Tan Reviewed-by: Maxime Coquelin --- Changes in V4: - make words more accurate Changes in V3: - update limitation to iommu Changes in V2: - add doc in vhost lib doc/guides/prog_guide/vhost_lib.rst | 5 +++++ doc/guides/sample_app_ug/vhost.rst | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index 18227b6..b49e36e 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -83,6 +83,11 @@ The following is an overview of some key Vhost API functions: of those segments, thus the fewer the segments, the quicker we will get the mapping. NOTE: we may speed it by using tree searching in future. + * zero copy can not work when using vfio-pci with iommu mode currently, this + is because we don't setup iommu dma mapping for guest memory. If you have + to use vfio-pci driver, please insert vfio-pci kernel module in noiommu + mode. + - ``RTE_VHOST_USER_IOMMU_SUPPORT`` IOMMU support will be enabled when this flag is set. It is disabled by diff --git a/doc/guides/sample_app_ug/vhost.rst b/doc/guides/sample_app_ug/vhost.rst index a4bdc6a..f0bb169 100644 --- a/doc/guides/sample_app_ug/vhost.rst +++ b/doc/guides/sample_app_ug/vhost.rst @@ -147,7 +147,10 @@ retries on an RX burst, it takes effect only when rx retry is enabled. The default value is 15. **--dequeue-zero-copy** -Dequeue zero copy will be enabled when this option is given. +Dequeue zero copy will be enabled when this option is given. it is worth to +note that if NIC is binded to driver with iommu enabled, dequeue zero copy +cannot work at VM2NIC mode (vm2vm=0) due to currently we don't setup iommu +dma mapping for guest memory. **--vlan-strip 0|1** VLAN strip option is removed, because different NICs have different behaviors