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 44DE3A0C47; Tue, 26 Oct 2021 08:20:15 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0FC1A40A4B; Tue, 26 Oct 2021 08:20:15 +0200 (CEST) Received: from szxga03-in.huawei.com (szxga03-in.huawei.com [45.249.212.189]) by mails.dpdk.org (Postfix) with ESMTP id DB1934003E for ; Tue, 26 Oct 2021 08:20:13 +0200 (CEST) Received: from dggemv711-chm.china.huawei.com (unknown [172.30.72.55]) by szxga03-in.huawei.com (SkyGuard) with ESMTP id 4HdhV26Gvcz8twv; Tue, 26 Oct 2021 14:18:50 +0800 (CST) Received: from dggpeml500024.china.huawei.com (7.185.36.10) by dggemv711-chm.china.huawei.com (10.1.198.66) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Tue, 26 Oct 2021 14:20:04 +0800 Received: from [127.0.0.1] (10.67.100.224) by dggpeml500024.china.huawei.com (7.185.36.10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.15; Tue, 26 Oct 2021 14:20:03 +0800 To: Radha Mohan , Kevin Laatz CC: dpdk-dev , David Marchand , , , References: <20211020065944.19617-1-david.marchand@redhat.com> <20211021125938.52401-1-fengchengwen@huawei.com> <84c65bb4-d4f6-8d3b-c6c2-145f37e872f5@intel.com> From: fengchengwen Message-ID: <8c667121-1da5-07b2-efef-e556dd4a971e@huawei.com> Date: Tue, 26 Oct 2021 14:20:03 +0800 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.11.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems701-chm.china.huawei.com (10.3.19.178) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected Subject: Re: [dpdk-dev] [PATCH v2 1/3] dmadev: hide devices array 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 2021/10/26 14:04, Radha Mohan wrote: > On Thu, Oct 21, 2021 at 7:04 AM Kevin Laatz wrote: >> >> On 21/10/2021 13:59, Chengwen Feng wrote: >>> From: David Marchand >>> >>> No need to expose rte_dma_devices out of the dmadev library. >>> Existing helpers should be enough, and inlines make use of >>> rte_dma_fp_objs. > > I asked this earlier and was asked to use rte_dma_devices[] array by Kevin. > Now that it has been made static is there a different way to get the > fp_obj->private_data from a PMD .remove function ? > I need the private data for DMA queue state cleanup. PMD .remove function just call rte_dma_pmd_release() and it's will invoke PMD .dev_close ops: rte_dma_pmd_release() --> rte_dma_close() --> PMD .dev_close ops PMD could implemente cleanup in dev_close ops. If the PMD want support multi-process, just make sure only the primary could do really cleanup in the dev_close ops. > >>> >>> Signed-off-by: David Marchand >>> Reviewed-by: Chengwen Feng >>> Tested-by: Conor Walsh >>> --- >>> app/test/test_dmadev.c | 5 +++-- >>> lib/dmadev/rte_dmadev.c | 2 +- >>> lib/dmadev/rte_dmadev_pmd.h | 2 -- >>> lib/dmadev/version.map | 1 - >>> 4 files changed, 4 insertions(+), 6 deletions(-) >>> >> >> Acked-by: Kevin Laatz > > . >