From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id A4C76199C5 for ; Fri, 8 Sep 2017 17:18:10 +0200 (CEST) Received: from orsmga005.jf.intel.com ([10.7.209.41]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 08 Sep 2017 08:18:09 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.42,362,1500966000"; d="scan'208";a="147035374" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by orsmga005.jf.intel.com with ESMTP; 08 Sep 2017 08:18:09 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, Harry van Haaren Date: Fri, 8 Sep 2017 16:18:13 +0100 Message-Id: <1504883894-43451-4-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1504883894-43451-1-git-send-email-harry.van.haaren@intel.com> References: <1500900500-144237-1-git-send-email-harry.van.haaren@intel.com> <1504883894-43451-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH v2 3/4] eventdev: add queue attribute function X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Sep 2017 15:18:11 -0000 This commit adds a generic queue attribute function. It also removes the previous rte_event_queue_priority() and priority() functions, and updates the map files and unit tests to use the new attr functions. Signed-off-by: Harry van Haaren --- lib/librte_eventdev/rte_eventdev.c | 47 ++++++++-------- lib/librte_eventdev/rte_eventdev.h | 49 ++++++++--------- lib/librte_eventdev/rte_eventdev_version.map | 3 +- test/test/test_eventdev.c | 80 +++++++++++++++++++++------- test/test/test_eventdev_octeontx.c | 75 +++++++++++++++++++------- 5 files changed, 166 insertions(+), 88 deletions(-) diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c index 177dc6b..85c0960 100644 --- a/lib/librte_eventdev/rte_eventdev.c +++ b/lib/librte_eventdev/rte_eventdev.c @@ -609,27 +609,6 @@ rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, return (*dev->dev_ops->queue_setup)(dev, queue_id, queue_conf); } -uint8_t -rte_event_queue_count(uint8_t dev_id) -{ - struct rte_eventdev *dev; - - dev = &rte_eventdevs[dev_id]; - return dev->data->nb_queues; -} - -uint8_t -rte_event_queue_priority(uint8_t dev_id, uint8_t queue_id) -{ - struct rte_eventdev *dev; - - dev = &rte_eventdevs[dev_id]; - if (dev->data->event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_QOS) - return dev->data->queues_prio[queue_id]; - else - return RTE_EVENT_DEV_PRIORITY_NORMAL; -} - static inline int is_valid_port(struct rte_eventdev *dev, uint8_t port_id) { @@ -794,6 +773,32 @@ rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, } int +rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, + uint32_t *attr_value /*out */) +{ + struct rte_eventdev *dev; + + if(!attr_value) + return -EINVAL; + + RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL); + dev = &rte_eventdevs[dev_id]; + if (!is_valid_queue(dev, queue_id)) { + RTE_EDEV_LOG_ERR("Invalid queue_id=%" PRIu8, queue_id); + return -EINVAL; + } + + switch(attr_id) { + case RTE_EVENT_QUEUE_ATTR_PRIORITY: + *attr_value = RTE_EVENT_DEV_PRIORITY_NORMAL; + if (dev->data->event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_QOS) + *attr_value = dev->data->queues_prio[queue_id]; + break; + }; + return 0; +} + +int rte_event_port_link(uint8_t dev_id, uint8_t port_id, const uint8_t queues[], const uint8_t priorities[], uint16_t nb_links) diff --git a/lib/librte_eventdev/rte_eventdev.h b/lib/librte_eventdev/rte_eventdev.h index e931eb2..cd3026d 100644 --- a/lib/librte_eventdev/rte_eventdev.h +++ b/lib/librte_eventdev/rte_eventdev.h @@ -606,33 +606,6 @@ int rte_event_queue_setup(uint8_t dev_id, uint8_t queue_id, const struct rte_event_queue_conf *queue_conf); -/** - * Get the number of event queues on a specific event device - * - * @param dev_id - * Event device identifier. - * @return - * - The number of configured event queues - */ -uint8_t -rte_event_queue_count(uint8_t dev_id); - -/** - * Get the priority of the event queue on a specific event device - * - * @param dev_id - * Event device identifier. - * @param queue_id - * Event queue identifier. - * @return - * - If the device has RTE_EVENT_DEV_CAP_QUEUE_QOS capability then the - * configured priority of the event queue in - * [RTE_EVENT_DEV_PRIORITY_HIGHEST, RTE_EVENT_DEV_PRIORITY_LOWEST] range - * else the value RTE_EVENT_DEV_PRIORITY_NORMAL - */ -uint8_t -rte_event_queue_priority(uint8_t dev_id, uint8_t queue_id); - /* Event port specific APIs */ /** Event port configuration structure */ @@ -765,6 +738,28 @@ rte_event_port_attr_get(uint8_t dev_id, uint8_t port_id, uint32_t attr_id, uint32_t *attr_value /*out */); /** + * The priority of the queue. + */ +#define RTE_EVENT_QUEUE_ATTR_PRIORITY 0 + +/** + * Get an attribute from a queue. + * + * @param dev_id Eventdev id + * @param queue_id Eventdev queue id + * @param attr_id The attribute ID to retrieve + * @param[out] attr_value A pointer that will be filled in with the attribute + * value if successful + * + * @retval 0 Successfully returned value + * -EINVAL invalid device, queue or attr_id provided, or attr_value + * was NULL + */ +int +rte_event_queue_attr_get(uint8_t dev_id, uint8_t queue_id, uint32_t attr_id, + uint32_t *attr_value /*out */); + +/** * Start an event device. * * The device start step is the last one and consists of setting the event diff --git a/lib/librte_eventdev/rte_eventdev_version.map b/lib/librte_eventdev/rte_eventdev_version.map index 484a071..c3854f4 100644 --- a/lib/librte_eventdev/rte_eventdev_version.map +++ b/lib/librte_eventdev/rte_eventdev_version.map @@ -27,8 +27,6 @@ DPDK_17.05 { rte_event_queue_default_conf_get; rte_event_queue_setup; - rte_event_queue_count; - rte_event_queue_priority; rte_event_dequeue_timeout_ticks; @@ -56,5 +54,6 @@ EXPERIMENTAL { rte_event_dev_attr_get; rte_event_port_attr_get; + rte_event_queue_attr_get; } DPDK_17.08; diff --git a/test/test/test_eventdev.c b/test/test/test_eventdev.c index a87b113..9b738e0 100644 --- a/test/test/test_eventdev.c +++ b/test/test/test_eventdev.c @@ -273,7 +273,12 @@ test_eventdev_queue_default_conf_get(void) ret = rte_event_queue_default_conf_get(TEST_DEV_ID, 0, NULL); TEST_ASSERT(ret == -EINVAL, "Expected -EINVAL, %d", ret); - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf); TEST_ASSERT_SUCCESS(ret, "Failed to get queue%d info", i); @@ -318,8 +323,12 @@ test_eventdev_queue_setup(void) ret = rte_event_queue_setup(TEST_DEV_ID, 0, &qconf); TEST_ASSERT_SUCCESS(ret, "Failed to setup queue0"); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_setup(TEST_DEV_ID, i, NULL); TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i); } @@ -336,8 +345,12 @@ test_eventdev_queue_count(void) ret = rte_event_dev_info_get(TEST_DEV_ID, &info); TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); - TEST_ASSERT_EQUAL(rte_event_queue_count(TEST_DEV_ID), - info.max_event_queues, "Wrong queue count"); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + TEST_ASSERT_EQUAL(queue_count, info.max_event_queues, + "Wrong queue count"); return TEST_SUCCESS; } @@ -353,7 +366,12 @@ test_eventdev_queue_priority(void) ret = rte_event_dev_info_get(TEST_DEV_ID, &info); TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_default_conf_get(TEST_DEV_ID, i, &qconf); TEST_ASSERT_SUCCESS(ret, "Failed to get queue%d def conf", i); @@ -362,8 +380,13 @@ test_eventdev_queue_priority(void) TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i); } - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { - priority = rte_event_queue_priority(TEST_DEV_ID, i); + for (i = 0; i < (int)queue_count; i++) { + uint32_t tmp; + TEST_ASSERT_SUCCESS(rte_event_queue_attr_get(TEST_DEV_ID, i, + RTE_EVENT_QUEUE_ATTR_PRIORITY, &tmp), + "Queue count get failed"); + priority = tmp; + if (info.event_dev_cap & RTE_EVENT_DEV_CAP_QUEUE_QOS) TEST_ASSERT_EQUAL(priority, i % RTE_EVENT_DEV_PRIORITY_LOWEST, @@ -544,7 +567,11 @@ test_eventdev_start_stop(void) ret = eventdev_configure_setup(); TEST_ASSERT_SUCCESS(ret, "Failed to configure eventdev"); - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_setup(TEST_DEV_ID, i, NULL); TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i); } @@ -560,8 +587,8 @@ test_eventdev_start_stop(void) } ret = rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0); - TEST_ASSERT(ret == rte_event_queue_count(TEST_DEV_ID), - "Failed to link port, device %d", TEST_DEV_ID); + TEST_ASSERT(ret == (int)queue_count, "Failed to link port, device %d", + TEST_DEV_ID); ret = rte_event_dev_start(TEST_DEV_ID); TEST_ASSERT_SUCCESS(ret, "Failed to start device%d", TEST_DEV_ID); @@ -579,7 +606,11 @@ eventdev_setup_device(void) ret = eventdev_configure_setup(); TEST_ASSERT_SUCCESS(ret, "Failed to configure eventdev"); - for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_setup(TEST_DEV_ID, i, NULL); TEST_ASSERT_SUCCESS(ret, "Failed to setup queue%d", i); } @@ -595,8 +626,8 @@ eventdev_setup_device(void) } ret = rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0); - TEST_ASSERT(ret == rte_event_queue_count(TEST_DEV_ID), - "Failed to link port, device %d", TEST_DEV_ID); + TEST_ASSERT(ret == (int)queue_count, "Failed to link port, device %d", + TEST_DEV_ID); ret = rte_event_dev_start(TEST_DEV_ID); TEST_ASSERT_SUCCESS(ret, "Failed to start device%d", TEST_DEV_ID); @@ -621,7 +652,11 @@ test_eventdev_link(void) TEST_ASSERT(ret >= 0, "Failed to link with NULL device%d", TEST_DEV_ID); - nb_queues = rte_event_queue_count(TEST_DEV_ID); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + nb_queues = queue_count; for (i = 0; i < nb_queues; i++) { queues[i] = i; priorities[i] = RTE_EVENT_DEV_PRIORITY_NORMAL; @@ -644,7 +679,11 @@ test_eventdev_unlink(void) TEST_ASSERT(ret >= 0, "Failed to unlink with NULL device%d", TEST_DEV_ID); - nb_queues = rte_event_queue_count(TEST_DEV_ID); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + nb_queues = queue_count; for (i = 0; i < nb_queues; i++) queues[i] = i; @@ -658,7 +697,7 @@ test_eventdev_unlink(void) static int test_eventdev_link_get(void) { - int ret, nb_queues, i; + int ret, i; uint8_t queues[RTE_EVENT_MAX_QUEUES_PER_DEV]; uint8_t priorities[RTE_EVENT_MAX_QUEUES_PER_DEV]; @@ -667,7 +706,11 @@ test_eventdev_link_get(void) TEST_ASSERT(ret >= 0, "Failed to link with NULL device%d", TEST_DEV_ID); - nb_queues = rte_event_queue_count(TEST_DEV_ID); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), + "Queue count get failed"); + const int nb_queues = queue_count; for (i = 0; i < nb_queues; i++) queues[i] = i; @@ -679,7 +722,6 @@ test_eventdev_link_get(void) TEST_ASSERT(ret == 0, "(%d)Wrong link get=%d", TEST_DEV_ID, ret); /* link all queues and get the links */ - nb_queues = rte_event_queue_count(TEST_DEV_ID); for (i = 0; i < nb_queues; i++) { queues[i] = i; priorities[i] = RTE_EVENT_DEV_PRIORITY_NORMAL; @@ -709,8 +751,8 @@ test_eventdev_link_get(void) ret = rte_event_port_unlink(TEST_DEV_ID, 0, NULL, 0); TEST_ASSERT(ret == nb_queues, "Failed to unlink(device%d) ret=%d", TEST_DEV_ID, ret); + /* 4links and 2 unlinks */ - nb_queues = rte_event_queue_count(TEST_DEV_ID); if (nb_queues >= 4) { for (i = 0; i < 4; i++) { queues[i] = i; diff --git a/test/test/test_eventdev_octeontx.c b/test/test/test_eventdev_octeontx.c index dfe8611..b88b0d2 100644 --- a/test/test/test_eventdev_octeontx.c +++ b/test/test/test_eventdev_octeontx.c @@ -193,8 +193,13 @@ _eventdev_setup(int mode) ret = rte_event_dev_configure(evdev, &dev_conf); TEST_ASSERT_SUCCESS(ret, "Failed to configure eventdev"); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + if (mode == TEST_EVENTDEV_SETUP_PRIORITY) { - if (rte_event_queue_count(evdev) > 8) { + if (queue_count > 8) { printf("test expects the unique priority per queue\n"); return -ENOTSUP; } @@ -204,8 +209,8 @@ _eventdev_setup(int mode) * RTE_EVENT_DEV_PRIORITY_LOWEST */ uint8_t step = (RTE_EVENT_DEV_PRIORITY_LOWEST + 1) / - rte_event_queue_count(evdev); - for (i = 0; i < rte_event_queue_count(evdev); i++) { + queue_count; + for (i = 0; i < (int)queue_count; i++) { struct rte_event_queue_conf queue_conf; ret = rte_event_queue_default_conf_get(evdev, i, @@ -218,7 +223,7 @@ _eventdev_setup(int mode) } else { /* Configure event queues with default priority */ - for (i = 0; i < rte_event_queue_count(evdev); i++) { + for (i = 0; i < (int)queue_count; i++) { ret = rte_event_queue_setup(evdev, i, NULL); TEST_ASSERT_SUCCESS(ret, "Failed to setup queue=%d", i); } @@ -339,6 +344,11 @@ generate_random_events(const unsigned int total_events) unsigned int i; int ret; + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + ret = rte_event_dev_info_get(evdev, &info); TEST_ASSERT_SUCCESS(ret, "Failed to get event dev info"); for (i = 0; i < total_events; i++) { @@ -347,7 +357,7 @@ generate_random_events(const unsigned int total_events) rte_rand() % (RTE_EVENT_TYPE_CPU + 1) /* event_type */, rte_rand() % 256 /* sub_event_type */, rte_rand() % (RTE_SCHED_TYPE_PARALLEL + 1), - rte_rand() % rte_event_queue_count(evdev) /* queue */, + rte_rand() % queue_count /* queue */, 0 /* port */, 1 /* events */); if (ret) @@ -486,7 +496,7 @@ test_multi_queue_enq_single_port_deq(void) } /* - * Inject 0..MAX_EVENTS events over 0..rte_event_queue_count() with modulus + * Inject 0..MAX_EVENTS events over 0..queue_count with modulus * operation * * For example, Inject 32 events over 0..7 queues @@ -502,15 +512,19 @@ test_multi_queue_enq_single_port_deq(void) static int validate_queue_priority(uint32_t index, uint8_t port, struct rte_event *ev) { - uint32_t range = MAX_EVENTS / rte_event_queue_count(evdev); - uint32_t expected_val = (index % range) * rte_event_queue_count(evdev); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + uint32_t range = MAX_EVENTS / queue_count; + uint32_t expected_val = (index % range) * queue_count; expected_val += ev->queue_id; RTE_SET_USED(port); TEST_ASSERT_EQUAL(ev->mbuf->seqn, expected_val, "seqn=%d index=%d expected=%d range=%d nb_queues=%d max_event=%d", ev->mbuf->seqn, index, expected_val, range, - rte_event_queue_count(evdev), MAX_EVENTS); + queue_count, MAX_EVENTS); return 0; } @@ -522,8 +536,12 @@ test_multi_queue_priority(void) int i, max_evts_roundoff; /* See validate_queue_priority() comments for priority validate logic */ - max_evts_roundoff = MAX_EVENTS / rte_event_queue_count(evdev); - max_evts_roundoff *= rte_event_queue_count(evdev); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + max_evts_roundoff = MAX_EVENTS / queue_count; + max_evts_roundoff *= queue_count; for (i = 0; i < max_evts_roundoff; i++) { struct rte_event ev = {.event = 0, .u64 = 0}; @@ -532,7 +550,7 @@ test_multi_queue_priority(void) TEST_ASSERT_NOT_NULL(m, "mempool alloc failed"); m->seqn = i; - queue = i % rte_event_queue_count(evdev); + queue = i % queue_count; update_event_and_validation_attr(m, &ev, 0, RTE_EVENT_TYPE_CPU, 0, RTE_SCHED_TYPE_PARALLEL, queue, 0); rte_event_enqueue_burst(evdev, 0, &ev, 1); @@ -709,7 +727,12 @@ test_queue_to_port_single_link(void) TEST_ASSERT(ret >= 0, "Failed to unlink all queues port=%d", i); } - nr_links = RTE_MIN(port_count, rte_event_queue_count(evdev)); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + + nr_links = RTE_MIN(port_count, queue_count); const unsigned int total_events = MAX_EVENTS / nr_links; /* Link queue x to port x and inject events to queue x through port x */ @@ -765,7 +788,9 @@ test_queue_to_port_multi_link(void) uint32_t nr_queues = 0; uint32_t nr_ports = 0; - nr_queues = rte_event_queue_count(evdev); + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &nr_queues), "Queue count get failed"); TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, RTE_EVENT_DEV_ATTR_QUEUE_COUNT, @@ -1038,10 +1063,14 @@ test_multiport_queue_sched_type_test(uint8_t in_sched_type, nr_ports = RTE_MIN(nr_ports, rte_lcore_count() - 1); - if (rte_event_queue_count(evdev) < 2 || !nr_ports) { + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + if (queue_count < 2 || !nr_ports) { printf("%s: Not enough queues=%d ports=%d or workers=%d\n", - __func__, rte_event_queue_count(evdev), - nr_ports, rte_lcore_count() - 1); + __func__, queue_count, nr_ports, + rte_lcore_count() - 1); return TEST_SUCCESS; } @@ -1213,7 +1242,11 @@ worker_queue_based_pipeline_max_stages_rand_sched_type(void *arg) struct rte_event ev; uint16_t valid_event; uint8_t port = param->port; - uint8_t nr_queues = rte_event_queue_count(evdev); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + uint8_t nr_queues = queue_count; rte_atomic32_t *total_events = param->total_events; while (rte_atomic32_read(total_events) > 0) { @@ -1251,7 +1284,11 @@ worker_mixed_pipeline_max_stages_rand_sched_type(void *arg) struct rte_event ev; uint16_t valid_event; uint8_t port = param->port; - uint8_t nr_queues = rte_event_queue_count(evdev); + uint32_t queue_count; + TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(evdev, + RTE_EVENT_DEV_ATTR_QUEUE_COUNT, + &queue_count), "Queue count get failed"); + uint8_t nr_queues = queue_count; rte_atomic32_t *total_events = param->total_events; while (rte_atomic32_read(total_events) > 0) { -- 2.7.4