From patchwork Fri Dec 30 17:42:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 121475 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 47611A0032; Fri, 30 Dec 2022 10:24:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 1B1AB40DD8; Fri, 30 Dec 2022 10:24:03 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 656934067B for ; Fri, 30 Dec 2022 10:24:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672392242; x=1703928242; h=from:to:cc:subject:date:message-id; bh=v67l/P0jqIzAAsWMFqtNtsXNzmhp6/0IfnTnfehboS8=; b=LHaww/lJCHET23EWKADp8Cf3wXhSVC0RFNkkmSRSqh0FIsFNsz5rQSxo 9o7PlwMPoarerZB5/FAQvYa3Mcj7Cna7HcXUlI0ZFf4ulJbPHBUt7SCAz 5iBm9DdFmiiF7r/LYnEl8U2GuL2endUKSnIjayG45YjJ+bs12YYn7LBJD iOXABFwUJbHiqKs3PpAkiClU4Q1VMKlJDZ3PYeZxvxhBtvxdkE6ix/n5B lYYJcf/4BBDa0dS+1bPp9red81UDSgjpJX8as6lE+8SdRtLhQgUCHXzr4 OxtRJHLBndFiLAvzoBaVPjzRJnMH+pxKx0Ykqp5Zw3r+dPxdQuvVh6sT0 A==; X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="319899555" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="319899555" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 01:24:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="653839577" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="653839577" Received: from unknown (HELO cvl_100g_103.icx.intel.com) ([10.239.252.93]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 01:23:59 -0800 From: Hongbo Li To: dts@dpdk.org Cc: Hongbo Li , Peng Yuan Subject: [dts][PATCH V1 1/2] test_plans/ice_iavf_fdir: add new cases according to testplan Date: Sat, 31 Dec 2022 01:42:26 +0800 Message-Id: <20221230174227.10809-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 add subcase 8 to test Kill VF process and create a new rule Signed-off-by: Peng Yuan Signed-off-by: Hongbo Li --- test_plans/ice_iavf_fdir_test_plan.rst | 33 ++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/test_plans/ice_iavf_fdir_test_plan.rst b/test_plans/ice_iavf_fdir_test_plan.rst index 5f22d48e..81fc2f60 100644 --- a/test_plans/ice_iavf_fdir_test_plan.rst +++ b/test_plans/ice_iavf_fdir_test_plan.rst @@ -5078,6 +5078,39 @@ Subcase 7: check profile delete 6. send the two packets again, check the two packets are distributed by RSS without FDIR matched ID. +Subcase 8: Kill VF process and create a new rule +------------------------------------------------ + +1. create a rule on vf00 and vf01:: + + flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / mark / end + flow create 1 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / mark / end + +2. send matched packet:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:66")/IP(src="192.168.0.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw('x' * 80)],iface="enp134s0f1") + + check the packet is redirected to queue 5 with FDIR matched ID=0x0. + +3. kill VF process in another shell:: + + ps -ef |grep testpmd #Check the process id + kill -9 + +4. testpmd shows:: + + testpmd> Killed + + then relaunch testpmd. + the port can start normally without error message. + +5. check there is not rule listed on vf0 and vf1. + +6. repeat step 1-2. + check the rule can be created successfully, + and the packets can be redirected to queue 5 with FDIR matched ID=0x0. + Test case: PFCP coverage test ============================= Subcase 1: PFCP FDIR vlan strip on HW checksum offload check From patchwork Fri Dec 30 17:42:27 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Li, HongboX" X-Patchwork-Id: 121476 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 3C2D6A00C3; Fri, 30 Dec 2022 10:24:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 346EB42D33; Fri, 30 Dec 2022 10:24:04 +0100 (CET) Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) by mails.dpdk.org (Postfix) with ESMTP id 3A5B942D33 for ; Fri, 30 Dec 2022 10:24:03 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1672392243; x=1703928243; h=from:to:cc:subject:date:message-id:in-reply-to: references; bh=veqYQajWCmjXVhUiXw1ac8o+GoknPLEzTxaPaOzQ7NI=; b=CW6NDm/KnRoP0yfRfLoFePdB76Ifxg/Ha+LGmIA4lhT4zOl2DCM32+HA N9J2/M2FEOGHSwdUbH3klLIexYz8yL7SqqvVCKTpN8QAUcPi5MRQ/K+Gb sm4p4IRN3uPh/EUvVzYvT/i2SI4HXfdlcSKF0omFi3aN/jQgMJBe+LwOd aJ6xdPNytQ9nfswiQO32vlKw9JV5QpsyUEbhi6Ljj090MVrNYI2tl0UMO YgUxN5vvvxbyWAEsrNfaD+eInP5qc4t4aT3sQ+BegKybflySorSZS/YHU o5aKTnQA9wkz5KUy1KAdGp30usNK4JUC+5Ut1wv9I+BTS6SYZtcgrb7zJ A==; X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="319899556" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="319899556" Received: from orsmga002.jf.intel.com ([10.7.209.21]) by fmsmga104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 01:24:02 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10575"; a="653839591" X-IronPort-AV: E=Sophos;i="5.96,287,1665471600"; d="scan'208";a="653839591" Received: from unknown (HELO cvl_100g_103.icx.intel.com) ([10.239.252.93]) by orsmga002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Dec 2022 01:24:01 -0800 From: Hongbo Li To: dts@dpdk.org Cc: Hongbo Li Subject: [dts][PATCH V1 2/2] tests/ice_iavf_fdir: add new cases according to testplan Date: Sat, 31 Dec 2022 01:42:27 +0800 Message-Id: <20221230174227.10809-2-hongbox.li@intel.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221230174227.10809-1-hongbox.li@intel.com> References: <20221230174227.10809-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 add subcase 8 to test Kill VF process and create a new rule Signed-off-by: Hongbo Li Acked-by: Lijuan Tu --- tests/TestSuite_ice_iavf_fdir.py | 67 +++++++++++++++++++++++++++++++- 1 file changed, 66 insertions(+), 1 deletion(-) diff --git a/tests/TestSuite_ice_iavf_fdir.py b/tests/TestSuite_ice_iavf_fdir.py index 43cac8ea..b0186c0c 100644 --- a/tests/TestSuite_ice_iavf_fdir.py +++ b/tests/TestSuite_ice_iavf_fdir.py @@ -8736,7 +8736,7 @@ class TestICEIAVFFdir(TestCase): self.pmd_output.execute_cmd("start") def launch_testpmd(self): - self.pmd_output.start_testpmd( + out = self.pmd_output.start_testpmd( cores="1S/4C/1T", param="--rxq={} --txq={}".format(self.q_num, self.q_num), eal_param="-a %s -a %s" @@ -8744,6 +8744,7 @@ class TestICEIAVFFdir(TestCase): socket=self.ports_socket, ) self.config_testpmd() + return out def send_packets(self, packets, pf_id=0, count=1): self.pkt.update_pkt(packets) @@ -10797,6 +10798,70 @@ class TestICEIAVFFdir(TestCase): stats=True, ) + def test_stress_kill_vf_process_create_new_rule(self): + """ + create a fdir rule, then kill the process, relaunch testpmd, create the same fdir rule successfully and take work. + """ + rules = [ + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / mark / end", + "flow create 1 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 22 dst is 23 / end actions queue index 5 / mark / end", + ] + pkts = [ + 'Ether(dst="00:11:22:33:44:55")/IP(src="192.168.0.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:66")/IP(src="192.168.0.0",dst="192.1.0.0", tos=4)/TCP(sport=22,dport=23)/Raw("x" * 80)', + ] + + self.create_fdir_rule(rules, check_stats=True) + out0 = self.send_pkts_getouput(pkts=pkts[0]) + rfc.check_iavf_fdir_mark( + out0, + pkt_num=1, + check_param={"port_id": 0, "mark_id": 0, "queue": 5}, + stats=True, + ) + out1 = self.send_pkts_getouput(pkts=pkts[1]) + rfc.check_iavf_fdir_mark( + out1, + pkt_num=1, + check_param={"port_id": 1, "mark_id": 0, "queue": 5}, + stats=True, + ) + # kill the process + self.session_secondary = self.dut.new_session() + out_pid = self.session_secondary.send_expect( + "ps -ef |grep testpmd |grep -v grep |awk '{print $2}'", "#" + ) + + kill_comd = "kill -9 %s" % (str(out_pid)) + self.session_secondary.send_expect(kill_comd, "#") + self.dut.close_session(self.session_secondary) + # create rule again + out = self.launch_testpmd() + self.verify( + "fail" not in out and "Fail" not in out and "error" not in out, + "failed to restart testpmd normally", + ) + out_flow0 = self.dut.send_expect("flow list 0", "testpmd> ") + out_flow1 = self.dut.send_expect("flow list 1", "testpmd> ") + out_flow = out_flow0 + out_flow1 + rule_pattern = re.compile("ID.*") + flow = rule_pattern.findall(out_flow) + self.verify(len(flow) == 0, "failed to clean rule") + self.create_fdir_rule(rules, check_stats=True) + rfc.check_iavf_fdir_mark( + out0, + pkt_num=1, + check_param={"port_id": 0, "mark_id": 0, "queue": 5}, + stats=True, + ) + out1 = self.send_pkts_getouput(pkts=pkts[1]) + rfc.check_iavf_fdir_mark( + out1, + pkt_num=1, + check_param={"port_id": 1, "mark_id": 0, "queue": 5}, + stats=True, + ) + def test_stress_vf_port_reset_delete_rule(self): """ vf reset, the origin rule can't take effect,