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 C6851A034F; Mon, 11 Oct 2021 17:46:28 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE41140E50; Mon, 11 Oct 2021 17:46:28 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by mails.dpdk.org (Postfix) with ESMTP id 06D594003C for ; Mon, 11 Oct 2021 17:46:26 +0200 (CEST) X-IronPort-AV: E=McAfee;i="6200,9189,10134"; a="250293539" X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="250293539" Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2021 08:44:43 -0700 X-IronPort-AV: E=Sophos;i="5.85,364,1624345200"; d="scan'208";a="526038727" Received: from bricha3-mobl.ger.corp.intel.com ([10.252.24.91]) by fmsmga008-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-SHA; 11 Oct 2021 08:44:39 -0700 Date: Mon, 11 Oct 2021 16:44:36 +0100 From: Bruce Richardson To: Chengwen Feng Cc: thomas@monjalon.net, ferruh.yigit@intel.com, jerinj@marvell.com, jerinjacobk@gmail.com, andrew.rybchenko@oktetlabs.ru, dev@dpdk.org, mb@smartsharesystems.com, nipun.gupta@nxp.com, hemant.agrawal@nxp.com, maxime.coquelin@redhat.com, honnappa.nagarahalli@arm.com, david.marchand@redhat.com, sburla@marvell.com, pkapoor@marvell.com, konstantin.ananyev@intel.com, conor.walsh@intel.com, kevin.laatz@intel.com Message-ID: References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20211011073348.8235-1-fengchengwen@huawei.com> <20211011073348.8235-3-fengchengwen@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20211011073348.8235-3-fengchengwen@huawei.com> Subject: Re: [dpdk-dev] [PATCH v25 2/6] dmadev: add control plane API support 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 Mon, Oct 11, 2021 at 03:33:44PM +0800, Chengwen Feng wrote: > This patch add control plane API for dmadev. > > Signed-off-by: Chengwen Feng > Acked-by: Bruce Richardson > Acked-by: Morten Brørup > Reviewed-by: Kevin Laatz > Reviewed-by: Conor Walsh > --- > doc/guides/prog_guide/dmadev.rst | 38 ++ > doc/guides/rel_notes/release_21_11.rst | 1 + > lib/dmadev/rte_dmadev.c | 360 +++++++++++++++++++ > lib/dmadev/rte_dmadev.h | 464 +++++++++++++++++++++++++ > lib/dmadev/rte_dmadev_pmd.h | 61 ++++ > lib/dmadev/version.map | 9 + > 6 files changed, 933 insertions(+) > > +/** > + * A structure used to retrieve the information of a DMA device. > + * > + * @see rte_dma_info_get > + */ > +struct rte_dma_info { > + /** Device capabilities (RTE_DMA_CAPA_*). */ > + uint64_t dev_capa; > + /** Maximum number of virtual DMA channels supported. */ > + uint16_t max_vchans; > + /** Maximum allowed number of virtual DMA channel descriptors. */ > + uint16_t max_desc; > + /** Minimum allowed number of virtual DMA channel descriptors. */ > + uint16_t min_desc; > + /** Maximum number of source or destination scatter-gather entry > + * supported. > + * If the device does not support COPY_SG capability, this value can be > + * zero. > + * If the device supports COPY_SG capability, then rte_dma_copy_sg() > + * parameter nb_src/nb_dst should not exceed this value. > + */ > + uint16_t max_sges; > + /** NUMA node connection, -1 if unknown. */ > + int16_t numa_node; > + /** Number of virtual DMA channel configured. */ > + uint16_t nb_vchans; > +}; > + Since we really don't want apps to have to access the rte_dma_devices array, I think we should add "const char *name" to the info struct. Apps may find it useful for debugging or logging, and certainly the unit tests will use it. /Bruce