From patchwork Fri Sep 16 08:38:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 116394 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 64738A0032; Fri, 16 Sep 2022 11:26:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 37CBA4021D; Fri, 16 Sep 2022 11:26:07 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8712F40156 for ; Fri, 16 Sep 2022 11:26:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663320365; x=1694856365; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=eN7CGn2OjLKhBhvmrJRas2D3GlAqOmgVVC0/vP0zUBA=; b=RBHdttb6SWX95xKFnjJgCXtmhAZHWV4yDyk3XTeO0EfEFu+BsUORCOTx n0RC/2fZpqGmkmcyqmI8TGxRfyhhG017q88dOqQKxXILliiyYCZo9Dp90 cN79mlo9BJSUVPdktdyyBRw+LRqj4PFY46o/pc6g/Cj6NDanyPqDhMbXE Frk3JUyy4dhOUkABUvpERD5ar1f0qEgBhaSuqPyWTdtcDX0OO/htO1/P0 kBjG1MO1Y0PzBRUrFAdbQGrcbJf0VyvXCDEBPo0f4xXWLeq5DBrnb/OxF XVxh75EbiC+180XMHyWaAYMyGyrMyHYVsh2IVmQU6mLBsL8GBEkV3o7ZB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="300315051" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="300315051" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 02:25:42 -0700 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="650811966" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 02:25:40 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V2 1/2] tests/queue_start_stop: modify script according to dpdk code change Date: Fri, 16 Sep 2022 04:38:54 -0400 Message-Id: <20220916083855.48856-1-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org According to dpdk commit 3c4426db54fc(app/testpmd: do not poll stopped queues). modify queue_start_stop: after set “port 0 txq 0 stop”, no print in testpmd. Signed-off-by: Lingli Chen --- V2: modify test_plan add testpmd stop packets print. modify script add verify no print "ports 0 queue 0 receive " in testpmd test_plans/queue_start_stop_test_plan.rst | 45 +++++++++++++++++++---- tests/TestSuite_queue_start_stop.py | 20 +++++----- 2 files changed, 47 insertions(+), 18 deletions(-) diff --git a/test_plans/queue_start_stop_test_plan.rst b/test_plans/queue_start_stop_test_plan.rst index cf660710..9780e6d1 100644 --- a/test_plans/queue_start_stop_test_plan.rst +++ b/test_plans/queue_start_stop_test_plan.rst @@ -29,7 +29,7 @@ To run the testpmd application in linuxapp environment with 4 lcores, Test Case: queue start/stop --------------------------- -This case support PF (Intel® Ethernet 700 Series), VF (Intel® Ethernet 700 Series, 82599) +This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82599), VF (Intel® Ethernet 700 Series, 82599) #. Update testpmd source code. Add the following C code in ./app/test-pmd/fwdmac.c:: @@ -38,12 +38,43 @@ This case support PF (Intel® Ethernet 700 Series), VF (Intel® Ethernet 700 Ser #. Compile testpmd again, then run testpmd. #. Run "set fwd mac" to set fwd type #. Run "start" to start fwd package -#. Start packet generator to transmit and receive packets +#. Start packet generator to transmit and tester port receive 4 packets +#. Stop testpmd:: + + --------------------- Forward statistics for port 0 ---------------------- + RX-packets: 4 RX-dropped: 0 RX-total: 4 + TX-packets: 4 TX-dropped: 0 TX-total: 4 + ---------------------------------------------------------------------------- + #. Run "port 0 rxq 0 stop" to stop rxq 0 in port 0 -#. Start packet generator to transmit and not receive packets +#. Start packet generator to transmit and tester port not receive packets +#. Stop testpmd:: + + ---------------------- Forward statistics for port 0 ---------------------- + RX-packets: 4 RX-dropped: 0 RX-total: 4 + TX-packets: 0 TX-dropped: 0 TX-total: 0 + ---------------------------------------------------------------------------- + #. Run "port 0 rxq 0 start" to start rxq 0 in port 0 -#. Run "port 1 txq 1 stop" to start txq 0 in port 1 -#. Start packet generator to transmit and not receive packets but in testpmd it is a "ports 0 queue 0 received 1 packages" print -#. Run "port 1 txq 1 start" to start txq 0 in port 1 -#. Start packet generator to transmit and receive packets +#. Run "port 0 txq 0 stop" to stop txq 0 in port 0 +#. Start packet generator to transmit and tester port not receive packets +#. Stop testpmd:: + + ---------------------- Forward statistics for port 0 ---------------------- + RX-packets: 4 RX-dropped: 0 RX-total: 4 + TX-packets: 0 TX-dropped: 0 TX-total: 0 + ---------------------------------------------------------------------------- + +#. Run "port 0 txq 0 start" to start txq 0 in port 0 +#. Start packet generator to transmit and tester port receive 4 packets:: + + in testpmd print "ports 0 queue 0 received 1 packages" * 4 + +#. Stop testpmd:: + + ---------------------- Forward statistics for port 0 ---------------------- + RX-packets: 4 RX-dropped: 0 RX-total: 4 + TX-packets: 4 TX-dropped: 0 TX-total: 4 + ---------------------------------------------------------------------------- + #. Test it again with VF diff --git a/tests/TestSuite_queue_start_stop.py b/tests/TestSuite_queue_start_stop.py index 1df59a1b..b6f4ba96 100644 --- a/tests/TestSuite_queue_start_stop.py +++ b/tests/TestSuite_queue_start_stop.py @@ -137,17 +137,10 @@ class TestQueueStartStop(TestCase): out = self.dut.get_session_output() except Exception as e: raise IOError("queue start/stop forward failure: %s" % e) - - if self.nic == "cavium_a063": - self.verify( - "ports 0 queue 0 receive 4 packages" in out, - "start queue revice package failed, out = %s" % out, - ) - else: - self.verify( - "ports 0 queue 0 receive 1 packages\r\n" * 4 in out, - "start queue revice package failed, out = %s" % out, - ) + self.verify( + "ports 0 queue 0 receive " not in out, + "start queue revice package failed, out = %s" % out, + ) try: # start tx queue test @@ -156,8 +149,13 @@ class TestQueueStartStop(TestCase): self.dut.send_expect("port 0 txq 0 start", "testpmd>") self.dut.send_expect("start", "testpmd>") self.check_forwarding([0, 0], self.nic) + out = self.dut.get_session_output() except Exception as e: raise IOError("queue start/stop forward failure: %s" % e) + self.verify( + "ports 0 queue 0 receive " in out, + "start queue revice package failed, out = %s" % out, + ) def tear_down(self): """ From patchwork Fri Sep 16 08:38:55 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 116395 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 C3D0AA00C3; Fri, 16 Sep 2022 11:26:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5314940A82; Fri, 16 Sep 2022 11:26:07 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 8EF444021D for ; Fri, 16 Sep 2022 11:26:05 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1663320365; x=1694856365; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=25gAjvlJTLtwlSvRhT8zfrWQp/hOJtOWndc5cgfzos4=; b=PJaFy/0mnFbtUISBNvsJygsV9MZrf7b+8zAK7lfnM1bRImoJXA3QKWI/ T8K9KMRh568ruLeV/b9qm9RujQPrgz1nRDFxz/VGnZEvKMT64Hrg0iGAY z+gazA80tbFd1V05r5zsRRQ2xRVhOXN6Hg+sTD6kwYOAVFAy4CfAvHcCE gYXbQJ9DfOdRuT+PLCWJwtCTQXxVdenBR4oEZowwMzJc9kjKfrqr4zU4C cILb2eQmeeTM0FxQbyXlAB4sNfXt5mY0DLWGUaG7QLiQc545DEH52bNju VVI/fG9QNPznJIYXq4pCtz7MAoqEOkFQo2GZrD8m62SSyR+4d6O+14291 g==; X-IronPort-AV: E=McAfee;i="6500,9779,10471"; a="300315055" X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="300315055" Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 02:25:44 -0700 X-IronPort-AV: E=Sophos;i="5.93,320,1654585200"; d="scan'208";a="650811977" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by orsmga001-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Sep 2022 02:25:42 -0700 From: Lingli Chen To: dts@dpdk.org Cc: yuan.peng@intel.com, Lingli Chen Subject: [dts][PATCH V2 2/2] tests/dynamic_queue: modify script according to dpdk code change Date: Fri, 16 Sep 2022 04:38:55 -0400 Message-Id: <20220916083855.48856-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20220916083855.48856-1-linglix.chen@intel.com> References: <20220916083855.48856-1-linglix.chen@intel.com> X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org According to dpdk commit 3c4426db54fc(app/testpmd: do not poll stopped queues). modify dynamic_queue: Tx stopped queue not display Signed-off-by: Lingli Chen Tested-by: Weiyuan Li --- test_plans/dynamic_queue_test_plan.rst | 4 ++-- tests/TestSuite_dynamic_queue.py | 15 ++++++++------- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/test_plans/dynamic_queue_test_plan.rst b/test_plans/dynamic_queue_test_plan.rst index 96cfcb8a..d22068a0 100644 --- a/test_plans/dynamic_queue_test_plan.rst +++ b/test_plans/dynamic_queue_test_plan.rst @@ -94,7 +94,7 @@ Stop one Tx queue on port 0:: Set txonly forward, start testpmd -Start testpmd, then stop, check this stopped queue only transmits 255 packets +Start testpmd, then stop, check this stopped queue not display Setup this stopped queue on the port:: @@ -162,7 +162,7 @@ Stop one Tx queue on port 0:: Set txonly forward, start testpmd -Start testpmd, then stop, check this stopped queue only transmits 255 packets +Start testpmd, then stop, check this stopped queue not display Reconfigure ring size as 512 for the stopped queues on port 0:: diff --git a/tests/TestSuite_dynamic_queue.py b/tests/TestSuite_dynamic_queue.py index ebbe869c..5a826bd1 100644 --- a/tests/TestSuite_dynamic_queue.py +++ b/tests/TestSuite_dynamic_queue.py @@ -163,13 +163,14 @@ class TestDynamicQueue(TestCase): out = self.dut_testpmd.execute_cmd("stop") tx_num = qringsize - 1 - if self.nic in ["cavium_a063", "cavium_a064"]: - self.verify("TX-packets: 0" in out, "Fail to stop txq at runtime") - else: - # Check Tx stopped queue only transmits qringsize-1 packets - self.verify( - "TX-packets: %d" % tx_num in out, "Fail to stop txq at runtime" - ) + # check rxq start successful + self.verify("TX-packets:" in out, "txq start failed") + # check Tx stopped queue not display + self.verify( + "TX Port= 0/Queue={:>2}".format(queue) not in out, + "Fail to stop txq at runtime", + ) + if chgflag == 1: chg_qringsize = qringsize % 1024 + 256 if qringsize == 512: