From ec455b1cabb1ffc60c186c97a8e5e7244288e391 Mon Sep 17 00:00:00 2001 From: Jerin Jacob Date: Fri, 3 Mar 2017 22:57:44 +0530 Subject: [PATCH] test/eventdev: fix reconfigure values Minimum value of nb_event_ports and/or nb_event_queues should be one before reconfiguring the event device. Fixes: f8f9d233ea0e ("test/eventdev: add unit tests") Signed-off-by: Jerin Jacob Acked-by: Harry van Haaren --- test/test/test_eventdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c index 042a446044..e087af2fc8 100644 --- a/test/test/test_eventdev.c +++ b/test/test/test_eventdev.c @@ -244,8 +244,8 @@ test_eventdev_configure(void) /* re-configure */ devconf_set_default_sane_values(&dev_conf, &info); - dev_conf.nb_event_ports = info.max_event_ports/2; - dev_conf.nb_event_queues = info.max_event_queues/2; + dev_conf.nb_event_ports = RTE_MAX(info.max_event_ports/2, 1); + dev_conf.nb_event_queues = RTE_MAX(info.max_event_queues/2, 1); ret = rte_event_dev_configure(TEST_DEV_ID, &dev_conf); TEST_ASSERT_SUCCESS(ret, "Failed to re configure eventdev"); -- 2.20.1