From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 0CB1BA034F; Fri, 12 Nov 2021 20:49:12 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 890DD40E25; Fri, 12 Nov 2021 20:49:11 +0100 (CET) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id EEA9840692 for ; Fri, 12 Nov 2021 20:49:09 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10166"; a="233140829" X-IronPort-AV: E=Sophos;i="5.87,230,1631602800"; d="scan'208";a="233140829" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Nov 2021 11:49:04 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,230,1631602800"; d="scan'208";a="505012849" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by orsmga008.jf.intel.com with ESMTP; 12 Nov 2021 11:49:03 -0800 From: Rashmi Shetty To: dev@dpdk.org Cc: jerinj@marvell.com, harry.van.haaren@intel.com, pravin.pathak@intel.com, mike.ximing.chen@intel.com, timothy.mcdaniel@intel.com, Rashmi Shetty Subject: [PATCH] event/dlb2: fix delayed_pop test in dlb2_selftest Date: Fri, 12 Nov 2021 13:48:57 -0600 Message-Id: <20211112194857.1342664-1-rashmi.shetty@intel.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Number of events scheduled and available for dequeue after token pop was set to dequeue_depth-1 instead of dequeue_depth in test_delayed_pop. The expectation is that all dequeue_depth number of events can be dequeued once the last event is released. Signed-off-by: Rashmi Shetty --- drivers/event/dlb2/dlb2_selftest.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/drivers/event/dlb2/dlb2_selftest.c b/drivers/event/dlb2/dlb2_selftest.c index 5cf66c552c..2113bc2c99 100644 --- a/drivers/event/dlb2/dlb2_selftest.c +++ b/drivers/event/dlb2/dlb2_selftest.c @@ -1354,7 +1354,7 @@ test_delayed_pop(void) } /* Release one more event. This will trigger the token pop, and - * dequeue_depth - 1 more events will be scheduled to the device. + * dequeue_depth more events will be scheduled to the device. */ ev.op = RTE_EVENT_OP_RELEASE; @@ -1366,7 +1366,7 @@ test_delayed_pop(void) timeout = 0xFFFFFFFFF; - for (i = 0; i < port_conf.dequeue_depth - 1; i++) { + for (i = 0; i < port_conf.dequeue_depth; i++) { if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 1) { printf("%d: event dequeue expected to succeed\n", __LINE__); @@ -1374,14 +1374,6 @@ test_delayed_pop(void) } } - timeout = 0x10000; - - if (rte_event_dequeue_burst(evdev, 0, &ev, 1, timeout) != 0) { - printf("%d: event dequeue expected to fail\n", - __LINE__); - goto err; - } - cleanup(); return 0; -- 2.25.1