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 79E0BA0C47; Tue, 5 Oct 2021 10:24:51 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F228F412D6; Tue, 5 Oct 2021 10:24:50 +0200 (CEST) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id 02506412C6 for ; Tue, 5 Oct 2021 10:24:48 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10127"; a="289195319" X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="289195319" Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Oct 2021 01:24:48 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.85,348,1624345200"; d="scan'208";a="656470062" Received: from orsmsx606.amr.corp.intel.com ([10.22.229.19]) by orsmga005.jf.intel.com with ESMTP; 05 Oct 2021 01:24:45 -0700 Received: from orsmsx608.amr.corp.intel.com (10.22.229.21) by ORSMSX606.amr.corp.intel.com (10.22.229.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12; Tue, 5 Oct 2021 01:24:45 -0700 Received: from ORSEDG602.ED.cps.intel.com (10.7.248.7) by orsmsx608.amr.corp.intel.com (10.22.229.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2242.12 via Frontend Transport; Tue, 5 Oct 2021 01:24:45 -0700 Received: from NAM10-DM6-obe.outbound.protection.outlook.com (104.47.58.104) 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.2242.12; Tue, 5 Oct 2021 01:24:44 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=i5Px9YeKEYwb9u2ImLfqvde9gNGKXKQSqJSr1aWrpxoyY/IYz4HH7KFFHCidmlkWt4axBzCnx1wNPShLgsaRIjwmmYCw/IyEcekOAfH0eIZwGsofj6wCKvBf0QfCPQs/LnI1kRxc08GwA4ZX9xAMWdI/8ZZ1B/OLjtLEXOMXaGwNIUGXw6fd4ppKWLQtdmPhOyx65I3MNQsOanRNXtU474B1Z/SKkDIGTu61g3qVMlIBeqFOfhNut4MjWOo9vjmmj35USGtlKary3czFS8Gifzx+VHNEfZjBC7QXXPb3wqjH68Zw/gqqHIHpnK+Ljx5bQa5M9QSQq5MOVbsraN/a2w== 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=uTiIIRz2eR+dMMJwFl2fmsk97MZrXPwkc+Ydej5OqXU=; b=OlbuiVgzU67Hz6oRJ8JmssidVis93BeQlaQUNh31pt4UZwADt2a6OI4FJ8Bre+VE96HXjoOPdxloTgcmHptumGjjQz3f8DIogOGJnnrZl0OPhgFw7eyyhk22q7RozbcVsO49nOaY/7likqKeiLMyfM7czRp1ByCut70nYimMC3r8lHK9swS83L8uBb3y7NFKR5Mh8XiDW8sOH9i1VRSMBaXJQs9yvFnbPl3WF0UacyG8p2YmdpiZkJiZehCh+X1lNMvEf/9FtekJDU1roWfFyaQUFCOq0O09hUx+qIUTC9W35pMIJZiR5EfA/iNL0WC2G2kjRpDVbOF266i2h86k+Q== 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=uTiIIRz2eR+dMMJwFl2fmsk97MZrXPwkc+Ydej5OqXU=; b=IpU6jz2uUmbgmu24D7bKJt4CSbB5PnSIIlj4Kv+oJpV9xuOBTT5Ci6VIl2QibYZqvfwrCo12PKrq5slahvJ90k6S8cK1wW/BacNypobP4xR9dhoq6gIOSSIlcl/P1wi+ReMzXS3k4wT0PQwjJfl4pA+4V2Xu6TZeG7WMRwqF1Kc= Authentication-Results: marvell.com; dkim=none (message not signed) header.d=none;marvell.com; dmarc=none action=none header.from=intel.com; Received: from SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) by BYAPR11MB3525.namprd11.prod.outlook.com (2603:10b6:a03:8e::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.19; Tue, 5 Oct 2021 08:24:41 +0000 Received: from SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271]) by SJ0PR11MB5055.namprd11.prod.outlook.com ([fe80::78d4:6f82:aa87:c271%6]) with mapi id 15.20.4566.022; Tue, 5 Oct 2021 08:24:41 +0000 To: Radha Mohan , Chengwen Feng CC: Thomas Monjalon , , , Jerin Jacob Kollanukkaran , Jerin Jacob , , dpdk-dev , , , , , , David Marchand , Satananda Burla , , , , Radha Chintakuntla References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20210924105357.15386-1-fengchengwen@huawei.com> <20210924105357.15386-2-fengchengwen@huawei.com> From: Kevin Laatz Message-ID: <0099f7c0-7c6e-c593-b917-55719b23af74@intel.com> Date: Tue, 5 Oct 2021 09:24:32 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:78.0) Gecko/20100101 Thunderbird/78.14.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Content-Language: en-GB X-ClientProxiedBy: DBBPR09CA0031.eurprd09.prod.outlook.com (2603:10a6:10:d4::19) To SJ0PR11MB5055.namprd11.prod.outlook.com (2603:10b6:a03:2d9::10) MIME-Version: 1.0 Received: from [192.168.1.10] (109.76.221.196) by DBBPR09CA0031.eurprd09.prod.outlook.com (2603:10a6:10:d4::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4566.14 via Frontend Transport; Tue, 5 Oct 2021 08:24:37 +0000 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 6964996c-f500-4b98-9ef4-08d987d993c9 X-MS-TrafficTypeDiagnostic: BYAPR11MB3525: 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:2803; X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: KOZimQMbyfcat1Lwsp/CKGCS/Jh0GmHYhwoeEhsKTLDT7jNE2+0lpZHp9M/Kfyg0qIEmEOhQBn/6KVkeSRFgq08R7fi06PBCKKKXYwPEhv/FcjFpFnQ3e2hsBUDjEhrmeQGHsa1NRcWDmNAbNr39LsEj9DkC9VS/G1TfUoo7xgCL8QmgXdYGp2g25U5MNXMzwqpab6xW3VNmy3MkJROFLQrH5VN5CAGqzHKW//zeoGTPKbDlbeZcG2zkS51HHFsPJ29yJz5epjgesoB5RPKhyDuRQIsKD3vmu5kbpbBrnkhcdD9DVqTQvEeB29whgKsKd9E++et+tj3/goXYZxsGNocbs3b/TRqOuTN0LiN0sg83YAeb9L2q0UMHmRy0tCZ3bRJa94pYx1OkVVZ/8PRycaUAhXe1VFF9YIbkVu7ZsQscuuOmoin+6zSDzO0OKrvpSiOqnW0lnsrWfKFQir9KTEZO0/lOROTrkEMqgEfiTA2IWhCn4vsmwWJDkXH69cMaVW595Dvh/RFatw57Z2Ral4tEo/zoV0lnhdVihveT7SnIJB+arhCKuyyijmyte/MJb4oiCOOOEzCigXki12z7hihPGgTqKWWVBszImmEyAgjjcmUfvaTY/dZPVLw3C/MD5q8+xMHPaVlZ4/hL/gJXzJm7leurZaSsZ4pMbYnSVWpvJI6DE9sL1joYbYShLaEeJf0jVoc5Km+BPAipFZz5xbVASQLXB46Xc7FOwPnztsNQ0fwUpFO7FIvNuZ5CpknHKKG6g7rtahC1y1TalVuYFsit+VNIeNv1hLuvcfJsIQH5f/H4CxW8gR4i2fs4ddzohVyV3V7GT8wqR6BkLhP+OQ== X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5055.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(4636009)(366004)(966005)(38100700002)(110136005)(26005)(7416002)(54906003)(36756003)(16576012)(508600001)(2906002)(956004)(2616005)(86362001)(44832011)(5660300002)(6486002)(186003)(31696002)(316002)(4326008)(66476007)(31686004)(8936002)(8676002)(6666004)(53546011)(66946007)(66556008)(45980500001)(43740500002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?OHY1U1EwQkp6czIvK0h4bjlEQzhtQ2djellnaVBYd3FaM25YRStIU2dBb2dL?= =?utf-8?B?dUg1TnFyRmhwRS82N1dhbndJNDZDNUJvdWNQKzZKaXMxUStMY2Z0eVE3U3Ir?= =?utf-8?B?dUREY0tMWUtsMWxTUzhPdmlOWUg2cXFtREpTTDFVZUNjY3VqaUNRZWxZYVIy?= =?utf-8?B?KzNzaXQxOW9SUzF2TWRuSEpOeHV4RVdoYXJQR1RIa2t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xIWlhLZGx0ZkZoSGFocGg0QTZ6?= =?utf-8?B?RktKeldSSmtqdXR0Q1AzWEd4WHhyRUhleUZFMWNhNzhlUUlPVGowR1JzM1ZE?= =?utf-8?B?T1p2MXVJRU1QMUtvclhrTTE1K2RXaVE5R3BoOTdvK05oVjQ3WnYxQ1FqNGEw?= =?utf-8?B?WVBkU3RYOTNvMWpIYzZsaWhKUUFGL0MwZGZzWlRGZmxHZmJtNFJCbEF3Z0xE?= =?utf-8?B?Vll0cWlRM2c0MC85aitoZ1VORXJyWUVrZUZReklUYThIWkMvQ21VNWY5d092?= =?utf-8?B?dVdHWFdyUGxCWDBKbTJiUDJUUHlFSkVFbm9zZWRJVUx6Y1lILzU5T2N3aU5X?= =?utf-8?B?Y29pY3VHRkF5MSszeHBwUGgwZ3ZFVmNWa1BYKzRObmlsTXVCRXJHWTFaQmNU?= =?utf-8?B?OG9sNzRMSXhiNkR1MHN1M1c4cjhzSWhTU3hzbWhEb1MxeHBZeXlCV012YkQ3?= =?utf-8?B?azVrNDRySnh5UjcxYTZ4VWMzM1JGek0zZm5RR1ZUR1RTSS9HSWNTYm1DdXZS?= =?utf-8?B?MDJTak8raDBvSGluTkNxeHdVSlhqdjlQNGJoTVVHdFlxaEJCMXFwbUkrS25O?= =?utf-8?B?VGlnaHZ2aTJvQjA1U3dVZXNqSDgxRWxTaWZjNEZIREFIL3JKUHRGWUR3L01L?= =?utf-8?Q?q0qU6gosKQn7TuGxpVqCgCah/67s1W5zGd92gJj?= X-MS-Exchange-CrossTenant-Network-Message-Id: 6964996c-f500-4b98-9ef4-08d987d993c9 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5055.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Oct 2021 08:24:40.8186 (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: oUxId3ONfRxuiutWC+MXvECUGa2RWmj+6GiAz20VE7l6w48hsuCYgH0KDmIOnV6JRGgH24pTE1OSAGcppq+V9w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR11MB3525 X-OriginatorOrg: intel.com Subject: Re: [dpdk-dev] [PATCH v23 1/6] dmadev: introduce DMA device library 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" On 04/10/2021 22:12, Radha Mohan wrote: > On Fri, Sep 24, 2021 at 3:58 AM Chengwen Feng wrote: >> The 'dmadevice' is a generic type of DMA device. >> >> This patch introduce the 'dmadevice' device allocation APIs. >> >> The infrastructure is prepared to welcome drivers in drivers/dma/ >> >> Signed-off-by: Chengwen Feng >> Acked-by: Bruce Richardson >> Acked-by: Morten Brørup >> Acked-by: Jerin Jacob >> Reviewed-by: Kevin Laatz >> Reviewed-by: Conor Walsh >> --- >> MAINTAINERS | 5 + >> config/rte_config.h | 3 + >> doc/api/doxy-api-index.md | 1 + >> doc/api/doxy-api.conf.in | 1 + >> doc/guides/dmadevs/index.rst | 12 ++ >> doc/guides/index.rst | 1 + >> doc/guides/prog_guide/dmadev.rst | 64 ++++++ >> doc/guides/prog_guide/img/dmadev.svg | 283 +++++++++++++++++++++++++ >> doc/guides/prog_guide/index.rst | 1 + >> doc/guides/rel_notes/release_21_11.rst | 4 + >> drivers/dma/meson.build | 4 + >> drivers/meson.build | 1 + >> lib/dmadev/meson.build | 7 + >> lib/dmadev/rte_dmadev.c | 263 +++++++++++++++++++++++ >> lib/dmadev/rte_dmadev.h | 134 ++++++++++++ >> lib/dmadev/rte_dmadev_core.h | 51 +++++ >> lib/dmadev/rte_dmadev_pmd.h | 60 ++++++ >> lib/dmadev/version.map | 20 ++ >> lib/meson.build | 1 + >> 19 files changed, 916 insertions(+) >> create mode 100644 doc/guides/dmadevs/index.rst >> create mode 100644 doc/guides/prog_guide/dmadev.rst >> create mode 100644 doc/guides/prog_guide/img/dmadev.svg >> create mode 100644 drivers/dma/meson.build >> create mode 100644 lib/dmadev/meson.build >> create mode 100644 lib/dmadev/rte_dmadev.c >> create mode 100644 lib/dmadev/rte_dmadev.h >> create mode 100644 lib/dmadev/rte_dmadev_core.h >> create mode 100644 lib/dmadev/rte_dmadev_pmd.h >> create mode 100644 lib/dmadev/version.map >> > > Hi Chengwen, > I see that the new version removed the "rte_dmadev_get_device_by_name()". > What is the way to get the dmadev from inside the PMD .remove ? I am > looking to get the dev_private as we need to do some cleanup > operations from the remove function. > > regards, > Radha Mohan Hi Radha, You can use rte_dma_get_dev_id(name) to get the device ID, which can then be used to get the rte_dma_dev struct (which contains dev_private) for that device from rte_dma_devices[]. See "idxd_dmadev_destroy()" in http://patches.dpdk.org/project/dpdk/patch/20210924133916.4042773-6-kevin.laatz@intel.com/ for an example. Hope that helps, Kevin