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 D6792A00C4; Mon, 25 Jul 2022 14:48:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B69F0410FA; Mon, 25 Jul 2022 14:48:29 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id D4C3640684 for ; Mon, 25 Jul 2022 14:48:27 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1658753308; x=1690289308; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=c9pU8Opt8mIZttYF0AQD62lFQfAgKvApLaDHS7pUF00=; b=Z0/0D8ldjpMYMVsXAVfqhAjiTobCs1SuGEd6Ipsn7RgWEWHuwp0y6cpR aZi05Ycb+Uy0fNvBYphudE5S/QcF1QYyImjHal1JdJVfkfIZdVYkxz1BO JL/GaO+/F7A/6etMGcSbi7bHKCQhiG9b5pTs6/yLNc7eIPj1yuEsDQimA /EMqmvnic0dAGKdDLl6SBT05FNMyLliydx1N0QeTIoxfudeKAnQsbtOgo TyCYeIZT3PZADAfNXzjE57dcBtAf/s5f45q1Kfpsp6eWRHtq0w/qvI3y9 9zfuvBNYkoI8yHYZ1Kse1gwKoN36jKuMhr/TCQCssS8Gvj4o1DZErJCR3 Q==; X-IronPort-AV: E=McAfee;i="6400,9594,10418"; a="267460471" X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="267460471" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Jul 2022 05:48:10 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.93,192,1654585200"; d="scan'208";a="627437318" Received: from orsmsx603.amr.corp.intel.com ([10.22.229.16]) by orsmga008.jf.intel.com with ESMTP; 25 Jul 2022 05:48:10 -0700 Received: from orsmsx609.amr.corp.intel.com (10.22.229.22) by ORSMSX603.amr.corp.intel.com (10.22.229.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28; Mon, 25 Jul 2022 05:48:10 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx609.amr.corp.intel.com (10.22.229.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.28 via Frontend Transport; Mon, 25 Jul 2022 05:48:10 -0700 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.171) by edgegateway.intel.com (134.134.137.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 25 Jul 2022 05:48:09 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z0qXNS4janV2dExuLGqkW3ddekxcvVGA3s/xWbANpED5CyJe9xzAyV94ecGIEAT6Scbu5XimaKriJWqndvtaz0evET3hA8k7BTw83Qf4R1F/sWcCenEG3nsVBA3mHHAnC0VbhlEpz9NGb435SZeZhFlUuPddOZnATF6DWj8KtM4y58CmXx+b5V16mNzLanTsMgcZnZg4SEagjY3AuK2C3eWhPxZx/DaK4j79XMMZvPvh8rsWAJSUgUBV+3tDG4Zs8mVEvxs2t7t8UcfmIZRtBEg/LFsdnVfMkBWaOsiGealM+WR2PzEsozFP7nQNET90aDadjOjKLM7RcXhV09CXDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=1TffVYrJxkOMTHvkOe2rUIk3GAo21okniaD7BIi52Ts=; b=BdGkw/yuDlz3Nti/qezV5pJUOwQTbmL7F0/aizjXRGMRjMgT25SdCQAsLFHFCtP8fHquTAB+46PmtY/EelYXxtDlR9k0ySfUDywqPrr6urYR6cdabOuMG8yhAowhgj2ObtgWvmh8hFpRvtfkzr64B1qI9TcGXE5GjhqvNmWedqKXmMMzRGtJiSs94q2bsKbDp/1efEiXbkrTORG5bH3sHflJMlm2O2hzzGd8uHXWciTbzVjHyJJTIr1FXdC/2viWTiHRXG3vXKqbYab+nelpw3C78Qzgc797hwCshhXVPvQQ1XH0F4x/EwCqBNOrrMaHLGX1tms07Gq/h1jxxQcBiw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) by SJ0PR11MB6743.namprd11.prod.outlook.com (2603:10b6:a03:47c::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5458.19; Mon, 25 Jul 2022 12:48:07 +0000 Received: from MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d]) by MWHPR11MB1629.namprd11.prod.outlook.com ([fe80::8e4:e1e9:a851:4b0d%5]) with mapi id 15.20.5458.024; Mon, 25 Jul 2022 12:48:07 +0000 Date: Mon, 25 Jul 2022 13:48:02 +0100 From: Bruce Richardson To: Chengwen Feng CC: , , Subject: Re: [PATCH v2] examples/dma: support DMA dequeue when no packet received Message-ID: References: <20220725122200.47851-1-fengchengwen@huawei.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20220725122200.47851-1-fengchengwen@huawei.com> X-ClientProxiedBy: LO4P265CA0238.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:350::11) To MWHPR11MB1629.namprd11.prod.outlook.com (2603:10b6:301:d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e81169fd-525d-430a-e8e6-08da6e3bec63 X-MS-TrafficTypeDiagnostic: SJ0PR11MB6743:EE_ X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 7hGxNttMXDtVKggNWRylkUTtMEQdn3jjDlMqIbcVLu5Iyo2nBRXKcp/HsNW/h+UFHWVDeWcQGrpgoTWpPTlKwV3O++5vMaGskJqm+0R/D+lA+hNhylofKOyUcmeTjC0ty9P0sY/WYKUYTnru60Ii05u8Bpw9lZGVRED98P7WHAxYPjl9qN895aJHeXGmzLMGIf5vhr1wNYlSlIejW2rSy/nclKwS5f7/MAlNIqdV/umF0z/zQKrW6QmfSf7YfG0xj7MgGmOb7SWGjyc8WrdCakLHblvAH1Wy1fg6WQq4WtGjjXkaUlMLKFqY/MGqunBpY/SbvAzIrtVHi0+VAVsD2+waae8sTb2soEx+3LYE5xvHg/IbD6VCkhawB4IMIi6x1mEDU59Sb1vzTOqLTklNIUC79VAviS/6CeCIczcDew+0BRG557+YpBFunEUwoQJADcfHCD6aIsr4fj+LEnMWhYp7+yQHgkH+qWpfESCTsIDcP5WSPifsrsTMGFgSHu3ks8fRNAkBf/QyVY+FYIbHpUuoTB7feobZWLQ9h6FEicHRd+dtlhefuORuDTLssQ3dDNcIdnrI1yHs7/JMwmc0Ss2/z7seMaH/h0ZsTQWvlqKK9bsuu9C1CC9VMxlnTExsmN0N2EsHaSo4ol2syjZVsdUOS6Hb+hWcogIk4pSSfrmyb7OemQUiu4AaCXUMLqvvtxJcMI9MY93aw9Q84h1/zmRyxWqUmQy9hAaM3ixQLqsQomx9UJxZijyaNuQ+ZHYm X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MWHPR11MB1629.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230016)(396003)(376002)(366004)(136003)(346002)(39860400002)(4744005)(44832011)(6486002)(5660300002)(38100700002)(82960400001)(8936002)(66476007)(478600001)(2906002)(6512007)(6666004)(26005)(41300700001)(6506007)(6916009)(83380400001)(66946007)(66556008)(8676002)(4326008)(316002)(186003)(107886003)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?lv4VW+NbRFjFV4AB98BXTpQJkrtz0HNrlqqYbjQMpTdCaW2Vg9A9LdssN62O?= =?us-ascii?Q?URLRYrYb85kmIBnb4bE2WVb4YS3U0ZzcJQvlVK7Bm5iKt0fTCVqVt2QanOSP?= =?us-ascii?Q?YblvnvV+k3gm6LTEN05oFAs6OgIDPirFTP1Bo5YEdnfYlWeFFWU9E9xnEzy5?= =?us-ascii?Q?nEA5aQcc9e9iYUB/rsmTPjuI35zW7cShm4SPnyv041QhW3DtlJJSWpyAuI96?= =?us-ascii?Q?R3riltwl92CKo3JLjW/phMsCUZBcVxxIHD2u7SzwU11xMh4XkT1U9TNYiir+?= =?us-ascii?Q?1Jh5/rwx4uzFsQzX1XW9n8LaPWcujbOylOjKpN64VxMWw+OTimGNMOrYtHHG?= =?us-ascii?Q?V4jkxbiykn8/D94prBA94jyVII+tlcTrSX/poaOLPfefO83vjxToUjDEe3wL?= =?us-ascii?Q?u4waFsiAO5YEFTUOk7k3LiKGHfwMIf0vY45nmRgVskYMke4W3EvnNypgabD4?= =?us-ascii?Q?PGzqmTQ5qvbfXGIRBcFHxHnzObxArA9SPBB4nvDgWbI9Lz3a+cqXjA9REIkg?= =?us-ascii?Q?OS8+wZxwlH9nQ2XxERo5VeEDgRR9PSAyWr/L9RxMYIzN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MiaLMrAEcY/dfyjV3CvSEn6dxP+sXNLm/iJf2fk0n7rQ3k?= =?us-ascii?Q?bbU450HrS2zNkBLjBIO3EU8v202lx43Z7j5oxL7C4lEkTqx7DAcTZwliPtO6?= =?us-ascii?Q?TrntmzPj7NYghpKjJBanPQyEd/SfeeV2SEyiJ89iRCWYQUxc3nd6LfslJZsj?= =?us-ascii?Q?+A=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: e81169fd-525d-430a-e8e6-08da6e3bec63 X-MS-Exchange-CrossTenant-AuthSource: MWHPR11MB1629.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jul 2022 12:48:07.5536 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: iybD9S0/l8HlLCGWTNQt6NyXioGfFaaqz71/sD+/RP2o0/8d03K2d8lTB/7ByF58zIrQFOmKCC5LsbKE0klQ2ndHi7efFO0LfezaqlUgEMA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ0PR11MB6743 X-OriginatorOrg: 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 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