From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerin Jacob Subject: Re: [PATCH v3 03/17] app/test: eventdev link all queues before start Date: Sun, 19 Feb 2017 17:39:03 +0530 Message-ID: <20170219120901.GB7400@localhost.localdomain> References: <1485879273-86228-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-1-git-send-email-harry.van.haaren@intel.com> <1487343252-16092-4-git-send-email-harry.van.haaren@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: dev@dpdk.org To: Harry van Haaren Return-path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0070.outbound.protection.outlook.com [104.47.34.70]) by dpdk.org (Postfix) with ESMTP id 034F22C24 for ; Sun, 19 Feb 2017 13:09:26 +0100 (CET) Content-Disposition: inline In-Reply-To: <1487343252-16092-4-git-send-email-harry.van.haaren@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Fri, Feb 17, 2017 at 02:53:58PM +0000, Harry van Haaren wrote: > 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); You can replace the for loop and pass NULL to link all the queues. i.e rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0); > + 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 >