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 A7E5F43E14; Sat, 6 Apr 2024 11:35:04 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2D0E7402C0; Sat, 6 Apr 2024 11:35:04 +0200 (CEST) Received: from dkmailrelay1.smartsharesystems.com (smartserver.smartsharesystems.com [77.243.40.215]) by mails.dpdk.org (Postfix) with ESMTP id D3B854028C for ; Sat, 6 Apr 2024 11:35:02 +0200 (CEST) Received: from smartserver.smartsharesystems.com (smartserver.smartsharesys.local [192.168.4.10]) by dkmailrelay1.smartsharesystems.com (Postfix) with ESMTP id A92FD21276; Sat, 6 Apr 2024 11:35:02 +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 v1 1/2] deque: add multi-thread unsafe double ended queue Date: Sat, 6 Apr 2024 11:35:00 +0200 X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <98CBD80474FA8B44BF855DF32C47DC35E9F370@smartserver.smartshare.dk> In-Reply-To: <20240401013729.1466298-2-aditya.ambadipudi@arm.com> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: [PATCH v1 1/2] deque: add multi-thread unsafe double ended queue Thread-Index: AdqD1TA8GIuziBDFRbiWRBqrJ1gZVAELe/fQ References: <20230821060420.3509667-1-honnappa.nagarahalli@arm.com> <20240401013729.1466298-1-aditya.ambadipudi@arm.com> <20240401013729.1466298-2-aditya.ambadipudi@arm.com> From: =?iso-8859-1?Q?Morten_Br=F8rup?= To: "Aditya Ambadipudi" , , , , , , , , , Cc: , , , , , "Honnappa Nagarahalli" 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: Aditya Ambadipudi [mailto:aditya.ambadipudi@arm.com] > Sent: Monday, 1 April 2024 03.37 >=20 > From: Honnappa Nagarahalli >=20 > Add a multi-thread unsafe double ended queue data structure. This > library provides a simple and efficient alternative to multi-thread > safe ring when multi-thread safety is not required. >=20 > Signed-off-by: Aditya Ambadipudi > Signed-off-by: Honnappa Nagarahalli > --- This is a good contribution, thank you. Two high-level comments: 1. Please use head/tail explicitly in function names, not implicitly. E.g. rename rte_deque_enqueue_bulk_elem() to = rte_deque_enqueue_at_head_bulk_elem(), like = rte_deque_enqueue_at_tail_bulk_elem(). Also consider removing "at" from the function names, e.g. = rte_deque_(head|tail)_enqueue_bulk_elem() instead of = rte_deque_enqueue_at_(head|tail)_bulk_elem(). 2. In the future, someone might come up with a lock-free implementation, = like for the stack. Please ensure that the API and documentation is prepared for that, so we = don't have to use a different namespace for such a lock-free = implementation. I haven't reviewed the patch thoroughly; if it is already be prepared = for this, you can ignore this comment.