[dpdk-dev] [PATCH v2 3/3] timer: fix race condition in rte_timer_manage()

2015-07-27 Thread rsanfo...@gmail.com
From: Robert Sanford Eliminate problematic race condition in rte_timer_manage() that can lead to corruption of per-lcore pending-lists (implemented as skip-lists). The race condition occurs when rte_timer_manage() expires multiple timers on lcore A, while lcore B simultaneously invokes rte_timer_

[dpdk-dev] [PATCH v2 2/3] timer: add timer-manage race condition test

2015-07-27 Thread rsanfo...@gmail.com
From: Robert Sanford Add new timer-manage race-condition test: We wrote a test to confirm our suspicion that we could crash rte_timer_manage() under the right circumstances. We repeatedly set several timers to expire at roughly the same time on the master core. The master lcore just delays and ru

[dpdk-dev] [PATCH v2 1/3] timer: fix stress test 2 synchronization bug

2015-07-27 Thread rsanfo...@gmail.com
From: Robert Sanford Fix app/test timer stress test 2: Sometimes this test fails and seg-faults because the slave lcores get out of phase with the master. The master uses a single int, 'ready', to synchronize multiple slave lcores through multiple phases of the test. To resolve, we construct sim

[dpdk-dev] [PATCH v2 0/3] timer: fix rte_timer_manage and improve unit tests

2015-07-27 Thread rsanfo...@gmail.com
From: Robert Sanford This patchset fixes a bug in timer stress test 2, adds a new stress test to expose a race condition bug in API rte_timer_manage(), and then fixes the rte_timer_manage() bug. Description of rte_timer_manage() race condition bug: Through code inspection, we notice a potential

[dpdk-dev] [PATCH 3/3] timer: fix race condition in rte_timer_manage()

2015-07-23 Thread rsanfo...@gmail.com
From: Robert Sanford Signed-off-by: Robert Sanford --- lib/librte_timer/rte_timer.c | 45 +++-- 1 files changed, 29 insertions(+), 16 deletions(-) diff --git a/lib/librte_timer/rte_timer.c b/lib/librte_timer/rte_timer.c index 8e9243a..51e6038 100644 --- a/

[dpdk-dev] [PATCH 2/3] timer: add timer-manage race condition test

2015-07-23 Thread rsanfo...@gmail.com
From: Robert Sanford Signed-off-by: Robert Sanford --- app/test/Makefile |1 + app/test/test_timer_racecond.c | 209 2 files changed, 210 insertions(+), 0 deletions(-) create mode 100644 app/test/test_timer_racecond.c diff --git a/app

[dpdk-dev] [PATCH 1/3] timer: fix stress test 2 synchronization bug

2015-07-23 Thread rsanfo...@gmail.com
From: Robert Sanford Signed-off-by: Robert Sanford --- app/test/test_timer.c | 149 ++--- 1 files changed, 116 insertions(+), 33 deletions(-) diff --git a/app/test/test_timer.c b/app/test/test_timer.c index 73da5b6..dd63421 100644 --- a/app/test/tes

[dpdk-dev] [PATCH 0/3] timer: fix rte_timer_manage and improve unit tests

2015-07-23 Thread rsanfo...@gmail.com
From: Robert Sanford This patchset fixes a bug in timer stress test 2, adds a new stress test to expose a race condition bug in API rte_timer_manage(), and then fixes the rte_timer_manage() bug. -- Patch 1, app/test timer stress test 2: Sometimes this test fails and seg-faults because the slave

[dpdk-dev] [RFC PATCH] rte_timer: Fix rte_timer_reset return value

2015-02-03 Thread rsanfo...@gmail.com
From: Robert Sanford - API rte_timer_reset() should return -1 when the timer is in the RUNNING or CONFIG state. Instead, it ignores the return value of internal function __rte_timer_reset() and always returns 0. We change rte_timer_reset() to return the value returned by __rte_timer_reset(). - C

[dpdk-dev] [PATCH v2] malloc: fix malloc and free linear complexity

2014-05-16 Thread rsanfo...@gmail.com
Problems with lib rte_malloc: 1. Rte_malloc searches a heap's entire free list looking for the best fit, resulting in linear complexity. 2. Heaps store free blocks in a singly-linked list, resulting in linear complexity when rte_free needs to remove an adjacent block. 3. The library