Re: [RFC PATCH 07/19] table: fix issues with variable shadowing

Bruce Richardson
2025-11-06T19:58:45Z

On Thu, Nov 06, 2025 at 11:37:16AM -0800, Stephen Hemminger wrote:
> On Thu, 6 Nov 2025 14:09:36 +0000
> Bruce Richardson <bruce.richardson@intel.com> wrote:
>
> > diff --git a/lib/table/rte_lru.h b/lib/table/rte_lru.h
> > index 28aab12923..1436425e16 100644
> > --- a/lib/table/rte_lru.h
> > +++ b/lib/table/rte_lru.h
> > @@ -41,33 +41,33 @@ while (0)
> >
> > #define lru_update(bucket, mru_val) \
> > do { \
> > - uint64_t x, pos, x0, x1, x2, mask; \
>
> Why is this a macro? Prefer inline functions where there is checking on types etc.

I asked myself the same question as I was working on this. :-) However,
changing it to a function is beyond the scope of this patchset.