summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNikhil Rao <nikhil.rao@intel.com>2018-09-27 11:16:14 +0530
committerJerin Jacob <jerin.jacob@caviumnetworks.com>2018-10-01 16:52:21 +0200
commit6298ec1bf8539e259595411a4af382487d32ec5c (patch)
tree6d3f3dccfffa9a12a75f6ca738c6cde650a91f65 /test
parent1dedffeba714eebb462e1cfa8c322db0bfede9c9 (diff)
downloaddpdk-6298ec1bf8539e259595411a4af382487d32ec5c.zip
dpdk-6298ec1bf8539e259595411a4af382487d32ec5c.tar.gz
dpdk-6298ec1bf8539e259595411a4af382487d32ec5c.tar.xz
test/event: fix build for timer adapter
Limit the number of objects passed to rte_mempool_put_bulk() to the size of the object table. This fix eliminates a compiler warning (array-bounds) triggered when the march command line parameter to gcc is set to nehalem. Fixes: d1f3385d0076 ("test: add event timer adapter auto-test") Cc: stable@dpdk.org Signed-off-by: Nikhil Rao <nikhil.rao@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Diffstat (limited to 'test')
-rw-r--r--test/test/test_event_timer_adapter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/test/test_event_timer_adapter.c b/test/test/test_event_timer_adapter.c
index 93471db..a45b7d1 100644
--- a/test/test/test_event_timer_adapter.c
+++ b/test/test/test_event_timer_adapter.c
@@ -792,7 +792,7 @@ _cancel_burst_thread(void *args)
TEST_ASSERT_EQUAL(n, ret, "Failed to cancel complete burst of "
"event timers");
rte_mempool_put_bulk(eventdev_test_mempool, (void **)ev_tim,
- ret);
+ RTE_MIN(ret, MAX_BURST));
cancel_count += ret;
}