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 33772A04FD; Mon, 3 Oct 2022 18:21:58 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E706540DFB; Mon, 3 Oct 2022 18:21:57 +0200 (CEST) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 2FFE340695 for ; Mon, 3 Oct 2022 18:21:56 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 61E0D32008FD; Mon, 3 Oct 2022 12:21:53 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Mon, 03 Oct 2022 12:21:53 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1664814112; x= 1664900512; bh=FTzWFilY5Y2htnPu+WoiB1MGbSWtgH58bSLvt9q9LKY=; b=a 4506mV3MjD5mRAwwFNMbsjinTMZT4wEF26qqNjFbhDaFwjiwfyyInelWD7jjpfLd 53LrJVWQQzkFZ2N4FG48BFmsoOnmQ6q6nmCPTofP7EeDlRQ5l3Wr9AgyUSXttDcz 8H5pEp8TT8cAKenlZ1iGJbSdkhIleuqcNPcBCcRzOYBOvrTeCOy5UJtKe/ZaMpOb k/k+e1Wlnka8zuw0d4ektl1To9WtWfNTUR6N/gJ0MSZYhTPadL0l+Rf2BhYw4s98 /J7BXGKAig27Jy25lydnu6+ym1HXMQ0Q7M6T+Kp30XKlAKc1Y+x6vw1sdbgVvS6Z eayn7ucaOpHK9FeKAQ82w== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1664814112; x= 1664900512; bh=FTzWFilY5Y2htnPu+WoiB1MGbSWtgH58bSLvt9q9LKY=; b=K dWI+gy6dcSYNnyXuLYDJi1OOC/2HjFTOOEqvkFhOEe6Yg7g9/kmxUu4/Fxdy3wyD iPHbgW3R4EsUFRrWUPMNqPKZ5h7Xp8XgrE0zcpVnfmbfc51oxjQs8nNqa6VI8XoX xOJOSmuLELqPmgswEy7Qr0DJm7soxG5du6u5kG3FtqqJKMQbQD5pnsW+abeKJWLw o1Wqv8spmzjVtXMUR9UtDMO6PUwTFToHpjCqU4itTzyPoF1py9l91AdaGRq9ftWx fh6Mhk5dDeFh6vGF8HHQElEzIat/pxxrDZooh8sDBZ1NAwS/P1Twj4SWaE37wT/V F8a+wR2/7nzx9YS4OsvsA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrfeehledgleelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedtjeeiieefhedtfffgvdelteeufeefheeujefgueetfedttdei kefgkeduhedtgfenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 3 Oct 2022 12:21:51 -0400 (EDT) From: Thomas Monjalon To: Chengwen Feng Cc: dev@dpdk.org, kevin.laatz@intel.com, Bruce Richardson Subject: Re: [PATCH v2] examples/dma: support DMA dequeue when no packet received Date: Mon, 03 Oct 2022 18:21:50 +0200 Message-ID: <7433532.nlapOpYt14@thomas> In-Reply-To: References: <20220725122200.47851-1-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 25/07/2022 14:48, Bruce Richardson: > On Mon, Jul 25, 2022 at 08:22:00PM +0800, Chengwen Feng wrote: > > Currently the example using DMA in asynchronous mode, which are: > > nb_rx = rte_eth_rx_burst(); > > if (nb_rx == 0) > > continue; > > ... > > dma_enqueue(); // enqueue the received packets copy request > > nb_cpl = dma_dequeue(); // get copy completed packets > > ... > > > > There are no waiting inside dma_dequeue(), and this is why it's called > > asynchronus. If there are no packet received, it won't call > > dma_dequeue(), but some packets may still in the DMA queue which > > enqueued in last cycle. As a result, when the traffic is stopped, the > > sent packets and received packets are unbalanced from the perspective > > of the traffic generator. > > > > The patch supports DMA dequeue when no packet received, it helps to > > judge the test result by comparing the sent packets with the received > > packets on traffic generator sides. > > > > Signed-off-by: Chengwen Feng > > Acked-by: Bruce Richardson Acked-by: Kevin Laatz Applied, thanks.