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 D7DDCA0C4C; Tue, 5 Oct 2021 18:40:08 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id BE984413ED; Tue, 5 Oct 2021 18:40:08 +0200 (CEST) Received: from mail-lf1-f54.google.com (mail-lf1-f54.google.com [209.85.167.54]) by mails.dpdk.org (Postfix) with ESMTP id 67B81413E4 for ; Tue, 5 Oct 2021 18:40:07 +0200 (CEST) Received: by mail-lf1-f54.google.com with SMTP id n8so32111053lfk.6 for ; Tue, 05 Oct 2021 09:40:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=n5bgKj6vvrIe/k4DyPxyCm0bBKy+U/1hbM0HSWDE+cA=; b=E4wQ6uQ3XNiyXdnMozugaugUmW5SJrPC3px4wMOI2A//IyQFcERIwqoh8BamtmVAhX 7yswrqpynEM5VpyHxJBrNxxMDjUJMJRyf58hwsjQ+qohFm4UwSnE30plns24KJd56XXB 4I7mrUmWLG0/WA8SyoxX25yiiaEpiLYT5l8h38uSySL7bQu+52DHbO2Jaer1V/pHKR9K KVqwZXqXKZ+nropdKkAPEiInUohQ9YIP6Ei+2UiKj/KmbkwstJvnjwx/IKnmXFYAvdSe L3DOBUvOiWL02Ob0vAEM4eoZMDX/BhIz9Xy4sG1Wf1PiWDIagjTZV7D161Mk8kX5re42 xGjw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=n5bgKj6vvrIe/k4DyPxyCm0bBKy+U/1hbM0HSWDE+cA=; b=lRTLIAtjZplvLMj7gU+X+cuCbnGvvpxt8eTqAkMlULhQIo4hcpFhGkO3cP+N8FIbVi XjId/rgeocTFx5tPKnzOiaS2cQYz0FLA24FfOjP6ZfPbjpQq7NEMFiHma6eVxDppc1sT QbSiIDhoFbta1yQGmwZUDMOEOdDVPOjE8NkVGz61hKCRLrJE/d71zURD1NMuarMfFwqu /DUIgbU3YNAc3+ojUFqj+wbMFk44ih+RJ/68/fU0XCObmNLTN4Q8G5TpGxFe+neWRLKU 3eihXJTmo56WQGakjD4KwKai/QXfQCCZucIiOlrty1JtFdNyV05+oXIbqUMdWWporkR1 GmOg== X-Gm-Message-State: AOAM532sSQhBumvSFc8mG1CFxrMMUwD4ZWRDNby8eilpOCveXmeXektX keBMrcl60PgVcPxXUj1ivvNlHVw9PqRxWQ18onM= X-Google-Smtp-Source: ABdhPJxVV4vIAJsbkJuFgsi0OJMov9gpEwlndNc8EJZfmamqBtCJwBHISo/I6X8F24SH1CVZobGIm6tnGdAqGKwSb5A= X-Received: by 2002:a2e:5709:: with SMTP id l9mr22368918ljb.315.1633452003514; Tue, 05 Oct 2021 09:40:03 -0700 (PDT) MIME-Version: 1.0 References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20210924105357.15386-1-fengchengwen@huawei.com> <20210924105357.15386-2-fengchengwen@huawei.com> <0099f7c0-7c6e-c593-b917-55719b23af74@intel.com> In-Reply-To: <0099f7c0-7c6e-c593-b917-55719b23af74@intel.com> From: Radha Mohan Date: Tue, 5 Oct 2021 09:39:51 -0700 Message-ID: To: Kevin Laatz Cc: Chengwen Feng , Thomas Monjalon , ferruh.yigit@intel.com, bruce.richardson@intel.com, Jerin Jacob Kollanukkaran , Jerin Jacob , andrew.rybchenko@oktetlabs.ru, dpdk-dev , mb@smartsharesystems.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com, maxime.coquelin@redhat.com, honnappa.nagarahalli@arm.com, David Marchand , Satananda Burla , pkapoor@marvell.com, konstantin.ananyev@intel.com, conor.walsh@intel.com, Radha Chintakuntla Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 Tue, Oct 5, 2021 at 1:24 AM Kevin Laatz wrote: > > 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=C3=B8rup > >> 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, Thanks Kevin. It helped. I wasn't looking at accessing the rte_dma_devices[] array directly. A library API would've been good. regards, Radha > > Kevin > >