From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH v4 17/17] timer: add support to non-EAL thread Date: Wed, 11 Feb 2015 18:21:52 +0100 Message-ID: <54DB8FB0.2060303@6wind.com> References: <1422491072-5114-1-git-send-email-cunming.liang@intel.com> <1422842559-13617-1-git-send-email-cunming.liang@intel.com> <1422842559-13617-18-git-send-email-cunming.liang@intel.com> <54DA43AC.2030108@6wind.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit To: "Liang, Cunming" , "dev-VfR2kkLFssw@public.gmane.org" Return-path: In-Reply-To: List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces-VfR2kkLFssw@public.gmane.org Sender: "dev" 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