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 8A282A0093; Mon, 20 Jun 2022 04:10:33 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2C64A40223; Mon, 20 Jun 2022 04:10:33 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 6D05440150 for ; Mon, 20 Jun 2022 04:10:31 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1655691031; x=1687227031; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=C8WFHlCF++6F0obgLRYyas3FZJbUGc1LpnWj/FV68c8=; b=dnWPbpF9kbAsdvP1Zq2FdG6HbD3Fqj9gaZZULa+7OEklKIzXJwbMrxAT Qeaq/r8MwTcplhCFePJkcFUh9EAX9UnFfQ4dTjTH/ejC+ynOEkuANvilJ TLkBG+oFwVoPNHwG1Op0xuRY4TGT+kwbyAzFd90+Y2JqzhPoAnbP97UNU oOcyq6X3nndamuSg+h7IpKHO8TLXOHXuIMirMJyPMQzts+JGNuEfgUT2x Sm8zBe15grW9m5w0y/MYQVNJzNY402FQOIJLvPjUTAbiudGcEi360bf7t YpGax5YmCxwox22rVf4xmFTBJLlsYzLdvX3WiX0sO4PuJz3MiS8OPPDON g==; X-IronPort-AV: E=McAfee;i="6400,9594,10380"; a="279834035" X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="279834035" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 19 Jun 2022 19:10:30 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.92,306,1650956400"; d="scan'208";a="537483469" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga003.jf.intel.com with ESMTP; 19 Jun 2022 19:10:30 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx601.amr.corp.intel.com (10.18.126.81) 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 19:10:29 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx610.amr.corp.intel.com (10.18.126.90) 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 19:10:29 -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 19:10:29 -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+KkCj9ah2qpe2161Xh2JQgAAIJaA= Date: Mon, 20 Jun 2022 02:10:29 +0000 Message-ID: <31178840c26144ebabd3752c9afb7109@intel.com> References: <20220617093413.94960-1-xuan.ding@intel.com> <64663b8d8c0c4a99b34438c3ccc3ba67@intel.com> In-Reply-To: <64663b8d8c0c4a99b34438c3ccc3ba67@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: Hu, Jiayu > Sent: Monday, June 20, 2022 9:43 AM > To: Ding, Xuan ; maxime.coquelin@redhat.com; Xia, > Chenbo > Cc: dev@dpdk.org > Subject: RE: [PATCH] doc: update async enqueue API usage >=20 > Hi Xuan, >=20 > > -----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 > > > > 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 > > avoid packet loss due to full dma ring. > > > > Signed-off-by: Xuan Ding > > --- > > doc/guides/prog_guide/vhost_lib.rst | 9 +++++++++ > > 1 file changed, 9 insertions(+) > > > > 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. > > > > For UIO driver, any VFIO related error message can be ignored. > > + > > +Async enqueue API usage > > +----------------------- >=20 > I think it's better to make it as a sub-section of "Vhost asynchronous da= ta > path". >=20 > > + > > +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. >=20 > There are two main reasons of calling rte_vhost_poll_enqueue_completed() > timely, 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 r= ing > full. I'd like to clarify #2 a little: not only for the case that DMA ring size <= vring size. Even if DMA ring size > vring size, it's possible dropping packets as a res= ult of DMA ring full. Thanks, Jiayu >=20 > Thanks, > Jiayu >=20 >=20 > > + > > -- > > 2.17.1