From patchwork Tue Jun 21 07:21:31 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Ding, Xuan" X-Patchwork-Id: 113136 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5D8FDA00C3; Tue, 21 Jun 2022 09:25:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F2DA54069C; Tue, 21 Jun 2022 09:25:28 +0200 (CEST) Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by mails.dpdk.org (Postfix) with ESMTP id 9BD9A40151 for ; Tue, 21 Jun 2022 09:25:26 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655796327; x=1687332327; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=R7EC1tRGx2y+rKYYlhTenZhoJVnz1pNlWs445hQgeSw=; b=hHu/mvk2hjplZHsOGLTZBi2yzNP4Vlt3PrIqutmwLLao2BcH2/4el9Yc oRFtX8MdTKyTTBIsup+IE6cJ5xm9rt9pxZYptBnfXAjbWGzXbaoaae0wL X7s26It6Xx9o6BEykc2tsfhfC+hhg8X0MhSuTsCkpEIJTNdIPCrojj2sZ MFhgiWW6SCsISL3yeltdGA5whXjkgddsLkBoE8iLQdtfSg15+ZVSqn3ox qzgN6JqSejzz2kZ70bbzVdeHcOR1VZnnQBO1oKs5TCrcRfS9soClZ+1Jh hmx/E7d3HWntDqEysHGDXkT7s34YAvyaexKJ6rsCvJZz2XcjyjzrMHGc5 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10384"; a="366373430" X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="366373430" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Jun 2022 00:25:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,209,1650956400"; d="scan'208";a="655018491" Received: from npg-dpdk-xuan-cbdma.sh.intel.com ([10.67.110.228]) by fmsmga004.fm.intel.com with ESMTP; 21 Jun 2022 00:25:15 -0700 From: xuan.ding@intel.com To: maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: dev@dpdk.org, jiayu.hu@intel.com, Xuan Ding Subject: [PATCH v2] doc: update async enqueue API usage Date: Tue, 21 Jun 2022 07:21:31 +0000 Message-Id: <20220621072131.14756-1-xuan.ding@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220617093413.94960-1-xuan.ding@intel.com> References: <20220617093413.94960-1-xuan.ding@intel.com> X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org From: Xuan Ding This patch updates the correct usage for async enqueue APIs. The rte_vhost_poll_enqueue_completed() needs to be called in time to notify the guest of completed packets and avoid packet loss. Signed-off-by: Xuan Ding Reviewed-by: Chenbo Xia --- v2: * refine doc and commit log --- doc/guides/prog_guide/vhost_lib.rst | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/doc/guides/prog_guide/vhost_lib.rst b/doc/guides/prog_guide/vhost_lib.rst index cd3f6caa9a..628db3fc38 100644 --- a/doc/guides/prog_guide/vhost_lib.rst +++ b/doc/guides/prog_guide/vhost_lib.rst @@ -480,6 +480,14 @@ the same vring with their own DMA virtual channels. Besides, the number of DMA devices is limited. For the purpose of scaling, it's necessary to support sharing DMA channels among vrings. +* Async enqueue API usage + + In async enqueue path, rte_vhost_poll_enqueue_completed() needs to be + called in time to notify the guest of DMA copy completed packets. + Moreover, calling rte_vhost_submit_enqueue_burst() all the time but + not poll completed will cause the DMA ring to be full, which will + result in packet loss eventually. + Recommended IOVA mode in async datapath ---------------------------------------