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 3562643AE0; Thu, 8 Feb 2024 17:26:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D15184028B; Thu, 8 Feb 2024 17:26:04 +0100 (CET) Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by mails.dpdk.org (Postfix) with ESMTP id B195940278 for ; Thu, 8 Feb 2024 17:26:03 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id E7ACC5C015B; Thu, 8 Feb 2024 11:26:02 -0500 (EST) Received: from mailfrontend1 ([10.202.2.162]) by compute6.internal (MEProxy); Thu, 08 Feb 2024 11:26:02 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm3; t=1707409562; x=1707495962; bh=yYasvus3ojgFWhmIy3ho9aEasZJWYEcIZvkTwqsLghU=; b= qC/CRXKrXJ+S+6DWLlUyYIfBzHA4aJxC87I/u+3TUEfVE0UlbOVZUq0nMc2q/F1T oNuLsd3RjZEaKwZHIwQQ8HUCCQ7J20aMiDQT/63SOmdAHtcqQ5SYqBeLWhmDxKRQ T4xvrRKOSWgOKP0/ABNMLskJVCusRPYUywC6/V/aFzTZiLCkl1y69N58i2135AJl IvG1BP/N8F0bT1W2wwdphG9mblJEq0TVWnPi1mWTzEH+3VU52a+E9DH2wLwL63Sn MT+PQQwTJ8pfWqy7yH6gJbx2OUCpJ6i7hQ52JsY2SBSqfuUU9ho9tEQmaTk6AjjB bY81+en5c0ycuKiwy1NKog== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1707409562; x= 1707495962; bh=yYasvus3ojgFWhmIy3ho9aEasZJWYEcIZvkTwqsLghU=; b=n MtRySwPBIEQM3yCuEfHaHS/SNz14r/d9pWqGNnoD3d1tRgpeIt9uSo446nqrAets P5xl2Kq+CXxXYESnq7JIzpE3rx0iHX72ije6AJ1bouqHaK+UsjLi2oLlqTJRpJDW I10GtjOoPbnnnVSQRSNSvHPco8fqf+keLfHco8yNHVSFWgq0jyr57oB8S2gGnUSa ZHmKiCyWa1pGxfdtIxp20gAIvZvmOtS2s6LRYKM9ndpJ0EPBQabK/E+0sB1YaG6t tY3iWrhDpKtD2jIbvJby5+HRuDujh3WdkO+ffCn1kZVgo5PkDaHpEKLTyZwo05tf DBUz+wrv3k33F8oYXeoTw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvledrtdeggdekiecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhhomhgr shcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqnecugg ftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddtieek gfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrh homhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 8 Feb 2024 11:26:00 -0500 (EST) From: Thomas Monjalon To: Chengwen Feng , Amit Prakash Shukla Cc: Kevin Laatz , Bruce Richardson , dev@dpdk.org, jerinj@marvell.com, vattunuru@marvell.com, ndabilpuram@marvell.com, anoobj@marvell.com, mb@smartsharesystems.com Subject: Re: [PATCH v2] lib/dmadev: get DMA device using device ID Date: Thu, 08 Feb 2024 17:25:59 +0100 Message-ID: <2341512.n0HT0TaD9V@thomas> In-Reply-To: <20231219110027.16443-1-amitprakashs@marvell.com> References: <20231208075526.2696553-1-amitprakashs@marvell.com> <20231219110027.16443-1-amitprakashs@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 19/12/2023 12:00, Amit Prakash Shukla: > +struct rte_dma_dev * > +rte_dma_pmd_get_dev_by_id(const int dev_id) const does not make sense here for an int parameter. > +{ > + if (!rte_dma_is_valid(dev_id)) > + return NULL; > + > + return &rte_dma_devices[dev_id]; > +} [...] > +/** > + * @internal > + * Get the rte_dma_dev structure device pointer for the device id. > + * > + * @param dev_id > + * Device ID value to select the device structure. This comment is not explanatory. What is an ID? Where does it come from? Where can we see such ID for DMA device? > + * > + * @return > + * - rte_dma_dev structure pointer for the given device ID on success, NULL > + * otherwise. > + */ > +__rte_internal > +struct rte_dma_dev *rte_dma_pmd_get_dev_by_id(const int dev_id); Again, const does not make sense here. Chengwen, please can you comment this patch as you maintain dmadev?