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 7EC4E431BC; Fri, 20 Oct 2023 18:08:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 61EE5402A2; Fri, 20 Oct 2023 18:08:18 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 566CE4027C; Fri, 20 Oct 2023 18:08:17 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 34D33205EE; Fri, 20 Oct 2023 18:08:17 +0200 (CEST) Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Subject: RE: [PATCH] mempool: fix internal function documentation X-MimeOLE: Produced By Microsoft Exchange V6.5 Date: Fri, 20 Oct 2023 18:08:12 +0200 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9EF64@smartserver.smartshare.dk> In-Reply-To: <20231020144647.1682698-1-ferruh.yigit@amd.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH] mempool: fix internal function documentation Thread-Index: AdoDZFFClFUEMUHDR96gWL5jxLCcCAACjSHw References: <20231020144647.1682698-1-ferruh.yigit@amd.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Ferruh Yigit" , "Thomas Monjalon" , "Andrew Rybchenko" Cc: , , "Mahesh Adulla" 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 > From: Ferruh Yigit [mailto:ferruh.yigit@amd.com] > Sent: Friday, 20 October 2023 16.47 >=20 > static function `rte_mempool_do_generic_get()` returns zero on = success, > not >=3D0 as its function comment documents. >=20 > Since this function called by public API, the comment causes confusion > on the public API return value. >=20 > Fixing the internal function documentation for return value. >=20 > Fixes: af75078fece3 ("first public release") > Cc: stable@dpdk.org >=20 > Reported-by: Mahesh Adulla > Signed-off-by: Ferruh Yigit > --- I agree that this is the current situation, and is relied upon elsewhere = in DPDK. Reviewed-by: Morten Br=F8rup However, the documentation for the mempool driver dequeue function type, = rte_mempool_dequeue_t [1], does not specify allowed return values, so = some future mempool driver might return a positive value. Please = consider updating this too. (Also, the mempool driver enqueue/dequeue = functions work on a bulk of objects, not "an object", as their = documentation says.) [1]: = https://elixir.bootlin.com/dpdk/latest/source/lib/mempool/rte_mempool.h#L= 476