Re: irdma: utils.c typos in irdma_cqp_gather_stats_gen1 ?

From: Joe Perches
Date: Tue Jun 08 2021 - 12:25:41 EST


On Tue, 2021-06-08 at 16:18 +0000, Saleem, Shiraz wrote:
> > > Looks reasonable to me. Wondering if irdma_update_stats should
> > > also use your IRDMA_STAT macro.
> >
> > Probably, and it could really a macro or two of its own.
> >
> > And it looks like that block has it's own copy/paste defects.
> >
> > Maybe:
> > ---
[]
> > +#define irdma_update_stat(index, var, size) \
>
> Maybe var --> name. Other than that looks good.

Just a suggestion. Do what you want with it.

And also the field name/MACRO mismatches are a bit odd at best.

I'd rename one or the other to match.

> + irdma_update_stat(IP4TXFRAGS, ip4txfrag, 48);
[]
> + irdma_update_stat(TCPTXSEG, tcptxsegs, 48);
[]
> + irdma_update_stat(RDMAVBND, rdmavbn, 48);