From patchwork Wed Feb 8 18:22:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 123451 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 B91E741C3D; Wed, 8 Feb 2023 11:03:14 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88DF440DFD; Wed, 8 Feb 2023 11:03:14 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id DF5B440141 for ; Wed, 8 Feb 2023 11:03:11 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675850593; x=1707386593; h=from:to:cc:subject:date:message-id; bh=yjtxCoK14we82FulKJEGtkznFPhZgkdr/4kMlFU6SWk=; b=UY4V3epdVydL96taeu/427iutNTN7sjB7KrdfpTMPk9jW9lvpGua0ojX pAEL5XZdojkphOnKYai4xy8OsFxz4ZsWXVdV1X8z4bWV9ocRz0wrPGoCk o6bAvPHAVNixVvE7A4kku+Pmo5tNqcjDZD/gdVolDsRZ4yb0hjozR1aTX YqfNYCeUJqqByzvn87oob5Qhu1b4I/QiTAurKeEyWN3aLiPbJ5OtOhT7J Wh1Cm10pPcE6yFZGtrCp1AK2U927pXMC+dEXJ7MwTxAspGq5tEFLQGVS4 X55HC/TXaf8uFUrt+OZhON2pYBBRJnbQm8gvSkUVaGepJHFlMt31Dy2kz A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="327453802" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="327453802" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 02:03:11 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="667188378" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="667188378" Received: from unknown (HELO localhost.localdomain) ([10.239.252.93]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 02:03:09 -0800 From: Hongbo Li To: dts@dpdk.org Cc: Hongbo Li Subject: [dts][PATCH V1 1/2] test_plans/large_vf: modify script to adapt to changes in dpdk Date: Thu, 9 Feb 2023 02:22:50 +0800 Message-Id: <20230208182251.20487-1-hongbox.li@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 1.after dpdk is modified, if all ports fail to start, dpdk still allows testpmd to enter the command line, instead of unconditionally terminating testpmd. According to dpdk commit 7e40372522c("app/testpmd: fix interactive mode with no ports"). 2.after driver is modified, the RX rings available decreased(now from CVL 4.2 default number of queues are created according to the single NUMA CPU cores), so modify script to adapt. According to DCR=3871("Linux CVL - change driver defaults for number of queues"). Signed-off-by: Hongbo Li --- test_plans/large_vf_test_plan.rst | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/test_plans/large_vf_test_plan.rst b/test_plans/large_vf_test_plan.rst index e043a660..0f2318de 100644 --- a/test_plans/large_vf_test_plan.rst +++ b/test_plans/large_vf_test_plan.rst @@ -264,25 +264,29 @@ Subcase 5: PF fdir + large VF fdir co-exist Start testpmd on VF0 with 256 queues. -Create 10 rules on PF0, queue from [54~63]:: +Get RX rings available on DUT :: - ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.21 src-port 22 action 63 - ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.22 src-port 22 action 62 - ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.23 src-port 22 action 61 + ethtool -n enp96s0f0 + +Create 10 rules on PF0, and the actions decrease from the maximum value of RX rings available:: + + ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.21 src-port 22 action 35 + ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.22 src-port 22 action 34 + ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.23 src-port 22 action 33 ... - ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.30 src-port 22 action 54 + ethtool -N enp96s0f0 flow-type udp4 dst-ip 192.168.0.30 src-port 22 action 26 Check rules on PF:: ethtool -n enp96s0f0 -Send matched patches to PF:: +Send matched packet to PF:: pkt1=Ether(dst="00:00:00:00:01:00")/IP(src=RandIP(),dst="192.168.0.21")/UDP(sport=22,dport=23)/Raw('x'*80) ...... pkt10=Ether(dst="00:00:00:00:01:00")/IP(src=RandIP(),dst="192.168.0.30")/UDP(sport=22,dport=23)/Raw('x'*80) -Check PF matched queue [54~63] could receive matched packet:: +Check PF matched queue could receive matched packet:: ethtool -S enp96s0f0 From patchwork Wed Feb 8 18:22:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 123452 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 B7D3441C3D; Wed, 8 Feb 2023 11:03:17 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AE10040EE1; Wed, 8 Feb 2023 11:03:17 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 4498C40141 for ; Wed, 8 Feb 2023 11:03:15 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675850595; x=1707386595; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=//HgwdMTwyGkZlaA0PfYMQUQRB5EmLq5zw7bZARHsfo=; b=IGy61DVGyrh7qP69YHNMhVxbVcjLt3fOsoyhfWfFSa/jgSTmtr1QFjwA CjT41izCKG5A9eM9FpRsU3uR8jqGzFidCtH8uEUVD413vtlfncn3q8vaX NEU1sgZCNn47z+QyxGrv7ebsvhK6C56eXsZNlEFcF+q6nwI0QUjaxLBvj 8iKLG0OIa4MOjRoVJRRgdAi04qlSAQQjcee88NH+yfsne1xZ0uiwKzier u3jVYGKO1mfUW05vd0hU0BGTa7qjthoG+ZVEjiziqEbgDss0LcFjqPFTl NR+4po70LFWygzU5QueB5eXFOxzKZQ5bxWEoZ4v7D6KbezHzD59clEyDo A==; X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="327453813" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="327453813" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 02:03:14 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10614"; a="667188386" X-IronPort-AV: E=Sophos;i="5.97,280,1669104000"; d="scan'208";a="667188386" Received: from unknown (HELO localhost.localdomain) ([10.239.252.93]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 08 Feb 2023 02:03:12 -0800 From: Hongbo Li To: dts@dpdk.org Cc: Hongbo Li Subject: [dts][PATCH V1 2/2] tests/large_vf: modify script to adapt to changes in dpdk Date: Thu, 9 Feb 2023 02:22:51 +0800 Message-Id: <20230208182251.20487-2-hongbox.li@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230208182251.20487-1-hongbox.li@intel.com> References: <20230208182251.20487-1-hongbox.li@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 1.after dpdk is modified, if all ports fail to start, dpdk still allows testpmd to enter the command line, instead of unconditionally terminating testpmd. According to dpdk commit 7e40372522c("app/testpmd: fix interactive mode with no ports"). 2.after driver is modified, the RX rings available decreased(now from CVL 4.2 default number of queues are created according to the single NUMA CPU cores), so modify script to adapt. According to DCR=3871("Linux CVL - change driver defaults for number of queues"). Signed-off-by: Hongbo Li --- tests/TestSuite_large_vf.py | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/tests/TestSuite_large_vf.py b/tests/TestSuite_large_vf.py index 4e2ff1d6..d952abe6 100644 --- a/tests/TestSuite_large_vf.py +++ b/tests/TestSuite_large_vf.py @@ -110,8 +110,7 @@ different_queues_switch = { pf_large_vf_fdir_coexist = { "name": "test_pf_large_vf_fdir_coexist", - "param": [21, 63], - "check_param": (54, 63), + "param": [21], "count": 1, } @@ -124,7 +123,7 @@ exceed_256_queues = { more_than_3_vfs_256_queues = { "name": "test_more_than_3_vfs_256_queues", "param": "--txq=256 --rxq=256", - "check_param": "Cause: Start ports failed", + "check_param": "Start ports failed", } max_vfs_256_queues_3 = [ @@ -296,6 +295,7 @@ class TestLargeVf(TestCase): def rte_flow_process(self, vectors): test_results = {} + self.rule_num =[] for tv in vectors: try: subcase_name = tv["name"] @@ -322,14 +322,14 @@ class TestLargeVf(TestCase): self.pmdout_list[0], self.pf0_intf, tv["param"][0], - tv["param"][1], + self.max_ring_num-1, ) self.send_pkts_pf_check( self.pmdout_list[0], self.pf0_intf, self.pf0_mac, tv["param"][0], - tv["check_param"], + self.rule_num, tv["count"], ) self.create_fdir_rule(vectors[0]["rule"]) @@ -373,11 +373,12 @@ class TestLargeVf(TestCase): + "-- -i " + tv["param"] ) - out = self.pmd_output.execute_cmd(cmd, "#") + out = self.pmd_output.execute_cmd(cmd, "testpmd> ",timeout=30) self.verify( tv["check_param"] in out, "fail: testpmd start successfully", ) + self.pmd_output.quit() self.pmdout_list[0].execute_cmd("quit", "# ") break else: @@ -399,11 +400,12 @@ class TestLargeVf(TestCase): + "-- -i " + tv["param"] ) - out = self.pmd_output.execute_cmd(cmd, "#") + out = self.pmd_output.execute_cmd(cmd, "testpmd> ") self.verify( tv["check_param"] in out, "fail: testpmd start successfully", ) + self.pmd_output.quit() # quit all testpmd self.pmdout_list[0].execute_cmd("quit", "# ") self.pmdout_list[1].execute_cmd("quit", "# ") @@ -515,6 +517,7 @@ class TestLargeVf(TestCase): pf_intf, ip, action ) pmdout.execute_cmd(cmd, "#") + self.rule_num.append(action) ip += 1 action -= 1 self.validation_pf_rule(pmdout, pf_intf, 10) @@ -534,7 +537,7 @@ class TestLargeVf(TestCase): ip += 1 time.sleep(1) out = pmdout.execute_cmd("ethtool -S %s" % pf_intf, "# ") - for queue in range(check_param[0], check_param[1] + 1): + for queue in check_param: packet_str = "rx_queue_%d_packets: (\d+)" % queue packet = re.search(packet_str, out).group(1) self.verify( @@ -544,8 +547,10 @@ class TestLargeVf(TestCase): def destroy_pf_rule(self, pmdout, pf_intf): rule_str = "Filter:.*?(\d+)" + max_ring_str = "(\d+) RX rings available" out = pmdout.execute_cmd("ethtool -n %s" % pf_intf, "#") rule_list = re.findall(rule_str, out) + self.max_ring_num = int(re.search(max_ring_str,out).group(1)) if rule_list: for rule in rule_list: cmd = "ethtool -N {} delete {}".format(pf_intf, rule)