[dpdk-stable] [dpdk-dev] [PATCH v2] lib/librte_timer:fix corruption with reset

Sarosh Arif sarosh.arif at emumba.com
Thu Jul 9 09:02:17 CEST 2020


On Wed, Jul 8, 2020 at 8:08 PM Stephen Hemminger <stephen at networkplumber.org>
wrote:

> On Wed,  8 Jul 2020 10:06:26 +0500
> Sarosh Arif <sarosh.arif at emumba.com> wrote:
>
> >  rte_timer_stop_sync(struct rte_timer *tim)
> >  {
> > +     struct rte_timer_data *timer_data;
> > +     TIMER_DATA_VALID_GET_OR_ERR_RET(default_data_id, timer_data,
> -EINVAL);
> > +     unsigned int lcore_id = rte_lcore_id();
>
> This mixing code and declarations. since the macro has a return statement.
>
> Maybe:
>
>         struct rte_timer_data *timer_data;
>         unsigned int lcore_id = rte_lcore_id();
>
>         TIMER_DATA_VALID_GET_OR_ERR_RET(default_data_id, timer_data,
> -EINVAL);
>
I will fix this in the next version.


More information about the stable mailing list