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 2B00EA034F; Tue, 12 Oct 2021 05:57:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AFC5F410E4; Tue, 12 Oct 2021 05:57:23 +0200 (CEST) Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by mails.dpdk.org (Postfix) with ESMTP id 83CF0410DC for ; Tue, 12 Oct 2021 05:57:21 +0200 (CEST) Received: from dggemv704-chm.china.huawei.com (unknown [172.30.72.56]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4HT1zM2nKTz1DDkg; Tue, 12 Oct 2021 11:55:43 +0800 (CST) Received: from dggpeml500024.china.huawei.com (7.185.36.10) by dggemv704-chm.china.huawei.com (10.3.19.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.8; Tue, 12 Oct 2021 11:57:18 +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.8; Tue, 12 Oct 2021 11:57:17 +0800 To: Bruce Richardson CC: , , , , , , , , , , , , , , , , References: <1625231891-2963-1-git-send-email-fengchengwen@huawei.com> <20211011073348.8235-1-fengchengwen@huawei.com> <20211011073348.8235-3-fengchengwen@huawei.com> From: fengchengwen Message-ID: <8041351b-269e-8a9a-6f52-c4145985bd23@huawei.com> Date: Tue, 12 Oct 2021 11:57:17 +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: 8bit X-Originating-IP: [10.67.100.224] X-ClientProxiedBy: dggems706-chm.china.huawei.com (10.3.19.183) To dggpeml500024.china.huawei.com (7.185.36.10) X-CFilter-Loop: Reflected 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 2021/10/11 23:44, Bruce Richardson wrote: > 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. Agree > > /Bruce > > . > Thanks