From patchwork Thu Mar 9 04:57:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Honnappa Nagarahalli X-Patchwork-Id: 124882 X-Patchwork-Delegate: thomas@monjalon.net Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2234141E2F; Thu, 9 Mar 2023 05:57:59 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F3D6241151; Thu, 9 Mar 2023 05:57:58 +0100 (CET) Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by mails.dpdk.org (Postfix) with ESMTP id B061540A7E for ; Thu, 9 Mar 2023 05:57:57 +0100 (CET) Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id ADCB9C14; Wed, 8 Mar 2023 20:58:40 -0800 (PST) Received: from 2p2660v4-1.austin.arm.com (2p2660v4-1.austin.arm.com [10.118.14.10]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1B70A3F67D; Wed, 8 Mar 2023 20:57:57 -0800 (PST) From: Honnappa Nagarahalli To: mb@smartsharesystems.com, olivier.matz@6wind.com, konstantin.v.ananyev@yandex.ru Cc: dev@dpdk.org, honnappa.nagarahalli@arm.com, ruifeng.wang@arm.com, kamalakshitha.aligeri@arm.com, wathsala.vithanage@arm.com, nd@arm.com Subject: [PATCH 1/4] mempool: clarify mempool cache flush API behavior Date: Wed, 8 Mar 2023 22:57:35 -0600 Message-Id: <20230309045738.1261000-2-honnappa.nagarahalli@arm.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230309045738.1261000-1-honnappa.nagarahalli@arm.com> References: <20230309045738.1261000-1-honnappa.nagarahalli@arm.com> MIME-Version: 1.0 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 Clarify that mempool cache flush API works with default mempool cache. It is applications responsibility to validate that the cache belongs to the specified mempool. Signed-off-by: Honnappa Nagarahalli Reviewed-by: Kamalakshitha Aligeri Reviewed-by: Ruifeng Wang Acked-by: Morten Brørup --- lib/mempool/rte_mempool.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index 9f530db24b..009bd10215 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -1326,10 +1326,14 @@ rte_mempool_default_cache(struct rte_mempool *mp, unsigned lcore_id) } /** - * Flush a user-owned mempool cache to the specified mempool. + * Flush a mempool cache to the specified mempool. + * + * It is application's responsibility to validate that the mempool cache + * belongs to the specified mempool. * * @param cache - * A pointer to the mempool cache. + * A pointer to the mempool cache. If NULL, default mempool cache + * is used if configured. * @param mp * A pointer to the mempool. */