From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by dpdk.org (Postfix) with ESMTP id 98ABE5597 for ; Fri, 17 Feb 2017 15:54:15 +0100 (CET) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Feb 2017 06:54:15 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.35,172,1484035200"; d="scan'208";a="1111097428" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by fmsmga001.fm.intel.com with ESMTP; 17 Feb 2017 06:54:14 -0800 From: Harry van Haaren To: dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, Harry van Haaren Date: Fri, 17 Feb 2017 14:53:58 +0000 Message-Id: <1487343252-16092-4-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1487343252-16092-1-git-send-email-harry.van.haaren@intel.com> References: <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-1-git-send-email-harry.van.haaren@intel.com> Subject: [dpdk-dev] [PATCH v3 03/17] app/test: eventdev link all queues before start 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, 17 Feb 2017 14:54:16 -0000 The software eventdev can lock-up if not all queues are linked to a port. For this reason, the software evendev fails to start if queues are not linked to anything. This commit creates dummy links from all queues to port 0 in the eventdev setup function and start/stop test, which would otherwise fail due to unlinked queues. Signed-off-by: Harry van Haaren --- app/test/test_eventdev.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 756bc32..7d4160d 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -545,6 +545,14 @@ test_eventdev_start_stop(void) TEST_ASSERT_SUCCESS(ret, "Failed to setup port%d", i); } + for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint8_t queue = i; + uint8_t prio = 0; + ret = rte_event_port_link(TEST_DEV_ID, 0, &queue, &prio, 1); + TEST_ASSERT(ret == 1, "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); @@ -571,6 +579,14 @@ eventdev_setup_device(void) TEST_ASSERT_SUCCESS(ret, "Failed to setup port%d", i); } + for (i = 0; i < rte_event_queue_count(TEST_DEV_ID); i++) { + uint8_t queue = i; + uint8_t prio = 0; + ret = rte_event_port_link(TEST_DEV_ID, 0, &queue, &prio, 1); + TEST_ASSERT(ret == 1, "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); -- 2.7.4