From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olivier MATZ Subject: Re: [PATCH] timer bug fix Date: Fri, 23 May 2014 16:52:38 +0200 Message-ID: <537F60B6.6060409@6wind.com> References: <1400702025-11139-1-git-send-email-vadim.suraev@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit To: Vadim Suraev , dev-VfR2kkLFssw@public.gmane.org Return-path: In-Reply-To: <1400702025-11139-1-git-send-email-vadim.suraev-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 Vadim, It's even more simple that what I've suggested. It should work since the only case where state is RTE_TIMER_RUNNING is that we are modifying the timer currently running on the same lcore. Indeed, timer_set_config_state() prevents us to modify a running timer belonging to another lcore. Just 3 small typos: On 05/21/2014 09:53 PM, Vadim Suraev wrote: > Bug: when a periodic timer's callback is running, if another > timer is manipulated, the periodic timer is not reloaded. > Solution: set the update flag only is the modified timer is > in RUNNING state s/is the modified/if the modified > - priv_timer[lcore_id].updated = 1; > + if(prev_status.state == RTE_TIMER_RUNNING) { > + priv_timer[lcore_id].updated = 1; > + } missing a space after the if. > - priv_timer[lcore_id].updated = 1; > + if(prev_status.state == RTE_TIMER_RUNNING) { > + priv_timer[lcore_id].updated = 1; > + } same here. Acked-by: Olivier Matz