[dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread
Liang, Cunming
cunming.liang at intel.com
Thu Feb 12 01:29:55 CET 2015
Hi,
> -----Original Message-----
> From: Olivier MATZ [mailto:olivier.matz at 6wind.com]
> Sent: Thursday, February 12, 2015 1:22 AM
> To: Liang, Cunming; dev at dpdk.org
> Subject: Re: [dpdk-dev] [PATCH v4 17/17] timer: add support to non-EAL thread
>
> Hi,
>
> On 02/11/2015 07:25 AM, Liang, Cunming wrote:
> >>> + tim_lcore = rte_get_next_lcore(
> >>> + priv_timer[lcore_id].prev_lcore,
> >>> + 0, 1);
> >>> + priv_timer[lcore_id].prev_lcore = tim_lcore;
> >>> + } else
> >>> + tim_lcore = rte_get_next_lcore(LCORE_ID_ANY, 0, 1);
> >>
> >> I think the following line:
> >> tim_lcore = rte_get_next_lcore(LCORE_ID_ANY, 0, 1);
> >> Will return the first enabled core.
> >>
> >> Maybe using rte_get_master_lcore() is clearer?
> > [LCM] It doesn't expect must to be a master lcore.
> > Any available lcore is fine, so I think make sense to just use the first enabled
> core.
>
> Yes I agree it does not need to be the master lcore, but until recently
> the definition of the master lcore was "the first enabled core".
>
> I was thinking rte_get_master_lcore() is easier to understand
> that rte_get_next_lcore(LCORE_ID_ANY, 0, 1). If you still prefer
> to keep the second one, can you add a comment saying something like
> "non-EAL thread do not run rte_timer_manage(), so schedule the timer
> on the first enabled lcore"?
[LCM] That makes sense, will add it. Thanks.
>
> Thanks,
> Olivier
More information about the dev
mailing list