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 F293E4577A; Fri, 9 Aug 2024 17:00:54 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DF31E42D78; Fri, 9 Aug 2024 17:00:54 +0200 (CEST) Received: from mail-pg1-f180.google.com (mail-pg1-f180.google.com [209.85.215.180]) by mails.dpdk.org (Postfix) with ESMTP id 3760A4025F for ; Fri, 9 Aug 2024 17:00:53 +0200 (CEST) Received: by mail-pg1-f180.google.com with SMTP id 41be03b00d2f7-71871d5e087so1238912a12.1 for ; Fri, 09 Aug 2024 08:00:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1723215652; x=1723820452; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=31WgDy0GqBCQ5fAobni3CDn++LgjWkaBPiO2kR/TCZo=; b=TdtTNitMlBMJzHfpwU6cLCItIw2Id64zWgd1MPxsK0wMUxVrxLDN+jkoG+/1LsfE/q mRamWE3EUMTuISYjJoZaGzY4z6RmtnPnAFATm9wBKsQtyeMiCAMs2mPNa7bIuNDEDxhk 0WyxQ5rN0vlU4Sbuw7QqzSlOuqRRWCWoGBIaFH0CteLeD0RmxzfV7sGwEUIqb4sJDi6r fmcWkNJvtxT+HFV0bxxZPMvhrUXRhj9jCooUhVNidtUJbPZjZltnhQzgiM6+igpjhq/D iP8o/B7+REtO46dvSzJA0NOdbk7hioqQQhyleU8x14r5fkrUEFVUsbDweyzN2WCdCVu3 kXGQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1723215652; x=1723820452; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=31WgDy0GqBCQ5fAobni3CDn++LgjWkaBPiO2kR/TCZo=; b=bSb5lr5gWBAwdmZtkPFojvzdTxf3HtIQXqvzYJE9BLbL7VmxOUq28gfUYvreKRLJ1J qnCqQYsLM0YnEiLhY+X6YiOXy8aP7Nr0yEjlfWJJt5CO7zlne7qDBdc/gKQWUEi/cIGq 5mFk8WpJdqYZ2TDn96r2cv29zCc3kzJXyyvnckQCjezmy4F+V6020FB6/EQsL7p/LlvM ohjWOd9hZaLp1pVwAvXuOZFz/h5lT0THrj33CIAHnrsV+Yn+k14B2EtIpN4B14eMWeQi PA0BdwD/0SJsBpFksGAyCiF7y0OuemFab4dx+FEYOp7E6XxMMZpoIfYTTFeqlbj4v+Po gM/w== X-Gm-Message-State: AOJu0YwPu4/WO8vtdO6bph55tIgeyNRLveqUxBpXKXzKUyvtAKiK3sNL n8fuCkZxzSnFM7Jje70PpWYTlPuu06bJo0vfkBQ7XtCqNmySxiI9YwLCcq4L6RXNRiEEKO2zTsO j X-Google-Smtp-Source: AGHT+IGed4UVVChFl3Q9ooPy7elwiG2+CI4o4BU+yYp4PDedp3xXR4f5830fhtS/XjDwOFdc5KqIdQ== X-Received: by 2002:a17:90b:503:b0:2cf:f3c5:871b with SMTP id 98e67ed59e1d1-2d1e7f95178mr1897902a91.6.1723215651563; Fri, 09 Aug 2024 08:00:51 -0700 (PDT) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id 98e67ed59e1d1-2d1b3afa6b6sm5404145a91.32.2024.08.09.08.00.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Aug 2024 08:00:51 -0700 (PDT) Date: Fri, 9 Aug 2024 08:00:49 -0700 From: Stephen Hemminger To: Morten =?UTF-8?B?QnLDuHJ1cA==?= Cc: Subject: Re: [PATCH 5/5] eal: simplify eal alarm cancel by using LIST_FOREACH_SAFE Message-ID: <20240809080049.1a627951@hermes.local> In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F60E@smartserver.smartshare.dk> References: <20240808194756.167664-1-stephen@networkplumber.org> <20240808194756.167664-6-stephen@networkplumber.org> <98CBD80474FA8B44BF855DF32C47DC35E9F60E@smartserver.smartshare.dk> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable 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 On Fri, 9 Aug 2024 10:33:49 +0200 Morten Br=C3=B8rup wrote: > > +++ b/lib/eal/linux/eal_alarm.c > > @@ -53,6 +53,13 @@ static struct rte_intr_handle *intr_handle; > > static int handler_registered =3D 0; > > static void eal_alarm_callback(void *arg); > >=20 > > +#ifndef LIST_FOREACH_SAFE > > +#define LIST_FOREACH_SAFE(var, head, field, tvar) \ > > + for ((var) =3D LIST_FIRST((head)); \ > > + (var) && ((tvar) =3D LIST_NEXT((var), field), 1); \ > > + (var) =3D (tvar)) > > +#endif =20 >=20 > This macro is already defined for Windows [1]; isn't it also defined in s= ome Linux/BSD standard header file already? >=20 > [1]: https://elixir.bootlin.com/dpdk/v24.07/source/lib/eal/windows/includ= e/sys/queue.h#L515 >=20 Unfortunately, sys/queue.h on Linux is stuck on some old version. There maybe more complete version on some libbsd headers but don't want to get into having that dependency.