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 3BDEDA0542; Sun, 9 Oct 2022 13:12:05 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 786F341141; Sun, 9 Oct 2022 13:12:01 +0200 (CEST) Received: from shelob.oktetlabs.ru (shelob.oktetlabs.ru [91.220.146.113]) by mails.dpdk.org (Postfix) with ESMTP id 5D657400D5 for ; Sun, 9 Oct 2022 13:11:59 +0200 (CEST) Received: by shelob.oktetlabs.ru (Postfix, from userid 115) id 12D1C7B; Sun, 9 Oct 2022 14:11:59 +0300 (MSK) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mail1.oktetlabs.ru X-Spam-Level: X-Spam-Status: No, score=0.8 required=5.0 tests=ALL_TRUSTED, DKIM_ADSP_DISCARD autolearn=no autolearn_force=no version=3.4.6 Received: from aros.oktetlabs.ru (aros.oktetlabs.ru [192.168.38.17]) by shelob.oktetlabs.ru (Postfix) with ESMTP id 28EA769; Sun, 9 Oct 2022 14:11:58 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 shelob.oktetlabs.ru 28EA769 Authentication-Results: shelob.oktetlabs.ru/28EA769; dkim=none; dkim-atps=neutral From: Andrew Rybchenko To: Olivier Matz Cc: dev@dpdk.org, =?UTF-8?q?Morten=20Br=C3=B8rup?= Subject: [PATCH 2/2] mempool: avoid usage of term ring on put Date: Sun, 9 Oct 2022 14:11:54 +0300 Message-Id: <20221009111154.213253-2-andrew.rybchenko@oktetlabs.ru> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221009111154.213253-1-andrew.rybchenko@oktetlabs.ru> References: <20220202103354.79832-1-mb@smartsharesystems.com> <20221009111154.213253-1-andrew.rybchenko@oktetlabs.ru> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Term ring is misleading since it is the default, but still just one of possible drivers to store objects. Signed-off-by: Andrew Rybchenko --- lib/mempool/rte_mempool.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/mempool/rte_mempool.h b/lib/mempool/rte_mempool.h index 95d64901e5..c2d4e8ba55 100644 --- a/lib/mempool/rte_mempool.h +++ b/lib/mempool/rte_mempool.h @@ -1331,7 +1331,7 @@ rte_mempool_do_generic_put(struct rte_mempool *mp, void * const *obj_table, /* No cache provided or if put would overflow mem allocated for cache */ if (unlikely(cache == NULL || n > RTE_MEMPOOL_CACHE_MAX_SIZE)) - goto ring_enqueue; + goto driver_enqueue; cache_objs = &cache->objs[cache->len]; @@ -1339,7 +1339,7 @@ rte_mempool_do_generic_put(struct rte_mempool *mp, void * const *obj_table, * The cache follows the following algorithm * 1. Add the objects to the cache * 2. Anything greater than the cache min value (if it crosses the - * cache flush threshold) is flushed to the ring. + * cache flush threshold) is flushed to the backend. */ /* Add elements back into the cache */ @@ -1355,9 +1355,9 @@ rte_mempool_do_generic_put(struct rte_mempool *mp, void * const *obj_table, return; -ring_enqueue: +driver_enqueue: - /* push remaining objects in ring */ + /* push objects to the backend */ rte_mempool_ops_enqueue_bulk(mp, obj_table, n); } -- 2.30.2