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"? Thanks, Olivier