From: Jerin Jacob Date: Fri, 3 Mar 2017 17:27:44 +0000 (+0530) Subject: test/eventdev: fix reconfigure values X-Git-Tag: spdx-start~3857 X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=ec455b1cabb1ffc60c186c97a8e5e7244288e391;p=dpdk.git 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 --- 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");