From patchwork Tue Oct 11 09:31:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 117894 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 8CAE0A0545; Tue, 11 Oct 2022 12:20:50 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6F25A42D38; Tue, 11 Oct 2022 12:20:50 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id 2012F42D0C for ; Tue, 11 Oct 2022 12:20:48 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665483649; x=1697019649; h=from:to:cc:subject:date:message-id; bh=25gAjvlJTLtwlSvRhT8zfrWQp/hOJtOWndc5cgfzos4=; b=nTad3d4P6514yWCAX+xk6v7lE+LL7Xo83rs+Rn10zqecKOI8wnjxM0+p jLgocoq1TBKQyL4FuHDqPOQilzbicDxj5kB5awoq/aMq7AhHrHG4ZQsmK XxmO4pqoF/zUqCcaYI+yJXo1xRMk1+51Zc1gCE8OzM8vILQTtKoATXQ7r 5Lh818HCcX0uyyvp//eqLUURCs9fXqV5D/nrBwd+ndZBxAggqgndu9vMg rXkLnHBLpyr0EVJFNh/a9T69F33D+jkoKYdbuvoynOIFJF0TFLaR3KCyP GFBiBRXDGxsAHKcYVK0cSmuKoegwn8XBhlJ2ptF8WAiRijoONAcu8RQhg w==; X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="304455127" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="304455127" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 03:20:48 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="715463692" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="715463692" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 03:20:46 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V3 1/2] tests/dynamic_queue: modify script according to dpdk code change Date: Tue, 11 Oct 2022 05:31:03 -0400 Message-Id: <20221011093104.22124-1-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 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 --- 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: From patchwork Tue Oct 11 09:31:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Lingli Chen X-Patchwork-Id: 117895 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 9470DA0545; Tue, 11 Oct 2022 12:20:52 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8B46542D4C; Tue, 11 Oct 2022 12:20:52 +0200 (CEST) Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mails.dpdk.org (Postfix) with ESMTP id F2FB442D0C for ; Tue, 11 Oct 2022 12:20:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1665483651; x=1697019651; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=IoT1WGHQk66lNG+e2IrSN0D/AHWEjWOhd0LYG/s1a4Y=; b=TrkeEPbKnj+G7VbMw/5vihxfx7ykODLvEDXgrqqVet4St8CDgBFDwOPA mvWEyjCi+OA53ETaWe5elknJgFKCKQPo7m6hLbLo5Rc8hjM18LnjutV96 TyUfqVX6fUAw2+64NTAM+ijOXpPylRaC5/SL6v4zrO1ayU2ymUay62Cco r2x2twsuZhUku5oUv2o4QeoLQUYWCFSvpLl8Rkig/cu9ygYNBG/tQBMYD 6vR1uwgQdcYRgaI5fh2pL1t7imnQ2rdEyl7nLr+3Sa2F7lCohUs7kPU5B 7yUVZeRgMS+GB/hGVnY1F0mqh7FIPoklgqlQM6C19K4JJKOvTZjJnEhAB A==; X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="304455131" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="304455131" Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 03:20:50 -0700 X-IronPort-AV: E=McAfee;i="6500,9779,10496"; a="715463701" X-IronPort-AV: E=Sophos;i="5.95,176,1661842800"; d="scan'208";a="715463701" Received: from unknown (HELO localhost.localdomain) ([10.239.252.99]) by fmsmga003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Oct 2022 03:20:49 -0700 From: Lingli Chen To: dts@dpdk.org Cc: zhiminx.huang@intel.com, Lingli Chen Subject: [dts][PATCH V3 2/2] tests/queue_start_stop: modify script according to dpdk code change Date: Tue, 11 Oct 2022 05:31:04 -0400 Message-Id: <20221011093104.22124-2-linglix.chen@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221011093104.22124-1-linglix.chen@intel.com> References: <20221011093104.22124-1-linglix.chen@intel.com> 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 --- Tested-by: Weiyuan Li V3: modify test_plan add check tester port receive packets steps. V2: modify script add verify no print "ports 0 queue 0 receive " in testpmd test_plans/queue_start_stop_test_plan.rst | 28 +++++++++++++++++------ tests/TestSuite_queue_start_stop.py | 20 ++++++++-------- 2 files changed, 30 insertions(+), 18 deletions(-) diff --git a/test_plans/queue_start_stop_test_plan.rst b/test_plans/queue_start_stop_test_plan.rst index de7c46d2..aecdb095 100644 --- a/test_plans/queue_start_stop_test_plan.rst +++ b/test_plans/queue_start_stop_test_plan.rst @@ -35,15 +35,29 @@ This case support PF (Intel® Ethernet 700 Series/Intel® Ethernet 800 Series/82 printf("ports %u queue %u received %u packages\n", fs->rx_port, fs->rx_queue, nb_rx); -#. Compile testpmd again, then run testpmd. +#. Compile testpmd again, then run testpmd:: + x86_64-native-linuxapp-gcc/app/dpdk-testpmd -l 1-2 -n 4 -a 0000:af:00.0 -- -i --portmask=0x1 --port-topology=loop + #. Run "set fwd mac" to set fwd type #. Run "start" to start fwd package -#. Start packet generator to transmit and receive packets + +#. Start a packet capture on the tester in the background:: + tcpdump -i ens7 'ether[12:2] != 0x88cc' -Q in -w /tmp/tester/sniff_ens7.pcap + +#. Start packet generator to transmit packets:: + sendp([Ether(dst='3c:fd:fe:c1:0f:4c', src='00:00:20:00:00:00')/IP()/UDP()/Raw(load=b'XXXXXXXXXXXXXXXXXX')],iface="ens7",count=4,inter=0,verbose=False) + +#. Quit tcpdump and check tester port receive packets + #. 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 check tester port not receive packets + #. 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 check tester port not receive packets + and in testpmd it not has "ports 0 queue 0 received 1 packages" print + +#. Run "port 0 txq 0 start" to start txq 0 in port 0 +#. Start packet generator to transmit and check tester port receive packets + and in testpmd it has "ports 0 queue 0 received 1 packages" print #. 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): """