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 C4755A0032; Mon, 15 Nov 2021 17:34:50 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 99C4A40E01; Mon, 15 Nov 2021 17:34:50 +0100 (CET) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by mails.dpdk.org (Postfix) with ESMTP id E581B40141 for ; Mon, 15 Nov 2021 17:34:48 +0100 (CET) X-IronPort-AV: E=McAfee;i="6200,9189,10169"; a="296903930" X-IronPort-AV: E=Sophos;i="5.87,236,1631602800"; d="scan'208";a="296903930" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Nov 2021 08:34:47 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,236,1631602800"; d="scan'208";a="505984346" Received: from txanpdk02.an.intel.com ([10.123.117.76]) by orsmga008.jf.intel.com with ESMTP; 15 Nov 2021 08:34:47 -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 v2] event/dlb2: fix delayed_pop test in dlb2_selftest Date: Mon, 15 Nov 2021 10:34:44 -0600 Message-Id: <20211115163445.1438809-1-rashmi.shetty@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20211112194857.1342664-1-rashmi.shetty@intel.com> References: <20211112194857.1342664-1-rashmi.shetty@intel.com> 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. Fixes: a10e8e96865f ("event/dlb2: add delayed token pop logic") Signed-off-by: Rashmi Shetty --- v2: - Updated commit message with 'Fixes' tag (Jerin) --- 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