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 43EE045AB0; Fri, 4 Oct 2024 23:08:08 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CD70B4329A; Fri, 4 Oct 2024 23:08:07 +0200 (CEST) Received: from mail-yw1-f182.google.com (mail-yw1-f182.google.com [209.85.128.182]) by mails.dpdk.org (Postfix) with ESMTP id 7D42F402EB for ; Fri, 4 Oct 2024 23:08:06 +0200 (CEST) Received: by mail-yw1-f182.google.com with SMTP id 00721157ae682-6ddceaaa9ddso25771477b3.1 for ; Fri, 04 Oct 2024 14:08:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1728076086; x=1728680886; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=qkkaxr37GjJjch6xMN8zL+bp/jV85hG9+IaHIamiqnU=; b=bRiilmoKz9wYUGRIA4ORDqbLqJiBgcvwZRB3g/mjEek8H0YCSeMAUlzir+l23MM4Oy vwnyhgscXnCSOGxMwJGmglNMkvj9mYozHvvKall7OnYxPPaptgz5W/+G5fYsdnWiGuiX iPMwElD5/RdQCzy4IXvLmEZLqlFMDfq6W87fpqiMjiLux3dhvqEpVrDYWCP7RdK0rg6j vImITBKjORLNmmXEYSAkk0NET3gI/WJCvXqbqiQyiNy85BoDifIfHYSZv3c92GDpIrMf aII5fWvqpiL7UL8gEoDtBrK4DbV5puM8T20rBSzu/BeLHFj1yGqS3aW0ybMs6teht55k Itmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1728076086; x=1728680886; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=qkkaxr37GjJjch6xMN8zL+bp/jV85hG9+IaHIamiqnU=; b=wv8uiWwtqwsa74FRofa4EU8n7c6Wvo2y3fG2dCbXNr99WAjbi49AOY0+9IthJq/7rR lxLY/1Rmr2jVRTwu3Sc+iQOYuWdKpViidCFGFfvheBmqTp+7PIRhfesKn5lnNxcJG95I xza2jSKKT3zkh6r9dVVFuO409lpTGtkzW3aQIgNAHYdKECBpkHym7y9JdlmJJSmrm0Qm XtTynZXi55MCBntaF+gKmKjo9eYpVzzmfp3IkJC4NOwLQDPhuxWxBdUB/2EuvbBFh1cl oHtUtiAeltT8XFzsoYOPu6YeBHT8clK+9CCePV3jjMW2L3VXsMRx+jPeoL8ff3D6khxN CN6A== X-Forwarded-Encrypted: i=1; AJvYcCWvEQnY7LXRM+lE3C0PYy/cr6PpAS7ExE19O9H5by12S4ZAoM/aZZY1TQOFcUFoQX+SKEk=@dpdk.org X-Gm-Message-State: AOJu0Yz6j0B+03MePJMC51VqjzdjCa+9ruVT2R5vZ1UsG5kLQ/FMRDz0 qIiCDF07wMSupNbAPT0kBEvqB4EKxWATeCdE8fz6OL26NZCY7lT7fIB5R60v7xg= X-Google-Smtp-Source: AGHT+IHouR53DJa2IiyY//+YpqZE346QzuGuo4XQ/SP5ho3ovhkAyE+77D0NovuPCpBepECzrbN1NQ== X-Received: by 2002:a05:690c:112:b0:6dd:ba9b:2ca7 with SMTP id 00721157ae682-6e2c72bec8bmr36923017b3.46.1728076085716; Fri, 04 Oct 2024 14:08:05 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 00721157ae682-6e2d926b41bsm938627b3.3.2024.10.04.14.08.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2024 14:08:05 -0700 (PDT) Date: Fri, 4 Oct 2024 14:08:02 -0700 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: "Honnappa Nagarahalli" , , , , , , , , Subject: Re: [PATCH 2/4] mempool: clarify comments for mempool cache implementation Message-ID: <20241004140802.10c5bb8a@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35D87999@smartserver.smartshare.dk> References: <20230309045738.1261000-1-honnappa.nagarahalli@arm.com> <20230309045738.1261000-3-honnappa.nagarahalli@arm.com> <98CBD80474FA8B44BF855DF32C47DC35D87999@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Wed, 7 Jun 2023 12:10:01 +0200 Morten Br=C3=B8rup wrote: > > From: Honnappa Nagarahalli [mailto:honnappa.nagarahalli@arm.com] > > Sent: Thursday, 9 March 2023 05.58 > >=20 > > Clarify that the mempool cache create and free API implementations > > work on user owned mempool caches. > >=20 > > Signed-off-by: Honnappa Nagarahalli > > Reviewed-by: Kamalakshitha Aligeri > > Reviewed-by: Ruifeng Wang > > --- > > lib/mempool/rte_mempool.c | 12 ++++++------ > > 1 file changed, 6 insertions(+), 6 deletions(-) > >=20 > > diff --git a/lib/mempool/rte_mempool.c b/lib/mempool/rte_mempool.c > > index cf5dea2304..a46d855dbf 100644 > > --- a/lib/mempool/rte_mempool.c > > +++ b/lib/mempool/rte_mempool.c > > @@ -757,9 +757,9 @@ mempool_cache_init(struct rte_mempool_cache *cache, > > uint32_t size) > > } > >=20 > > /* > > - * Create and initialize a cache for objects that are retrieved from a= nd > > - * returned to an underlying mempool. This structure is identical to t= he > > - * local_cache[lcore_id] pointed to by the mempool structure. > > + * Create and initialize a user owned cache for objects that are retri= eved > > + * from and returned to an underlying mempool. This structure is ident= ical > > + * to the local_cache[lcore_id] pointed to by the mempool structure. > > */ > > struct rte_mempool_cache * > > rte_mempool_cache_create(uint32_t size, int socket_id) > > @@ -786,9 +786,9 @@ rte_mempool_cache_create(uint32_t size, int socket_= id) > > } > >=20 > > /* > > - * Free a cache. It's the responsibility of the user to make sure that= any > > - * remaining objects in the cache are flushed to the corresponding > > - * mempool. > > + * Free a user owned cache. It's the responsibility of the user to make > > + * sure that any remaining objects in the cache are flushed to the > > + * corresponding mempool. > > */ > > void > > rte_mempool_cache_free(struct rte_mempool_cache *cache) > > -- > > 2.25.1 > > =20 >=20 > These comments should probably be updated in the function descriptions in= rte_mempool.h too, so they go into the auto-generated documentation. >=20 Agree with Morten on this. The comments in rte_mempool.h should be updated, and the comments in rte_me= mpool.c are redundant and can be removed. Best to have docbook comment as the part which describes the function.