DPDK patches and discussions
 help / color / mirror / Atom feed
From: "Khan, Hamza" <hamza.khan@intel.com>
To: Thomas Monjalon <thomas@monjalon.net>
Cc: "dev@dpdk.org" <dev@dpdk.org>
Subject: RE: [PATCH 1/2] common: add safe version of foreach-list to Linux
Date: Thu, 7 Jul 2022 15:59:37 +0000	[thread overview]
Message-ID: <PH0PR11MB5159AC6A9B3A79732AC0A8D592839@PH0PR11MB5159.namprd11.prod.outlook.com> (raw)
In-Reply-To: <14252746.lhuNh5TYOU@thomas>



> -----Original Message-----
> From: Thomas Monjalon <thomas@monjalon.net>
> Sent: Tuesday 5 July 2022 17:16
> To: Khan, Hamza <hamza.khan@intel.com>
> 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 <hamza.khan@intel.com>
> > ---
> >  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


  reply	other threads:[~2022-07-07 19:09 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-01 10:54 Hamza Khan
2022-06-01 10:54 ` [PATCH 2/2] examples/vm_power_manager: use safe version of list iterator Hamza Khan
2022-07-04 12:31   ` Hunt, David
2022-07-05  2:38     ` Li, WeiyuanX
2022-07-04 13:45 ` [PATCH 1/2] common: add safe version of foreach-list to Linux Khan, Hamza
2022-07-05 16:16 ` Thomas Monjalon
2022-07-07 15:59   ` Khan, Hamza [this message]
2022-07-07 19:09     ` Thomas Monjalon
2022-07-08  8:56       ` Khan, Hamza
2022-07-08  9:25         ` Thomas Monjalon
2022-07-08  9:28           ` Khan, Hamza
2022-07-07 15:48 ` [PATCH v2] examples/vm_power_manager: use safe version of list iterator Hamza Khan
2022-07-08  8:51 ` [PATCH v3] " Hamza Khan
2022-07-08  9:28   ` Hunt, David
2022-07-19 18:25   ` Pattan, Reshma
2022-08-22 10:58   ` [PATCH v4] " Reshma Pattan
2022-08-22 11:29     ` Hunt, David
2022-10-04 22:09     ` [PATCH v5] " Reshma Pattan
2022-10-05 10:17       ` Thomas Monjalon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=PH0PR11MB5159AC6A9B3A79732AC0A8D592839@PH0PR11MB5159.namprd11.prod.outlook.com \
    --to=hamza.khan@intel.com \
    --cc=dev@dpdk.org \
    --cc=thomas@monjalon.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).