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 AE7EBA00C4; Mon, 30 May 2022 13:40:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8FAAF42B75; Mon, 30 May 2022 13:40:51 +0200 (CEST) Received: from mga17.intel.com (mga17.intel.com [192.55.52.151]) by mails.dpdk.org (Postfix) with ESMTP id 0A843400D6 for ; Mon, 30 May 2022 13:40:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1653910850; x=1685446850; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=HXdtnceMqU3K0HDqo9CI2XdlJDSjxryuH8ryN7Fr9+U=; b=MasC+FhRHXZA+JgkciwPugbxhXisc/agp1TOfSfoSyLJYYD3sR88tV3N t4aPfYmLnCCOZEN5uAvnYQGNOifGhdZ+vmw4swZYCYcOnhGxBQ3Yt+uU6 CcgnJ7Nxfoc4N2p40nHw850sMKwGJB+BlRcfsWmJGfXliJfthGJpzWbsI z5DUKHCNyZfH1Vgzjckpp1KZZvWPO9n1Q3VnIkl5XzUndasSR4M18jN5z Yb2B5ooouZVsaoMJNCrheU3PQSFlgqPOoymDFdUPcPYdAB3Vkqt83aEVd x7q021zNmXQItXMOlUeCnOY+Ycepx2DD5RfOn2euvSYHo9jFWdtezJJPI A==; X-IronPort-AV: E=McAfee;i="6400,9594,10362"; a="255465263" X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="255465263" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by fmsmga107.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 May 2022 04:40:33 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.91,262,1647327600"; d="scan'208";a="750849040" Received: from fmsmsx601.amr.corp.intel.com ([10.18.126.81]) by orsmga005.jf.intel.com with ESMTP; 30 May 2022 04:40:33 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) 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; Mon, 30 May 2022 04:40:33 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx607.amr.corp.intel.com (10.18.126.87) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.27 via Frontend Transport; Mon, 30 May 2022 04:40:33 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.46) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.27; Mon, 30 May 2022 04:40:32 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QfCfJey4IniGZ6Jzj1DSiBA5reyr3U+K4Uk1Cre1h8dseZMpdlYCUF7JLBu0a5c8V7WBlRz/8eoSADHpfAvXXMX4Uyhk8PSTavrn+fc34wlxyf8Pn2coFw0Ddpf06w0H9qcFHyaPszvuDjAIqX4LSJ5FTZhPTRKJFKMgGM0gMpt2lt3ZJRy8lWxz0x8H236YNyjibl4Nhgy7val7VxgBH1Pbnsu71DSMLnwUPGy/+Dp6bsDmRAsPxg8PX8gDGO4FiklI+uLqnVm9TnUndB5DPg9buWG9d1pgE9z0vW6c2eHFjqsY03VUW9mrgeI/g3ekM/WdVSorIi04AtvKNFtzXA== 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=1FcTrX5UKxCO242B03FFHoO3eFupowMP8RnffSRZCK8=; b=fj56O08oqrzN/nNLJlKJMAJ51jU4Q+1jYV37x1QSAXH9Ep3jKwMDlUi9Aejy4UzgFB7QbGqOSoTZP+VZ/4pr7JEzUvKzFaLMR2iR90plH0Lyjfmg3agZQacBQROvy+8y0yR39yPCXIk+bIPLTW6K7U+pSn2K07V9et3UGCqPdWzESH7X6LdAUGqVSd3xMx0KuI+31EDRpE3VVnDOCBDUNHOs86jpWJof3nenDd7sDu/ODRCXJTRLt0Sn6s96A2gSqJqBzdGW24yvsb8Vi0EvrCNM9ESiPsVwZFIkzg1PQgOwLvjoF4pjAtQF9kqcy8SOiwFClYdsyh/e2sl/wqmp1A== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by BN7PR11MB2564.namprd11.prod.outlook.com (2603:10b6:406:b1::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5293.13; Mon, 30 May 2022 11:40:30 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::382e:55b8:41a6:6eff]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::382e:55b8:41a6:6eff%5]) with mapi id 15.20.5293.019; Mon, 30 May 2022 11:40:30 +0000 Message-ID: <42e4b394-3c5c-f1e8-2f8c-7af78ef350f7@intel.com> Date: Mon, 30 May 2022 12:40:25 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.9.1 Subject: Re: [PATCH 2/4] app/test: support test last-idx when no DMA completed To: Chengwen Feng , CC: , References: <20220527034055.33271-1-fengchengwen@huawei.com> <20220527034055.33271-3-fengchengwen@huawei.com> From: Kevin Laatz In-Reply-To: <20220527034055.33271-3-fengchengwen@huawei.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0447.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:1a9::20) To MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 7db9dc4d-0758-41e8-8d8b-08da42313305 X-MS-TrafficTypeDiagnostic: BN7PR11MB2564:EE_ X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vdSAZd+TjjO9ze2eMA9Ret9xlUiFPyI1KO6eKWRdOfxV5VJQckUlLhQTko8q0xltg5Ii4AI54UhlleejLQiTCWkU8yZyl0fwoPRPNVOg3Cpp6ktmrVwgRGOmTVzf2WAMJtlvkAcsYhbLTeiflextCbfrq+oFZnyMiKk8hqT1eDb7XUv6fEToMayCprngd7944+yJj2fbSWwz9pEodJzQ6B3P2vqycyAX/r8TJlf5RYs27xw4r7qjne15Wq+j7F9YVnfrC9inYgrNwqRWwLJOyud/3SNHYE/q983nEy1XAYje+K3sf9UelgdX1hEXnicjOjcuxp6EwmoVATQeXpsW0/t/EN0pTIGro8Wi37EokNoo592eXdRQyrtueF5Kignje85fDWTZFeSXOzV/FvLlEnisC1glHfoVnp5FoTrhK8DXrLUHU5B4qlLMGAVYZjlrQRXmCQw5rnrft2P3+g+gTyRuLF5ErOR94pw5M4PomzoDGkyerJAwiXtdQJKG8s2FEenp7WQLHo77Xak+ytz3eHhRx0d39wI6UwmuB2KbiIBL2shCHUcUhjSHzjqUZrZnWPuaYaZm2ULtU9StAt+KLGj0Piq3W9lCirC21EyVT32adpEWUSSVUyMrWCq43nboEqNrkF4ZLHGl/nA5p8ckkljzVUEL6KqERWms20AH5Bd9+CaOVNnWCYjkvzP1mCGFebCGhNic/j+vyp8NtR0DNEjJPFd8fgFfd+2iL45++F0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:MW4PR11MB5872.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230001)(366004)(66556008)(66476007)(4326008)(8676002)(316002)(31686004)(107886003)(66946007)(2616005)(82960400001)(83380400001)(186003)(38100700002)(86362001)(31696002)(508600001)(2906002)(36756003)(6486002)(8936002)(5660300002)(44832011)(26005)(6666004)(6506007)(6512007)(53546011)(43740500002)(45980500001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ZENhekgwNzlBMC81NGZpdlY4aTdIU2s3Y2lMYUhraWpQVllPbWpna2F4Zjhr?= =?utf-8?B?ZnhFZEFwVGlIRlVabVVsSnFoaVRVSFJhT0FkYzVqWjVacmJJMlpHdVpjK0hX?= =?utf-8?B?YzdFbFgxWVlQK3NpUk1jelRZd3hKVWdyckkzTnFwN0N2aFlCUlJtWms5ZWJX?= =?utf-8?B?dnRicEl1dTlqSWdIWC9adC9jcGxBRHhGU1JqQnhkZUhjOWNEZ0o1YW81RHdR?= =?utf-8?B?VjUyZGVmU1VuL1VvbHhFOFZvMm5yRkg0c1pER09EQXVZZzBERFpqRkhvYlhm?= =?utf-8?B?aWdoTFRFd0tndm5wTEsxN04zS3NNeXhPdTg0Z3JWckJQcStTVXRuNkZHZEw4?= =?utf-8?B?eUFmUVh3RVQwZ3ltZDA5T1puS0NPeW84VW9zdDBZM1V0OXkwT0FUazd6cEd1?= =?utf-8?B?aks2dWZDZ205aHRydFFn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RF?= =?utf-8?B?VHFwSEhsaHBabHY2TE1pNlYrT1lEN2t1ZUY5ZTNQY1pxS2dINkh3MkZTSU9X?= =?utf-8?B?cElmb1NScDBDZU9hd2ZXcG85emhaMEJENmVjM2svTGZNZFhrUkVWSSt2aUZH?= =?utf-8?Q?OizumBAWvklJrFio=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 7db9dc4d-0758-41e8-8d8b-08da42313305 X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 30 May 2022 11:40:30.5678 (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: f/scynEwMn+gdlSpL2vHuniBLG5GBnR/MBhdK4GIGkIBMCSbxX+OzXIYs5xXEAvI0wjAzWMea4IV5zn0tuQ1Fw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN7PR11MB2564 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 Tested with IOAT and IDXD, both pass unit tests. Tested-by: Kevin Laatz On 27/05/2022 04:40, Chengwen Feng wrote: > If no DMA request is completed, the ring_idx of the last completed > operation need returned by last_idx parameter. This patch adds > testcase for it. > > Signed-off-by: Chengwen Feng > --- > app/test/test_dmadev.c | 15 +++++++++++++++ > 1 file changed, 15 insertions(+) > > diff --git a/app/test/test_dmadev.c b/app/test/test_dmadev.c > index 2b097e0f47..a7651a486f 100644 > --- a/app/test/test_dmadev.c > +++ b/app/test/test_dmadev.c > @@ -177,6 +177,7 @@ do_multi_copies(int16_t dev_id, uint16_t vchan, > static int > test_enqueue_copies(int16_t dev_id, uint16_t vchan) > { > + enum rte_dma_status_code status; > unsigned int i; > uint16_t id; > > @@ -215,6 +216,20 @@ test_enqueue_copies(int16_t dev_id, uint16_t vchan) > ERR_RETURN("Error:incorrect job id received, %u [expected %u]\n", > id, id_count); > > + /* check for completed and id when no job done */ > + if (rte_dma_completed(dev_id, vchan, 1, &id, NULL) != 0) > + ERR_RETURN("Error with rte_dma_completed when no job done\n"); > + if (id != id_count) > + ERR_RETURN("Error:incorrect job id received when no job done, %u [expected %u]\n", > + id, id_count); > + > + /* check for completed_status and id when no job done */ > + if (rte_dma_completed_status(dev_id, vchan, 1, &id, &status) != 0) > + ERR_RETURN("Error with rte_dma_completed_status when no job done\n"); > + if (id != id_count) > + ERR_RETURN("Error:incorrect job id received when no job done, %u [expected %u]\n", > + id, id_count); > + > rte_pktmbuf_free(src); > rte_pktmbuf_free(dst); >