From patchwork Wed Apr 12 10:42:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 125963 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 34E2B42926; Wed, 12 Apr 2023 12:42:18 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0C58440FAE; Wed, 12 Apr 2023 12:42:18 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 4D4004067B for ; Wed, 12 Apr 2023 12:42:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681296136; x=1712832136; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=LIAoSP8TBZ/RNMW9XHRuuCmK59phjdiXYmwaTc8DVOk=; b=HJ0/iAWdqdv1LoxEqmF9oH4INc8sshFc8TmdCyuuHxmroFufewGdBJh8 s+XWbM5bETpSVbjYJEsxBmONjUPAvxvz9XNSQOUuNQuJvQMELmGeYBhlB sHc1SBG0fRft0/x2F9D7QqwwO1DdYAJQBtw2ubJFZZkZjX6urIr9LW3zB ELXfGairtAPcfC06gr8DV7XKWz3BBbES9IAfkRpcReGt/d9Fhv2WWIBNg kzE1bVNOi3BEjKwZnOS86OI18cYYJIiyc1JPizTaQpzB7rZypk0T+iIpo 5eDHoRh7ExO9xERcaIvbl6RWfLJN9rp+DnXa99tbXl4xW5ijOP3T0DTf0 A==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="346535737" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="346535737" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 03:42:15 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="691503460" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="691503460" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 03:42:13 -0700 From: Yu Jiang To: ke1.xu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 1/2] test_plans/ice_dcf_switch_filter: update test plan to support represented port action from deprecated vf action Date: Wed, 12 Apr 2023 18:42:09 +0800 Message-Id: <20230412104210.1345558-1-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.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 dpdk22.11 commit id: 776c119736 net/ice: remove deprecated VF flow action c0444f6273 net/ice: support represented port flow action update test plan to support represented port action from deprecated vf action Signed-off-by: Yu Jiang --- test_plans/ice_dcf_switch_filter_test_plan.rst | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/test_plans/ice_dcf_switch_filter_test_plan.rst b/test_plans/ice_dcf_switch_filter_test_plan.rst index 10364c38..b4d9b968 100644 --- a/test_plans/ice_dcf_switch_filter_test_plan.rst +++ b/test_plans/ice_dcf_switch_filter_test_plan.rst @@ -4303,7 +4303,7 @@ Subcase 1: MAC_IPV4_UDP + L4 MASK + single vf ---------------------------------------------- 1. validate a rule:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp src spec 2152 src mask 0xff00 dst spec 1281 dst mask 0x00ff / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp src spec 2152 src mask 0xff00 dst spec 1281 dst mask 0x00ff / end actions represented_port ethdev_port_id 1 / end get the message:: @@ -4317,7 +4317,7 @@ Subcase 1: MAC_IPV4_UDP + L4 MASK + single vf 2. create MAC_IPV4_L2TP_PAY rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp src spec 2152 src mask 0xff00 dst spec 1281 dst mask 0x00ff / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp src spec 2152 src mask 0xff00 dst spec 1281 dst mask 0x00ff / end actions represented_port ethdev_port_id 1 / end testpmd> flow list 0 check the rule exists in the list. @@ -4347,7 +4347,7 @@ Subcase 2: MAC_IPV6_TCP + L4 MASK + single vf ---------------------------------------------- 1. validate a rule:: - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 / tcp dst spec 3333 dst mask 0x0ff0 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 / tcp dst spec 3333 dst mask 0x0ff0 / end actions represented_port ethdev_port_id 1 / end get the message:: @@ -4361,7 +4361,7 @@ Subcase 2: MAC_IPV6_TCP + L4 MASK + single vf 2. create MAC_IPV4_L2TP_PAY rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 / tcp dst spec 3333 dst mask 0x0ff0 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 / tcp dst spec 3333 dst mask 0x0ff0 / end actions represented_port ethdev_port_id 1 / end testpmd> flow list 0 check the rule exists in the list. @@ -4391,7 +4391,7 @@ Subcase 3: MAC_IPV4_UDP_VXLAN_MAC_IPV4_UDP + L4 MASK + single vf 1. validate a rule:: testpmd> rx_vxlan_port add 4789 0 - testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 / udp src spec 32 src mask 0x0f / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 / udp src spec 32 src mask 0x0f / end actions represented_port ethdev_port_id 1 / end get the message:: @@ -4405,7 +4405,7 @@ Subcase 3: MAC_IPV4_UDP_VXLAN_MAC_IPV4_UDP + L4 MASK + single vf 2. create MAC_IPV4_L2TP_PAY rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 / udp src spec 32 src mask 0x0f / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 / udp src spec 32 src mask 0x0f / end actions represented_port ethdev_port_id 1 / end testpmd> flow list 0 check the rule exists in the list. @@ -4434,7 +4434,7 @@ Subcase 4: MAC_IPV4_NVGRE_MAC_IPV4_UDP + L4 MASK + single vf ------------------------------------------------------------- 1. validate a rule:: - testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src spec 1280 src mask 0x00ff / end actions vf id 1 / end + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src spec 1280 src mask 0x00ff / end actions represented_port ethdev_port_id 1 / end get the message:: @@ -4448,7 +4448,7 @@ Subcase 4: MAC_IPV4_NVGRE_MAC_IPV4_UDP + L4 MASK + single vf 2. create MAC_IPV4_L2TP_PAY rule:: - testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src spec 1280 src mask 0x00ff / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src spec 1280 src mask 0x00ff / end actions represented_port ethdev_port_id 1 / end testpmd> flow list 0 check the rule exists in the list. From patchwork Wed Apr 12 10:42:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Yu Jiang X-Patchwork-Id: 125964 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 398E642926; Wed, 12 Apr 2023 12:42:19 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 32C07410FA; Wed, 12 Apr 2023 12:42:19 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by mails.dpdk.org (Postfix) with ESMTP id 4AFAA4067B for ; Wed, 12 Apr 2023 12:42:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1681296137; x=1712832137; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=EWbXnbYpe8+tF4U2np8/YIRhVcnifK5SS4Pt0gHALjc=; b=QA3ONyaPJAqGOV0TLlNG4+Wuyp8Sb5mHkba3VAc2k1A42OXjJu3HMK27 52rPMSTWezQxbz/GjYQl2DVhkQEBQtx45fb1rdLoMST7kvkSKavijWDQv 6Nrrjm02eHHOrxsM+/coHpCwWdIdvJeAVApJK3wJ3wB8DcvGAA8HixALw n7pJ5KcnqDiqChpFC8wqEPaMHGo1xhsR5BBHjinWWv5U429dWZkXHWjqX fCb3DC81wbODeln7a0SChaAzXlrPE/MbSo6oqrcrVeTWc5tqPeh9VwGPa poKL92su910SSvjZJqf8DAkSQw3Gvldc05ytsvaBK+vm/2abXjNhLKV6C Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="346535743" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="346535743" Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 03:42:16 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10677"; a="691503469" X-IronPort-AV: E=Sophos;i="5.98,339,1673942400"; d="scan'208";a="691503469" Received: from unknown (HELO localhost.localdomain) ([10.239.252.196]) by fmsmga007-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 12 Apr 2023 03:42:15 -0700 From: Yu Jiang To: ke1.xu@intel.com, dts@dpdk.org Cc: Yu Jiang Subject: [dts][PATCH V1 2/2] tests/ice_dcf_switch_filter: sync test_negative_case with testplan Date: Wed, 12 Apr 2023 18:42:10 +0800 Message-Id: <20230412104210.1345558-2-yux.jiang@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20230412104210.1345558-1-yux.jiang@intel.com> References: <20230412104210.1345558-1-yux.jiang@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 1, sync test_negative_case with testplan, add two subcases: Subcase 4: can not create to vf rule to self dcf Subcase 17: deprecated action 2, format.sh script Signed-off-by: Yu Jiang --- tests/TestSuite_ice_dcf_switch_filter.py | 26 ++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/tests/TestSuite_ice_dcf_switch_filter.py b/tests/TestSuite_ice_dcf_switch_filter.py index 0731199a..f9e5cbf3 100644 --- a/tests/TestSuite_ice_dcf_switch_filter.py +++ b/tests/TestSuite_ice_dcf_switch_filter.py @@ -2107,7 +2107,7 @@ tv_mac_ipv4_vxlan_ipv4_udp_pay = { ], "matched": { "scapy_str": [ - 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23) /Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23) /Raw("x"*80)' ], "check_func": { "func": rfc.check_vf_rx_packets_number, @@ -2136,7 +2136,7 @@ tv_mac_ipv4_vxlan_ipv4_tcp = { ], "matched": { "scapy_str": [ - 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)' ], "check_func": { "func": rfc.check_vf_rx_packets_number, @@ -2233,7 +2233,7 @@ tv_mac_ipv4_vxlan_mac_ipv4_udp_pay = { ], "matched": { "scapy_str": [ - 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)', + 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)' ], "check_func": { "func": rfc.check_vf_rx_packets_number, @@ -2262,7 +2262,7 @@ tv_mac_ipv4_vxlan_mac_ipv4_tcp = { ], "matched": { "scapy_str": [ - 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)' ], "check_func": { "func": rfc.check_vf_rx_packets_number, @@ -2819,6 +2819,7 @@ class ICEDCFSwitchFilterTest(TestCase): "cannot create to vf rule on a representor": "flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end", "cannot create to vf rule on a vf": "flow create 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end", "cannot create to vf rule to a vf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 3 / end", + "cannot create to vf rule to self dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 0 / end", "cannot create to vf rule to another dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 4 / end", "cannot create to vf rule to a representor of another pf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 5 / end", "cannot create vf original rule on a representor": "flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end", @@ -2828,6 +2829,7 @@ class ICEDCFSwitchFilterTest(TestCase): "cannot create vf original rule to another dcf": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 4 / end", "unsupported input set": "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 tos is 4 / end actions port_representor port_id 1 / end", "invalid port id": "flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 20 / end", + "deprecated action": "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions vf id 1 / end", "void action": "flow create 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end", "void input set value": "flow create 0 ingress pattern eth / ipv4 / end actions represented_port ethdev_port_id 1 end", } @@ -2861,6 +2863,16 @@ class ICEDCFSwitchFilterTest(TestCase): ) self.check_switch_filter_rule_list(0, []) + self.logger.info("Subcase 4: can not create to vf rule to self dcf") + self.validate_switch_filter_rule( + rules["cannot create to vf rule to self dcf"], check_stats=False + ) + self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule( + rules["cannot create to vf rule to self dcf"], check_stats=False + ) + self.check_switch_filter_rule_list(0, []) + # cannot create to vf rule to another dcf self.validate_switch_filter_rule( rules["cannot create to vf rule to another dcf"], check_stats=False @@ -2923,6 +2935,12 @@ class ICEDCFSwitchFilterTest(TestCase): ) self.check_switch_filter_rule_list(0, []) + self.logger.info("Subcase 17: deprecated action") + self.validate_switch_filter_rule(rules["deprecated action"], check_stats=False) + self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule(rules["deprecated action"], check_stats=False) + self.check_switch_filter_rule_list(0, []) + # unsupported input set self.validate_switch_filter_rule( rules["unsupported input set"], check_stats=False