2021-08-23 13:03 (UTC+0000), William Tu: [...] > /* This macro permits both remove and free var within the loop safely.*/ > -#ifndef TAILQ_FOREACH_SAFE > -#define TAILQ_FOREACH_SAFE(var, head, field, tvar) \ > - for ((var) = TAILQ_FIRST((head)); \ > - (var) && ((tvar) = TAILQ_NEXT((var), field), 1); \ > +#ifndef RTE_TAILQ_FOREACH_SAFE > +#define RTE_TAILQ_FOREACH_SAFE(var, head, field, tvar) \ > + for ((var) = RTE_TAILQ_FIRST((head)); \ > + (var) && ((tvar) = RTE_TAILQ_NEXT((var), field), 1); \ > (var) = (tvar)) > #endif
1. Unlike TAILQ_FOREACH_SAFE, new RTE_ macro doesn't need #ifdef. 2. There should be no period at the end of the subject (./devtools/check-git-log.sh would show that). Except for these nits, Acked-by: Dmitry Kozlyuk <dmitry.kozl...@gmail.com>