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 9C25F430BC; Mon, 21 Aug 2023 09:37:12 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2443740EE3; Mon, 21 Aug 2023 09:37:12 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id 9B6C340A7D for ; Mon, 21 Aug 2023 09:37:10 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id 6B65A20433; Mon, 21 Aug 2023 09:37:10 +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: [RFC] lib/st_ring: add single thread ring Date: Mon, 21 Aug 2023 09:37:06 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35D87B22@smartserver.smartshare.dk> In-Reply-To: <20230821060420.3509667-1-honnappa.nagarahalli@arm.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [RFC] lib/st_ring: add single thread ring Thread-Index: AdnT9VtCJpnVwipcTB6pW6lIwO/YIAACGwmw References: <20230821060420.3509667-1-honnappa.nagarahalli@arm.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Honnappa Nagarahalli" , , Cc: , , , , 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: Honnappa Nagarahalli [mailto:honnappa.nagarahalli@arm.com] > Sent: Monday, 21 August 2023 08.04 >=20 > Add a single thread safe and multi-thread unsafe ring data structure. > This library provides an simple and efficient alternative to multi- > thread > safe ring when multi-thread safety is not required. >=20 > Signed-off-by: Honnappa Nagarahalli > --- Good idea. However, I prefer it to be implemented in the ring lib as one more ring = type. That would also give us a lot of the infrastructure (management = functions, documentation and tests) for free. The ring lib already has performance-optimized APIs for single-consumer = and single-producer use, rte_ring_sc_dequeue_bulk() and = rte_ring_sp_enqueue_burst(). Similar performance-optimized APIs for = single-thread use could be added: rte_ring_st_dequeue_bulk() and = rte_ring_st_enqueue_burst(). Regardless if added to the ring lib or as a separate lib, "reverse" APIs = (for single-thread use only) and zero-copy APIs can be added at any time = later.