[dpdk-dev] [PATCH 0/2] timer bugs fixes

Vadim Suraev vadim.suraev at gmail.com
Fri May 23 21:43:02 CEST 2014


Vadim Suraev (2):
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 if the modified timer is      
    in RUNNING state
Bug: When a timer is running       - if rte_timer_stop is called, the
    pending decrement is       skipped (decremented only if the timer
    is pending) and due       to the update flag the future processing
    is skipped so the       timer is counted as pending while it is
    stopped. - the same       applies when rte_timer_reset is called
    but then the pending       statistics is additionally incremented
    so the timer is       counted pending twice.     
Solution:
    decrement the pending       statistics after returning from the
    callback. If       rte_timer_stop was called, it skipped
    decrementing the       pending statistics. If rte_time_reset was
    called, the       pending statistics was incremented. If neither
    was called       and the timer is periodic, the pending statistics
    is       incremented when it is reloaded

 lib/librte_timer/rte_timer.c |   12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

-- 
1.7.9.5



More information about the dev mailing list