From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id ACF14A0093; Mon, 20 Jun 2022 03:43:10 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9D3234069C; Mon, 20 Jun 2022 03:43:10 +0200 (CEST) Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mails.dpdk.org (Postfix) with ESMTP id 32EFA40150 for ; Mon, 20 Jun 2022 03:43:09 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655689389; x=1687225389; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=nePFEpWCqqpBdjxn4B0SvjsLEo6+R9xMyWiDi/UZOjo=; b=NWYlVvQUujiwYdW9nKdSyIrvdl6EoS9JGAGPf5EE2+bQEJQaqtjm0MV7 R1B/REf/2S74oz3FurWZDOT3td8XHZEXMd27Ee+n1wyslyO99tuHz8TXF wNyl35t26WIuqAmZvlrPbBS1gDIAuS+HtBfp0knuUxnovzWJMgkmj98AC 6xp2lzZiQ5rOwdmSaJQBm3uR2kKWwiaKLxbaH61J9vKx6n+FhaSjxom8F jy0VCZDawMe+Rh3h9dmuxq8TxLmgMSbsiJ4MYUv5syC2KF5mzrSLNoNAq bZ2gTy9s502K0vUd1y6bxxc+EdJyOhLU85+Q9a997H58xfB22hyniNSMH g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="280511102" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="280511102" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 18:43:08 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="642874760" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by fmsmga008.fm.intel.com with ESMTP; 19 Jun 2022 18:43:08 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 19 Jun 2022 18:43:07 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27; Sun, 19 Jun 2022 18:43:07 -0700 Received: from fmsmsx612.amr.corp.intel.com ([10.18.126.92]) by fmsmsx612.amr.corp.intel.com ([10.18.126.92]) with mapi id 15.01.2308.027; Sun, 19 Jun 2022 18:43:07 -0700 From: "Hu, Jiayu" To: "Ding, Xuan" , "maxime.coquelin@redhat.com" , "Xia, Chenbo" CC: "dev@dpdk.org" Subject: RE: [PATCH] doc: update async enqueue API usage Thread-Topic: [PATCH] doc: update async enqueue API usage Thread-Index: AQHYgi3dOR1AeeH+KkCj9ah2qpe2161Xh2JQ Date: Mon, 20 Jun 2022 01:43:07 +0000 Message-ID: <64663b8d8c0c4a99b34438c3ccc3ba67@intel.com> References: <20220617093413.94960-1-xuan.ding@intel.com> In-Reply-To: <20220617093413.94960-1-xuan.ding@intel.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-reaction: no-action dlp-version: 11.6.500.17 dlp-product: dlpe-windows x-originating-ip: [10.239.127.36] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 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 Hi Xuan, > -----Original Message----- > From: Ding, Xuan > Sent: Friday, June 17, 2022 5:34 PM > To: maxime.coquelin@redhat.com; Xia, Chenbo > Cc: dev@dpdk.org; Hu, Jiayu ; Ding, Xuan > > Subject: [PATCH] doc: update async enqueue API usage >=20 > From: Xuan Ding >=20 > This patch updates the correct usage for async enqueue APIs. > The rte_vhost_poll_enqueue_completed() needs to be called in time to avoi= d > packet loss due to full dma ring. >=20 > Signed-off-by: Xuan Ding > --- > doc/guides/prog_guide/vhost_lib.rst | 9 +++++++++ > 1 file changed, 9 insertions(+) >=20 > diff --git a/doc/guides/prog_guide/vhost_lib.rst > b/doc/guides/prog_guide/vhost_lib.rst > index cd3f6caa9a..9cdd7da154 100644 > --- a/doc/guides/prog_guide/vhost_lib.rst > +++ b/doc/guides/prog_guide/vhost_lib.rst > @@ -488,3 +488,12 @@ For PA mode, page by page mapping may exceed > IOMMU's max capability, better to use 1G guest hugepage. >=20 > For UIO driver, any VFIO related error message can be ignored. > + > +Async enqueue API usage > +----------------------- I think it's better to make it as a sub-section of "Vhost asynchronous data= path". > + > +In async enqueue path, rte_vhost_poll_enqueue_completed() needs to be > +called in time. Otherwise, calling rte_vhost_submit_enqueue_burst() all > +the time will cause the DMA ring to be full, which will result in > +packet loss eventually. There are two main reasons of calling rte_vhost_poll_enqueue_completed() ti= mely, IMO: 1. notify the guest of DMA copy completed packets; 2. in case of DMA ring size is smaller than vring size, it can avoid packet= drop caused by DMA ring full. Thanks, Jiayu > + > -- > 2.17.1