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 986DDA0547; Thu, 9 Sep 2021 13:26:31 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68BED40041; Thu, 9 Sep 2021 13:26:31 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by mails.dpdk.org (Postfix) with ESMTP id 6779A4003E for ; Thu, 9 Sep 2021 13:26:29 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10101"; a="207990523" X-IronPort-AV: E=Sophos;i="5.85,280,1624345200"; d="scan'208";a="207990523" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 09 Sep 2021 04:26:28 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,280,1624345200"; d="scan'208";a="696204163" Received: from fmsmsx606.amr.corp.intel.com ([10.18.126.86]) by fmsmga005.fm.intel.com with ESMTP; 09 Sep 2021 04:26:28 -0700 Received: from fmsmsx607.amr.corp.intel.com (10.18.126.87) by fmsmsx606.amr.corp.intel.com (10.18.126.86) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Thu, 9 Sep 2021 04:26:27 -0700 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.2242.12; Thu, 9 Sep 2021 04:26:27 -0700 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.2242.12 via Frontend Transport; Thu, 9 Sep 2021 04:26:27 -0700 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.43) 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.2242.12; Thu, 9 Sep 2021 04:26:27 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WZima7CoJUC6F/hSfaW0GxI5FAnQ/tx0mh7kVhR1vHqTi/uKE+ZaOW9v1G+3dFsBT78+xqrseH2ZMa+FUGmYvb3kZ9YK7GA03xlFnAGUnt7gmZ8jhXP29Gfk34h6UwD53OdzV2Nc7Av01JO/AuO00mTToPWdbB6Il6EJF6Ij5Bnr8Y/bMW/9kGF/OKqA004uUWM9dDZK6sMQxO9Hj0gYOCUFP/VOEIUoGFIPhNvsG9EJQ+Lk5jRVX8vbVq5f8yeO90V/O60hHP21KjUamo2OLGoVs99gGcud3n9qDgElwJjRIHoeRl08sUPFplEBADiAByjBQzXk9oeuGiNAi1TLrg== 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; bh=l2UhT/qhZSTLlVOgtu1ztgndHyL7zUyGeeGavMFbSqk=; b=Q0P5WcolVtN3EUCGZb8/6mEHxwV344AewHkCCITVxPFN40A9OYuqctBgJ73rZNvlaQCrTcY4tiFQxDmrSBZYf8PmpXM+9RUqgCofZCiZxqZneEn9TXzUtGU4DL2Ff0kpLhI9yHdF0RYD3yRWkuSKKkVITqZmWjsSrveCIHmozbOJPji4IpE34TMf5MPY+VftXH1OriXQSS8+eZIzOcIemBzj4vosNuaiv3hdenjeHlNC+DUHwp0fM36VP0s5Z99trAEIjSlbzrxxHy1JLt/8YIXuHiTxuTV9hOI73ZgEYRxUWzBag0PRtSjSqJMTKQdIcpNppe0F1s2r9cnbLRGSAw== 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 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=l2UhT/qhZSTLlVOgtu1ztgndHyL7zUyGeeGavMFbSqk=; b=PTD3dfMWAOG1h9q6FAce9XuvDmXsQgoWkRSN4LLRZ+Iod9P5O7OP8V891tBoGFaMTLHz+O0vC9wqEs2eNu3L65wvVGgFhd/cdegdiQa/YqdYudYqk2Ak8ZWOUSnoPgw3iM+OndX2y+fxAcF1/zzF1qnYC33UK5rnGFhP9k8Yap4= Authentication-Results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; Received: from SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) by SN6PR11MB3487.namprd11.prod.outlook.com (2603:10b6:805:c3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.16; Thu, 9 Sep 2021 11:26:25 +0000 Received: from SA2PR11MB5210.namprd11.prod.outlook.com ([fe80::e5f6:85a1:af0d:705e]) by SA2PR11MB5210.namprd11.prod.outlook.com ([fe80::e5f6:85a1:af0d:705e%7]) with mapi id 15.20.4500.017; Thu, 9 Sep 2021 11:26:25 +0000 To: Kevin Laatz , CC: , , References: <20210903105001.1179328-1-kevin.laatz@intel.com> <20210908103016.1661914-1-kevin.laatz@intel.com> <20210908103016.1661914-14-kevin.laatz@intel.com> From: Conor Walsh Message-ID: <9ac8b0d4-24fb-c0eb-45c1-f483eb05b99d@intel.com> Date: Thu, 9 Sep 2021 12:26:19 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: <20210908103016.1661914-14-kevin.laatz@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Content-Language: en-US X-ClientProxiedBy: DB7PR03CA0100.eurprd03.prod.outlook.com (2603:10a6:10:72::41) To SA2PR11MB5210.namprd11.prod.outlook.com (2603:10b6:806:fa::23) MIME-Version: 1.0 Received: from [192.168.1.20] (109.79.8.55) by DB7PR03CA0100.eurprd03.prod.outlook.com (2603:10a6:10:72::41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4500.14 via Frontend Transport; Thu, 9 Sep 2021 11:26:23 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a4f533d0-7493-453e-5a6d-08d97384a887 X-MS-TrafficTypeDiagnostic: SN6PR11MB3487: X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: X-MS-Oob-TLC-OOBClassifiers: OLM:6790; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: p0f0nmzfXoW9D7MyBFKqG3WRt//I+oAjhOm26UBGfzDAbZaEVVMAMXEAn1Mpxkia2aCdMQCZlI4s6dl7QkLaLFNPaMm133SEj0/bKgOSeyV42oSyZ1m+MV7jnv5WcUKoY2IMtGa7h7o7mP5NiBEsL9xoHuppdSqGeiPeZzktZRSu/OQTas0mPdgAuOxAPRVJ7zXHbBPgVN621dHa/S2uJgmhdekq/ujeDc+++Q5tcWc4Ewm6GDLFuGUGO4JBbXzpFxDyFFi5YtHL/JbQ4J37gLyI9wmcFC0dFZsbX8X9vvk8BoVH0ud/ozbeEq37TKyp8CKyx377u3OL5a8pTQv8jnph/0lnA5fknqegp5UqLEEGkmV0tos+N0Mn87PO0dho8e1/Tvx6b9PQtSnrvB+GEAoXlhVw3oDcc1jX5WAnDCsb9SJHqN6l90cfovwt5IjBeryl1zQkhpA+rD9PHi93x4QEITvYf3TzxlXauZ+hjkJ9dz1bGqRcQnmP5b0jBZ/NHudCAfLaeOxDjH+SZbAr6fbZNzQ2wiITRz+yduS6e89pyvfyMR7pERPlqcJ5gE/BQELN6Vud7xwlskrsKD33o1z15EHyNS2FdrJeWe/d9b1LPujOL5x/aqz3nrpmmBfWmidhTF7haKLKZB+xmA9jrAawvYu3BpS9A0N3IB3CO0AoEsqknOS9JoBl7dt/JZvYr/XX/BTGK+dzbDw5tjSO5V0Zsu5mdSNsa4kdsdfk6cM= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SA2PR11MB5210.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(136003)(396003)(39860400002)(346002)(376002)(31696002)(8936002)(31686004)(44832011)(5660300002)(36756003)(316002)(16576012)(6486002)(4744005)(8676002)(26005)(2906002)(956004)(2616005)(38100700002)(6666004)(4326008)(86362001)(478600001)(186003)(66476007)(66946007)(66556008)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?ek40N0RZVnZEM1R6OUJqRmd5L082ODN2OE1YS20vRlJQZ2xIazZPMXVKZ1V4?= =?utf-8?B?RkdqTE9KR0s5UkVhT1pCTE43ZStzbFF4M2V6NDZBWjYrZUJsR3BuMG5Bbjd5?= =?utf-8?B?cjFsbE9hTW9HR0tXNm9KRVgrTWJvZ0tCaGNVT3dRNldBVGxDKzBST3JuS1li?= =?utf-8?B?UmlEME1YYUxDWFVTOEtOM3BMNHUvTWM2QVVtQmhORitIYmY4MmZxOEpkMkhr?= =?utf-8?B?dUxCVndFRE9mMEEzOWNINW1HNVZKeER6NFQwelpXQ0FEK3JleWU1N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RWNqMEJ0c3NEVTRQ?= =?utf-8?B?azFpVmdrL2pMSHFjczJ2emtqQmNXbE9tdDdtSWgybUFOUVlwQXNNME9tTXg3?= =?utf-8?B?QmFZVWRheDh4bEhQVGxRVWMxWTJZVGowZWR2ZWVIb2tRMHo3aERCRzZUQ0F6?= =?utf-8?B?Z3JiSVJXK1lOWkVTaWcyVk90Q3hKYVpuZStjRjQvQkN3azBpUTBTRnFoaFEw?= =?utf-8?B?eG1hRm9LeklMY1FqQjhzeGlzYTYvOG1NWkJMTGNzZEV1dCszRENvVkF0eEFQ?= =?utf-8?B?eFAxYnRxZS9OTFJZQkMyUnU5Y1lzK3JVcklQN1ZqMlhtMnc3QTMxSkN0dGlD?= =?utf-8?B?SWZnOFBGc3JuUlRYQ3BqUHUxOWhmOGJ5ZEE3WnVmWnZEOU53UldvVEgrQndF?= =?utf-8?B?ZTlZdTZjMm1idk0xNXhMVkprWTFYUFdFaTBVY2RiNzhtM2dmU0NQa3dZUE9P?= =?utf-8?B?aHZTdlcwamNwRkNXRUJoQlRXMlYvNkVjZ1VjbXFjT1RIYUg0ODhKMEE0VFRo?= =?utf-8?B?OHdrSjFsWnk4QkFLSEJRVG92ajlWaktvTWZ3RDZGQnNmNlRubnVqR0habzFS?= =?utf-8?Q?xVr3i12oUwVvMCwxpSxTnZBf5pXQjt8jTK5NOvj?= X-MS-Exchange-CrossTenant-Network-Message-Id: a4f533d0-7493-453e-5a6d-08d97384a887 X-MS-Exchange-CrossTenant-AuthSource: SA2PR11MB5210.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Sep 2021 11:26:25.0623 (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: AzGkqVnMNQt3Fptx45sHnew9YSHm3x+8R+XcEYs9cVvfXfPyckpo0caw9x3wLTjfYfyBVaqR+sSC87NkKY6pPg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN6PR11MB3487 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v3 13/17] dma/idxd: add vchan status function 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 Sender: "dev" > When testing dmadev drivers, it is useful to have the HW device in a known > state. This patch adds the implementation of the function which will wait > for the device to be idle (all jobs completed) before proceeding. > > Signed-off-by: Kevin Laatz > +int > +idxd_vchan_status(const struct rte_dmadev *dev, uint16_t vchan __rte_unused, > + enum rte_dmadev_vchan_status *status) > +{ > + struct idxd_dmadev *idxd = dev->dev_private; > + uint16_t last_batch_write = idxd->batch_idx_write == 0 ? idxd->max_batches : > + idxd->batch_idx_write - 1; > + uint8_t bstatus = (idxd->batch_comp_ring[last_batch_write].status != 0); > + > + *status = bstatus ? RTE_DMA_VCHAN_IDLE : RTE_DMA_VCHAN_ACTIVE; > + > + return 0; > +} Should there be a comment noting that RTE_DMA_VCHAN_HALTED_ERROR does not apply to IDXD? Reviewed-by: Conor Walsh