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 353E8A0543; Thu, 7 Jul 2022 21:10:04 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 293A640A7B; Thu, 7 Jul 2022 21:10:04 +0200 (CEST) Received: from wout3-smtp.messagingengine.com (wout3-smtp.messagingengine.com [64.147.123.19]) by mails.dpdk.org (Postfix) with ESMTP id 45F344069D for ; Thu, 7 Jul 2022 21:10:02 +0200 (CEST) Received: from compute3.internal (compute3.nyi.internal [10.202.2.43]) by mailout.west.internal (Postfix) with ESMTP id 00EEB32009AF; Thu, 7 Jul 2022 15:10:00 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute3.internal (MEProxy); Thu, 07 Jul 2022 15:10:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm3; t=1657221000; x= 1657307400; bh=77aKdjnvkqNkMzBzwZXAJNIluBI30Yx0Ss2DlM/STwg=; b=I 4CjG62j8rGMbID7s7AmROaJFJi4p+AQUuIJmWWBT/jfbdhWfIVz255MnhUModo6Y 1lUBWupyD7840KFGOirkK1Yyxb9NFvcChxHeYqULczFUeyBCCtmUY1ZuEofDaRMI F9l0JsP5Rr64mnxlpxJwQ6hm1vlX8VxHLHpcVuiTiTmywdjc+y5/h91mPk4COX5c vLDt2q+uFzy+mNGot885FKZ6WvxQzt/W1UHXTNR+8Dm01sSa5UOYPOqPAn3wgkg/ PWGQUsG4dWMJRCZYNdZKpfCAF8wrGfw61LN63Ixiv3xFLNyliGsVyd+pHz9LhcPk DvaO9TaocyQpIVm69BhPw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1657221000; x= 1657307400; bh=77aKdjnvkqNkMzBzwZXAJNIluBI30Yx0Ss2DlM/STwg=; b=A vl8P3vPtzVRYfFQuhNnQ9BQ7L0Q9OSuvruOaQQNuhG2uf834eOk9jquYqW5U55OU WaYTueY5YNGcfqpWzItvB56EVmgpQ9ykn51wX05ZnazditD0kig01yCjxikXwyti 2C/xWNLd++1T9i4zMnCrQWXp02aW4dEtbr+UIqsRFOu298p2ZxirwcN275AWZ0uE bwn4nNR6zmux3rtTfP+3gBcslD3NOZYMZszEe9m9pf0mOP1Q+22Pxi/l2H1gJ9ge GxrxbIH07tZcLBP9I8ClRF2Uzu1+PWSioyPKfzYGz55YJomQ5jFVscwsgQ1Zgvkw 2/xYO3VyqCBBtg6ZAsxDQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeihedgudefgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefhvfevufffkfgjfhgggfgtsehtufertddttddvnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdejieeifeehtdffgfdvleetueeffeehueejgfeuteeftddt ieekgfekudehtdfgnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 7 Jul 2022 15:09:59 -0400 (EDT) From: Thomas Monjalon To: "Khan, Hamza" Cc: "dev@dpdk.org" Subject: Re: [PATCH 1/2] common: add safe version of foreach-list to Linux Date: Thu, 07 Jul 2022 21:09:57 +0200 Message-ID: <3580418.ZkOooBPedc@thomas> In-Reply-To: References: <20220601105455.166505-1-hamza.khan@intel.com> <14252746.lhuNh5TYOU@thomas> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" 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 07/07/2022 17:59, Khan, Hamza: > > > -----Original Message----- > > From: Thomas Monjalon > > Sent: Tuesday 5 July 2022 17:16 > > To: Khan, Hamza > > Cc: dev@dpdk.org > > Subject: Re: [PATCH 1/2] common: add safe version of foreach-list to Linux > > > > 01/06/2022 12:54, Hamza Khan: > > > Linux EAL does not have the LIST_FOREACH_SAFE version of the iterator > > > macros. Add it. > > > > > > Signed-off-by: Hamza Khan > > > --- > > > lib/eal/linux/include/rte_os.h | 7 +++++++ > > > 1 file changed, 7 insertions(+) > > > > > > diff --git a/lib/eal/linux/include/rte_os.h > > > b/lib/eal/linux/include/rte_os.h index c72bf5b7e6..00d7714181 100644 > > > --- a/lib/eal/linux/include/rte_os.h > > > +++ b/lib/eal/linux/include/rte_os.h > > > @@ -26,6 +26,13 @@ extern "C" { > > > #define RTE_STAILQ_HEAD(name, type) STAILQ_HEAD(name, type) > > #define > > > RTE_STAILQ_ENTRY(type) STAILQ_ENTRY(type) > > > > > > +#ifndef LIST_FOREACH_SAFE > > > +#define LIST_FOREACH_SAFE(var, head, field, tvar) > > \ > > > + for ((var) = LIST_FIRST((head)); \ > > > + (var) && ((tvar) = LIST_NEXT((var), field), 1); \ > > > + (var) = (tvar)) > > > +#endif > > > > I'm not sure we want to add such thing without a RTE_ prefix. > > And we should not need LIST_*, we have RTE_TAILQ_*. > > > > > I have sent v2 patch with the aforementioned fix. > However Is being held until the list moderator can review it for approval I've unblocked it. This is blocked because you are not registered in the mailing list, so it is considered as spam.