[dpdk-stable] [PATCH v2] examples/multi_proces: fix Rx packets distribution
Thomas Monjalon
thomas at monjalon.net
Tue Nov 9 15:17:00 CET 2021
09/11/2021 12:49, Gregory Etelson:
> Hello Thomas,
>
> > 09/11/2021 10:58, Gregory Etelson:
> > > - uint8_t client = 0;
> > > + /*
> > > + * C99: All objects with static storage
> > duration
> > > + * shall be initialized (set to their initial
> > values) before
> > > + * program startup.
> > > + */
> >
> > Why adding this comment?
> >
> > > + static uint8_t client;
> >
> >
>
> C99 optimization that was used here is not obvious.
> The patch relies on client=0 initialization.
> I added the comment to clarify why the client was not initialized.
I think it is the C standard, not only C99.
As far as I know, having static as 0 is obvious for a lot of people.
More information about the stable
mailing list