From patchwork Tue Nov 7 16:39:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 133943 X-Patchwork-Delegate: jerinj@marvell.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B620C432C8; Tue, 7 Nov 2023 17:39:37 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9A44940E78; Tue, 7 Nov 2023 17:39:37 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id AC3C4402D4 for ; Tue, 7 Nov 2023 17:39:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1699375175; x=1730911175; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=9BHwD4IBOLBzj940hvg+YVGHMBA5RMTyBuzozLgcRfk=; b=L5Tf9XEMBHh4RPgisefrXWcNr6WmlQ11K+hfD6xaMx0OuJDvYQyeciwp mUdD6d9gBrQtJvFmyLfOCArEX9Kfaq5a0k96ulv1cZbNHVOh5uNEfUX47 prKMGcdct0FTfliWb+Gl+Yr6Idzx1P/vcPqvM9fqEFMacSKdYJonWx2UT huC3XK9g6GEGq1lh+mlbVHL3Ky7cxjrtlqe2zrSM6e6Lordz6jeb766TG vqo5FkK7QRU067yG5ETmlwJiMCYI8i+bBqcqe6K98G9nMiYyWRcznUvjO FFhe6IGPyme/4XLPcwkMNnhzzScNMlh/SFJ5z6F1jqlo6nxHo7fthHAw6 Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="389354873" X-IronPort-AV: E=Sophos;i="6.03,284,1694761200"; d="scan'208";a="389354873" Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Nov 2023 08:39:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10887"; a="1094208178" X-IronPort-AV: E=Sophos;i="6.03,284,1694761200"; d="scan'208";a="1094208178" Received: from silpixa00401385.ir.intel.com ([10.237.214.164]) by fmsmga005.fm.intel.com with ESMTP; 07 Nov 2023 08:39:33 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Jerin Jacob Subject: [PATCH] test/eventdev: avoid configuring port or queue twice Date: Tue, 7 Nov 2023 16:39:26 +0000 Message-Id: <20231107163926.55825-1-bruce.richardson@intel.com> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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 In the basic sanity tests of eventdev for queue and port setup, queue 0 was configured separately before running a loop to configure the rest of the queues. This loop started from 0, so reconfigured queue 0, and a similar reconfiguration happens with port 0 in the later port setup test. While most eventdevs should handle this reconfiguration without stop/start correctly, it can cause issues, and should be tested separately from basic config tests. Therefore, adjust loops to start at 1 rather than 0 and avoid configuring queue 0 and port 0 twice. Signed-off-by: Bruce Richardson Acked-by: Pavan Nikhilesh Acked-by: Jerin Jacob --- app/test/test_eventdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/test/test_eventdev.c b/app/test/test_eventdev.c index 993e49af3b..71de947ce4 100644 --- a/app/test/test_eventdev.c +++ b/app/test/test_eventdev.c @@ -313,7 +313,7 @@ test_eventdev_queue_setup(void) RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count), "Queue count get failed"); - for (i = 0; i < (int)queue_count; i++) { + for (i = 1; 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); } @@ -786,7 +786,7 @@ test_eventdev_port_setup(void) RTE_EVENT_DEV_ATTR_PORT_COUNT, &port_count), "Port count get failed"); - for (i = 0; i < (int)port_count; i++) { + for (i = 1; i < (int)port_count; i++) { ret = rte_event_port_setup(TEST_DEV_ID, i, NULL); TEST_ASSERT_SUCCESS(ret, "Failed to setup port%d", i); }