From patchwork Tue Aug 25 19:34:12 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Nannan" X-Patchwork-Id: 75915 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D23B3A04B1; Tue, 25 Aug 2020 12:43:41 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 989BC1C226; Tue, 25 Aug 2020 12:43:41 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id 6AE78F90 for ; Tue, 25 Aug 2020 12:43:40 +0200 (CEST) IronPort-SDR: g2gw2EYFqHXQERBI5kBdhcaBkVh8DGil/y4CP6vmbR99yGZ+p/PHMCStGMfsrYpFlswRzungHo Sd/vNFsclDHA== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143744536" X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="143744536" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 03:43:39 -0700 IronPort-SDR: ps193nc4xwoSg7dgkePV7eEEskbqlEeZb5cjbZR/3gogd7TJQuo9guM+LfJIQmckWJDCd/8/6Q S7EPRMEz0l2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="443586089" Received: from dpdk-lunannan.sh.intel.com ([10.67.111.68]) by orsmga004.jf.intel.com with ESMTP; 25 Aug 2020 03:43:38 -0700 From: Nannan Lu To: dts@dpdk.org Cc: Nannan Lu Date: Tue, 25 Aug 2020 19:34:12 +0000 Message-Id: <1598384054-754384-1-git-send-email-nannan.lu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1 1/3] conf/cvl_dcf_switch_filter.cfg: add comms pacakge and ice package file location X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" conf/cvl_dcf_switch_filter.cfg: add comms package and ice package file location. Signed-off-by: Nannan Lu --- conf/cvl_dcf_switch_filter.cfg | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/conf/cvl_dcf_switch_filter.cfg b/conf/cvl_dcf_switch_filter.cfg index 5d1d90c..ec5fa93 100644 --- a/conf/cvl_dcf_switch_filter.cfg +++ b/conf/cvl_dcf_switch_filter.cfg @@ -1,7 +1,11 @@ [suite] # cvl_dcf_switch_filter common options ice driver file location -ice_driver_file_location="/lib/modules/4.15.0-101-generic/kernel/drivers/net/ethernet/intel/ice/ice.ko" +ice_driver_file_location="/home/lunannan/nd_linux-cpk/ice-1.1.0_rc30_3_g9d15683_dirty/src/ice.ko" # os default package file location -os_default_package_file_location="/lib/firmware/updates/intel/ice/ddp/ice-1.3.11.0.pkg" +os_default_package_file_location="/lib/firmware/updates/intel/ice/ddp/ice-1.3.16.0.pkg" +# comms package file location +comms_package_file_location="/home/lunannan/20.08_environment/rc3/ice_comms-1.3.20.0.pkg" +# package file location +package_file_location="/lib/firmware/updates/intel/ice/ddp/ice.pkg" # iavf driver file location iavf_driver_file_location="/home/lunannan/iavf/iavf-3.9.3/src/iavf.ko" From patchwork Tue Aug 25 19:34:13 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Nannan" X-Patchwork-Id: 75916 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D6469A04B1; Tue, 25 Aug 2020 12:43:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id C68A11C22A; Tue, 25 Aug 2020 12:43:45 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id A3342F90 for ; Tue, 25 Aug 2020 12:43:43 +0200 (CEST) IronPort-SDR: RJLXo4K8n+oV0dZdylwWtNPHrHhr3p9Y7nwB6zCahxj+LXMj6qdQPk5sC4VNhgezTGzEMI0JeQ nAWpf33Ocjkw== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143744567" X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="143744567" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 03:43:43 -0700 IronPort-SDR: 1hDAS1T2BOtyZdaVXKc0tbYRKWDGqZG1qxH5V/AWEpZ5SkADYtzh/P3XjNhTezD9NzC1J+y7Y9 02EtgT7YGqWA== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="443586100" Received: from dpdk-lunannan.sh.intel.com ([10.67.111.68]) by orsmga004.jf.intel.com with ESMTP; 25 Aug 2020 03:43:41 -0700 From: Nannan Lu To: dts@dpdk.org Cc: Nannan Lu Date: Tue, 25 Aug 2020 19:34:13 +0000 Message-Id: <1598384054-754384-2-git-send-email-nannan.lu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598384054-754384-1-git-send-email-nannan.lu@intel.com> References: <1598384054-754384-1-git-send-email-nannan.lu@intel.com> Subject: [dts] [PATCH V1 2/3] tests/TestSuite_cvl_dcf_switch_filter.py: add PPPOE cases and modify some cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" tests/TestSuite_cvl_dcf_switch_filter.py: add PPPOE cases and modify some cases to add mismatched packets. Signed-off-by: Nannan Lu --- tests/TestSuite_cvl_dcf_switch_filter.py | 1005 +++++++++++++++++++++--------- 1 file changed, 721 insertions(+), 284 deletions(-) diff --git a/tests/TestSuite_cvl_dcf_switch_filter.py b/tests/TestSuite_cvl_dcf_switch_filter.py index 223e95d..d52e487 100644 --- a/tests/TestSuite_cvl_dcf_switch_filter.py +++ b/tests/TestSuite_cvl_dcf_switch_filter.py @@ -99,7 +99,12 @@ tv_mac_ipv4_udp_pay = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=30,dport=23)/("X"*480)', + "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=30,dport=23)/("X"*480)', 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=19)/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, @@ -113,7 +118,12 @@ tv_mac_ipv4_tcp_pay = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=30,dport=23)/("X"*480)', + "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=30,dport=23)/("X"*480)', 'Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=19)/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, @@ -134,59 +144,37 @@ tv_mac_ipv4_igmp = { "expect_results":{"expect_pkts":0}} } -tv_mac_ipv6_frag_srcip_dstip = { - "name":"tv_mac_ipv6_frag_srcip_dstip", - "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_ipv6_frag_dstip_tc = { - "name":"tv_mac_ipv6_frag_dstip_tc", - "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)', - 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/("X"*480)', - 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - -tv_mac_ipv6_pay_srcip_dstip = { - "name":"tv_mac_ipv6_pay_srcip_dstip", +tv_mac_ipv6_srcip_dstip = { + "name":"tv_mac_ipv6_srcip_dstip", "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)'], + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, + "expect_results":{"expect_pkts":2}}, "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)', - 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)'], + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)', + 'Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} } -tv_mac_ipv6_pay_dstip_tc = { - "name":"tv_mac_ipv6_pay_dstip_tc", +tv_mac_ipv6_dstip_tc = { + "name":"tv_mac_ipv6_dstip_tc", "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)'], + "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, + "expect_results":{"expect_pkts":2}}, "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)', 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/("X"*480)', - 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/("X"*480)'], + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} @@ -199,7 +187,10 @@ tv_mac_ipv6_udp_pay = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)', + "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/UDP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)', 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=19)/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, @@ -213,42 +204,32 @@ tv_mac_ipv6_tcp = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=30,dport=23)/("X"*480)', + "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/TCP(sport=25,dport=23)/("X"*480)', + 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=30,dport=23)/("X"*480)', 'Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=19)/("X"*480)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} } -tv_mac_ipv4_nvgre_ipv4_frag = { - "name":"tv_mac_ipv4_nvgre_ipv4_frag", - "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":2}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/TCP()/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - tv_mac_ipv4_nvgre_ipv4_pay = { "name":"tv_mac_ipv4_nvgre_ipv4_pay", "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)'], + "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":2}}, "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)'], + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} @@ -261,7 +242,11 @@ tv_mac_ipv4_nvgre_ipv4_udp_pay = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=20,dport=23)/Raw("x"*80)', + "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/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")/NVGRE(TNI=0x3)/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")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.5", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.7")/UDP(sport=50,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=20,dport=23)/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=19)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, @@ -275,36 +260,22 @@ tv_mac_ipv4_nvgre_ipv4_tcp = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=20,dport=23)/Raw("x"*80)', + "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=20,dport=23)/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=39)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} } -tv_mac_ipv4_nvgre_mac_ipv4_frag = { - "name":"tv_mac_ipv4_nvgre_mac_ipv4_frag", - "rte_flow_pattern":"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 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":2}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/TCP()/Raw("x"*80)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - tv_mac_ipv4_nvgre_mac_ipv4_pay = { "name":"tv_mac_ipv4_nvgre_mac_ipv4_pay", - "rte_flow_pattern":"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 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)'], + "rte_flow_pattern":"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 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":2}}, @@ -312,7 +283,12 @@ tv_mac_ipv4_nvgre_mac_ipv4_pay = { 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)', - 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)'], + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} @@ -325,7 +301,12 @@ tv_mac_ipv4_nvgre_mac_ipv4_udp_pay = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=2,dport=23)/Raw("x"*80)', + "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=2,dport=23)/Raw("x"*80)]', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=20)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, @@ -339,15 +320,20 @@ tv_mac_ipv4_nvgre_mac_ipv4_tcp = { "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=1,dport=23)/Raw("x"*80)', + "mismatched":{"scapy_str":['Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)', + 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=1,dport=23)/Raw("x"*80)', 'Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=20)/Raw("x"*80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, "param":{"expect_port":1, "expect_queues":"null"}}, "expect_results":{"expect_pkts":0}} } -tv_mac_vlan_pppoe_ipv4_pay = { - "name":"tv_mac_vlan_pppoe_ipv4_pay", +tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id = { + "name":"tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id", "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end", "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, @@ -362,8 +348,8 @@ tv_mac_vlan_pppoe_ipv4_pay = { "expect_results":{"expect_pkts":0}} } -tv_mac_vlan_pppoe_ipv6_pay = { - "name":"tv_mac_vlan_pppoe_ipv6_pay", +tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id = { + "name":"tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id", "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end", "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, @@ -378,8 +364,8 @@ tv_mac_vlan_pppoe_ipv6_pay = { "expect_results":{"expect_pkts":0}} } -tv_mac_pppoe_ipv4_pay = { - "name":"tv_mac_pppoe_ipv4_pay", +tv_mac_pppoe_ipv4_pay_session_id_proto_id = { + "name":"tv_mac_pppoe_ipv4_pay_session_id_proto_id", "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end", "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, @@ -393,8 +379,8 @@ tv_mac_pppoe_ipv4_pay = { "expect_results":{"expect_pkts":0}} } -tv_mac_pppoe_ipv6_pay = { - "name":"tv_mac_pppoe_ipv6_pay", +tv_mac_pppoe_ipv6_pay_session_id_proto_id = { + "name":"tv_mac_pppoe_ipv6_pay_session_id_proto_id", "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end", "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)'], "check_func":{"func":rfc.check_vf_rx_packets_number, @@ -408,20 +394,6 @@ tv_mac_pppoe_ipv6_pay = { "expect_results":{"expect_pkts":0}} } -tv_qinq = { - "name":"tv_qinq", - "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / vlan tci is 2 / end actions vf id 1 / end", - "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=1)/Dot1Q(type=0x0800,vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":1}}, - "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=3)/Dot1Q(type=0x0800, vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)', - 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=1)/Dot1Q(type=0x0800, vlan=5)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)'], - "check_func":{"func":rfc.check_vf_rx_packets_number, - "param":{"expect_port":1, "expect_queues":"null"}}, - "expect_results":{"expect_pkts":0}} -} - tv_ip_multicast = { "name":"tv_ip_multicast", "rte_flow_pattern":"flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions vf id 1 / end", @@ -676,6 +648,17 @@ tv_mac_ipv6_nat_t_esp = { "expect_results":{"expect_pkts":0}} } +tv_actions_vf_id_0 = { + "name":"tv_actions_vf_id_0", + "rte_flow_pattern":"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 vf id 0 / end", + "matched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":0, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}}, + "mismatched":{} +} + + tv_add_existing_rules_but_with_different_vfs = { "name":"tv_add_existing_rules_but_with_different_vfs", "rte_flow_pattern":["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 vf id 1 / end", @@ -726,7 +709,7 @@ tv_max_vfs = { "check_func":{"func":rfc.check_kernel_vf_rx_packets_number, "param":{"expect_port":list(range(1, 64)), "expect_queues":"null"}}, "expect_results":{"expect_pkts":[1]*63}}, - "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.64")/TCP()/Raw("X"*480)'], + "mismatched":{"scapy_str":['Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.167.0.0")/TCP()/Raw("X"*480)'], "check_func":{"func":rfc.check_kernel_vf_rx_packets_number, "param":{"expect_port":list(range(1, 64)), "expect_queues":"null"}}, "expect_results":{"expect_pkts":[1]*63}} @@ -855,6 +838,384 @@ tv_add_two_rules_with_different_input_set_different_vf_id = { "expect_results":{"expect_pkts":[0, 0]}} } +tv_mac_pppoe_ipv4_pay_ip_address = { + "name":"tv_mac_pppoe_ipv4_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_udp_pay = { + "name":"tv_mac_pppoe_ipv4_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_tcp_pay = { + "name":"tv_mac_pppoe_ipv4_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_pay_ip_address = { + "name":"tv_mac_pppoe_ipv6_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_udp_pay = { + "name":"tv_mac_pppoe_ipv6_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_tcp_pay = { + "name":"tv_mac_pppoe_ipv6_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port = { + "name":"tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_pay_ip_address = { + "name":"tv_mac_vlan_pppoe_ipv4_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay = { + "name":"tv_mac_vlan_pppoe_ipv4_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay = { + "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_pay_ip_address = { + "name":"tv_mac_vlan_pppoe_ipv6_pay_ip_address", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)', + 'Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay = { + "name":"tv_mac_vlan_pppoe_ipv6_udp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay = { + "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port = { + "name":"tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port", + "rte_flow_pattern":"flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_lcp_pay = { + "name":"tv_mac_pppoe_lcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_pppoe_ipcp_pay = { + "name":"tv_mac_pppoe_ipcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_lcp_pay = { + "name":"tv_mac_vlan_pppoe_lcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + +tv_mac_vlan_pppoe_ipcp_pay = { + "name":"tv_mac_vlan_pppoe_ipcp_pay", + "rte_flow_pattern":"flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end", + "matched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":1}}, + "mismatched":{"scapy_str":['Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)', + 'Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)'], + "check_func":{"func":rfc.check_vf_rx_packets_number, + "param":{"expect_port":1, "expect_queues":"null"}}, + "expect_results":{"expect_pkts":0}} +} + class CVLDCFSwitchFilterTest(TestCase): def bind_nics_driver(self, ports, driver=""): @@ -892,14 +1253,18 @@ class CVLDCFSwitchFilterTest(TestCase): self.verify(len(self.dut_ports) >= 1, "Insufficient ports") localPort = self.tester.get_local_port(self.dut_ports[0]) self.__tx_iface = self.tester.get_interface(localPort) - self.tester.send_expect("ifconfig %s up" % self.__tx_iface, "# ") - self.dut.send_expect("ifconfig %s up" % self.dut_ports[0], "# ") + self.dut.send_expect("ifconfig %s up" % self.__tx_iface, "# ") self.pkt = Packet() self.testpmd_status = "close" - self.suite_config = rfc.get_suite_config(self) - self.pkg_file = "/lib/firmware/updates/intel/ice/ddp/ice.pkg" #bind pf to kernel self.bind_nics_driver(self.dut_ports, driver="ice") + #move comms package to package folder + self.suite_config = rfc.get_suite_config(self) + comms_package_location = self.suite_config["comms_package_file_location"] + package_location = self.suite_config["package_file_location"] + self.dut.send_expect("cp %s %s" % (comms_package_location, package_location), "# ") + self.re_load_ice_driver() + #set vf driver self.vf_driver = 'vfio-pci' self.dut.send_expect('modprobe vfio-pci', '#') @@ -924,13 +1289,6 @@ class CVLDCFSwitchFilterTest(TestCase): """ remove and reload the ice driver """ - if self.running_case == "test_unsupported_pattern_in_os_default_but_supported_in_comms": - #save comms pkg to /tmp - self.tmp_dir = "/tmp/ice.pkg" - self.dut.send_expect("cp %s %s" % (self.pkg_file, self.tmp_dir), "# ") - #use os default package to test the case - os_default_package_file_location = self.suite_config["os_default_package_file_location"] - self.dut.send_expect("cp %s %s" % (os_default_package_file_location, self.pkg_file), "# ") ice_driver_file_location = self.suite_config["ice_driver_file_location"] self.dut.send_expect("rmmod ice", "# ", 15) self.dut.send_expect("insmod %s" % ice_driver_file_location, "# ", 60) @@ -1017,7 +1375,39 @@ class CVLDCFSwitchFilterTest(TestCase): results = dic["check_func"]["func"](out, dic["check_func"]["param"], dic["expect_results"], False) return results - def create_switch_filter_rule(self, rte_flow_pattern, session_name="", need_verify=True): + def validate_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True): + """ + validate switch filter rules + """ + if session_name == "": + session_name = self.dut + p = "Flow rule validated" + rule_list = [] + if isinstance(rte_flow_pattern, list): + for rule in rte_flow_pattern: + length = len(rule) + rule_rep = rule[0:5] + "validate" + rule[11:length] + out = session_name.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + elif isinstance(rte_flow_pattern, str): + length = len(rte_flow_pattern) + rule_rep = rte_flow_pattern[0:5] + "validate" + rte_flow_pattern[11:length] + out = session_name.send_expect(rule_rep, "testpmd> ") #validate a rule + if (p in out) and ("Failed" not in out): + rule_list.append(True) + else: + rule_list.append(False) + else: + raise Exception("unsupported rule type, only accept list or str") + if check_stats: + self.verify(all(rule_list), "some rules not validated successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + else: + self.verify(not any(rule_list), "all rules should not validate successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + + def create_switch_filter_rule(self, rte_flow_pattern, session_name="", check_stats=True): """ create switch filter rules """ @@ -1040,8 +1430,10 @@ class CVLDCFSwitchFilterTest(TestCase): rule_list.append(m.group(1)) else: rule_list.append(False) - if need_verify: + if check_stats: self.verify(all(rule_list), "some rules not created successfully, result %s, rule %s" % (rule_list, rte_flow_pattern)) + else: + self.verify(not any(rule_list), "all rules should create failed, result %s" % rule_list) return rule_list def check_switch_filter_rule_list(self, port_id, rule_list, session_name="", need_verify=True): @@ -1061,10 +1453,10 @@ class CVLDCFSwitchFilterTest(TestCase): res = filter(bool, map(p_spec.match, out_lines)) result = [i.group(1) for i in res] if need_verify: - self.verify(sorted(result) == sorted(rule_list), + self.verify(result == rule_list, "the rule list is not the same. expect %s, result %s" % (rule_list, result)) else: - return sorted(result) + return result def destroy_switch_filter_rule(self, port_id, rule_list, session_name="", need_verify=True): if session_name == "": @@ -1107,6 +1499,8 @@ class CVLDCFSwitchFilterTest(TestCase): if launch_testpmd: #launch testpmd self.launch_testpmd() + #validate a rule + self.validate_switch_filter_rule(test_vector["rte_flow_pattern"]) #create a rule rule_list = self.create_switch_filter_rule(test_vector["rte_flow_pattern"]) #create a rule self.check_switch_filter_rule_list(0, rule_list) @@ -1151,21 +1545,13 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_igmp) - def test_mac_ipv6_frag_srcip_dstip(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv6_frag_srcip_dstip) - - def test_mac_ipv6_frag_dstip_tc(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv6_frag_dstip_tc) - - def test_mac_ipv6_pay_srcip_dstip(self): + def test_mac_ipv6_srcip_dstip(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv6_pay_srcip_dstip) + self._rte_flow_validate_pattern(tv_mac_ipv6_srcip_dstip) - def test_mac_ipv6_pay_dstip_tc(self): + def test_mac_ipv6_dstip_tc(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv6_pay_dstip_tc) + self._rte_flow_validate_pattern(tv_mac_ipv6_dstip_tc) def test_mac_ipv6_udp_pay(self): self.setup_1pf_vfs_env() @@ -1175,10 +1561,6 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_tcp) - def test_mac_ipv4_nvgre_ipv4_frag(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_frag) - def test_mac_ipv4_nvgre_ipv4_pay(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_pay) @@ -1191,10 +1573,6 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_ipv4_tcp) - def test_mac_ipv4_nvgre_mac_ipv4_frag(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_frag) - def test_mac_ipv4_nvgre_mac_ipv4_pay(self): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_pay) @@ -1207,25 +1585,21 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv4_nvgre_mac_ipv4_tcp) - def test_mac_vlan_pppoe_ipv4_pay(self): + def test_mac_vlan_pppoe_ipv4_pay_session_id_proto_id(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay) + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_session_id_proto_id) - def test_mac_vlan_pppoe_ipv6_pay(self): + def test_mac_vlan_pppoe_ipv6_pay_session_id_proto_id(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay) + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_session_id_proto_id) - def test_mac_pppoe_ipv4_pay(self): + def test_mac_pppoe_ipv4_pay_session_id_proto_id(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay) + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_session_id_proto_id) - def test_mac_pppoe_ipv6_pay(self): + def test_mac_pppoe_ipv6_pay_session_id_proto_id(self): self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay) - - def _test_qinq(self): - self.setup_1pf_vfs_env() - self._rte_flow_validate_pattern(tv_qinq) + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_session_id_proto_id) def test_ip_multicast(self): self.setup_1pf_vfs_env() @@ -1299,92 +1673,60 @@ class CVLDCFSwitchFilterTest(TestCase): self.setup_1pf_vfs_env() self._rte_flow_validate_pattern(tv_mac_ipv6_nat_t_esp) - def test_cannot_create_rule_on_vf_1(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - #create a rule on vf 1 - rule = "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 vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out, "Log not provide a friendly output to indicate that the rule failed to create.") - #check the rule list - self.check_switch_filter_rule_list(1, []) - - def test_unsupported_pattern_in_comms(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - #create an SCTP rule which is not supported in comms - rule = "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input pattern" in out, "Log not provide a friendly output to indicate that the SCTP rule failed to create.") - #check the rule list - self.check_switch_filter_rule_list(0, []) - - def test_unsupported_pattern_in_os_default_but_supported_in_comms(self): + def test_negative_case(self): """ - test with os default package + negative cases """ #set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() #launch testpmd self.launch_testpmd() - #create a PPPOE rule which is not supported in os default - rule = "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input pattern" in out, "Log not provide a friendly output to indicate that the PPPOE rule failed to create.") - #check the rule list + rules = { + "cannot create rule on vf 1": "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 vf id 1 / 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 vf id 1 / end", + "invalid vf 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 vf id 5 / 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 vf id 1 end" + } + # cannot create rule on vf 1 + self.validate_switch_filter_rule(rules["cannot create rule on vf 1"], check_stats=False) + self.check_switch_filter_rule_list(1, []) + self.create_switch_filter_rule(rules["cannot create rule on vf 1"], check_stats=False) + self.check_switch_filter_rule_list(1, []) + + # unsupported input set + self.validate_switch_filter_rule(rules["unsupported input set"], check_stats=False) self.check_switch_filter_rule_list(0, []) - #create a MAC_IPV4_PFCP_NODE rule - rule = "flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input pattern" in out, "Log not provide a friendly output to indicate that the mac_ipv4_pfcp_node rule failed to create.") - #check the rule list + self.create_switch_filter_rule(rules["unsupported input set"], check_stats=False) self.check_switch_filter_rule_list(0, []) - #create a l2tpv3 rule which is not supported in os default - rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input pattern" in out, "Log not provide a friendly output to indicate that the l2tpv3 rule failed to create.") - #check the rule list + + # duplicated rues + rule = "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" + rule_list = self.create_switch_filter_rule(rule) #create a rule + self.check_switch_filter_rule_list(0, rule_list) + self.create_switch_filter_rule(rule, check_stats=False) + self.check_switch_filter_rule_list(0, rule_list) + self.destroy_switch_filter_rule(0, rule_list) + + # void action + self.validate_switch_filter_rule(rules["void action"], check_stats=False) self.check_switch_filter_rule_list(0, []) - #create a esp rule which is not supported in os default - rule = "flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input pattern" in out, "Log not provide a friendly output to indicate that the esp rule failed to create.") - #check the rule list + self.create_switch_filter_rule(rules["void action"], check_stats=False) self.check_switch_filter_rule_list(0, []) - def test_unsupported_input_set(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - #create a rule with input set [inner tos] - rule = "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 vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out and "Invalid input set" in out, "Log not provide a friendly output to indicate that the input set is not supported.") - #check the rule list + # void input set value + self.validate_switch_filter_rule(rules["void input set value"], check_stats=False) + self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule(rules["void input set value"], check_stats=False) self.check_switch_filter_rule_list(0, []) - def test_invalid_vf_id(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - #create a rule with invalid vf id 5 - rule = "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 vf id 5 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) - self.verify("Failed to create flow" in out, "Log not provide a friendly output to indicate that the rule failed to create.") - #check the rule list + # invalid vf id + # self.validate_switch_filter_rule(rules["invalid vf id"], check_stats=False) + # self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule(rules["invalid vf id"], check_stats=False) self.check_switch_filter_rule_list(0, []) - def test_delete_non_existing_rule(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() + # delete non-existing rule #check no rule in the list self.check_switch_filter_rule_list(0, []) #destroy rule 0 @@ -1394,7 +1736,51 @@ class CVLDCFSwitchFilterTest(TestCase): out = self.dut.send_expect("flow flush 0", "testpmd> ", timeout=15) self.verify("Fail" not in out, "Destroy failed.") - def _test_add_existing_rules_but_with_different_vfs(self): + # add long switch rule + rule = "flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / end" + self.validate_switch_filter_rule(rule, check_stats=False) + self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule(rule, check_stats=False) + self.check_switch_filter_rule_list(0, []) + #create MAC_IPV6_UDP_PAY rule, and check the rule will not be affected by the long rule failure + self._rte_flow_validate_pattern(tv_mac_ipv6_udp_pay, launch_testpmd=False) + + def test_unsupported_pattern_in_os_default(self): + """ + test with os default package + """ + #set up 4 vfs on 1 pf environment + os_package_location = self.suite_config["os_default_package_file_location"] + comms_package_location = self.suite_config["comms_package_file_location"] + package_location = self.suite_config["package_file_location"] + self.dut.send_expect("cp %s %s" % (os_package_location, package_location), "# ") + self.re_load_ice_driver() + self.setup_1pf_vfs_env() + #launch testpmd + self.launch_testpmd() + rules = [ + "flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end", + "flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end" + ] + self.validate_switch_filter_rule(rules, check_stats=False) + self.check_switch_filter_rule_list(0, []) + self.create_switch_filter_rule(rules, check_stats=False) + self.check_switch_filter_rule_list(0, []) + + self.dut.send_expect("flow flush 0", "testpmd> ", 300) + self.dut.send_expect("quit", "#") + self.testpmd_status = "close" + # destroy vfs + for port_id in self.dut_ports: + self.dut.destroy_sriov_vfs_by_port(port_id) + self.dut.send_expect("cp %s %s" % (comms_package_location, package_location), "# ") + self.re_load_ice_driver() + + def test_add_existing_rules_but_with_different_vfs(self): #set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() #launch testpmd @@ -1442,8 +1828,7 @@ class CVLDCFSwitchFilterTest(TestCase): rule_list = self.create_switch_filter_rule(rule) #create a rule self.check_switch_filter_rule_list(0, rule_list) #create the same rule - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out, "Log not provide a friendly output to indicate that the rule is failed to create.") + self.create_switch_filter_rule(rule, check_stats=False) #create a rule self.check_switch_filter_rule_list(0, rule_list) def test_add_two_rules_with_one_rule_input_set_included_in_the_other(self): @@ -1490,19 +1875,6 @@ class CVLDCFSwitchFilterTest(TestCase): destroy_dict["expect_results"]["expect_pkts"][1] = 0 self.send_and_check_packets(destroy_dict) - def test_add_long_switch_rule(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - rule = "flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=15) - self.verify("Failed to create flow" in out, "Log not provide a friendly output to indicate that the rule failed to create.") - #check the rule list - self.check_switch_filter_rule_list(0, []) - #create MAC_IPV6_UDP_PAY rule, and check the rule will not be affected by the long rule failure - self._rte_flow_validate_pattern(tv_mac_ipv6_udp_pay, launch_testpmd=False) - def test_fwd_with_single_vf(self): #set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() @@ -1636,9 +2008,7 @@ class CVLDCFSwitchFilterTest(TestCase): self.check_switch_filter_rule_list(0, rule_list) #create a rule, check the rule can not be created successfully rule = "flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.10 / nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a1 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) #create a rule - self.verify("Failed to create flow" in out, "Log not provide a friendly output to indicate that the rule failed to create.") - #check the rule list + self.create_switch_filter_rule(rule, check_stats=False) self.check_switch_filter_rule_list(0, rule_list) #send matched packets and check matched_dic = tv_max_field_vectors["matched"] @@ -1727,32 +2097,6 @@ class CVLDCFSwitchFilterTest(TestCase): destroy_dict["expect_results"]["expect_pkts"] = 0 self.send_and_check_packets(destroy_dict) - def test_flow_validation(self): - #set up 4 vfs on 1 pf environment - self.setup_1pf_vfs_env() - #launch testpmd - self.launch_testpmd() - #validate MAC_IPV4_UDP_PAY - rule = "flow validate 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 vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) - self.verify("Flow rule validated" in out, "validate failed. rule: %s " % rule) - #validate MAC_IPV4_PFCP_NODE - rule = "flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) - self.verify("Flow rule validated" in out, "validate failed. rule: %s " % rule) - #validate MAC_IPV4_SCTP_PAY - rule = "flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) - self.verify("error" in out and "Invalid input pattern: Invalid argument" in out, "validate failed. rule: %s " % rule) - #check the rule list - self.check_switch_filter_rule_list(0, []) - #validate a rule on invalid vf - rule = "flow validate 1 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end" - out = self.dut.send_expect(rule, "testpmd> ", timeout=2) - self.verify("error" in out and "Failed" in out, "validate failed. rule: %s " % rule) - #check the rule list - self.check_switch_filter_rule_list(1, []) - def test_dcf_stop_start(self): #set up 4 vfs on 1 pf environment self.setup_1pf_vfs_env() @@ -1807,24 +2151,117 @@ class CVLDCFSwitchFilterTest(TestCase): self.dut.send_expect("set verbose 1", "testpmd> ", 15) self._rte_flow_validate_pattern(tv_add_two_rules_with_different_input_set_different_vf_id, False) + def test_mac_pppoe_ipv4_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_pay_ip_address) + + def test_mac_pppoe_ipv4_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay) + + def test_mac_pppoe_ipv4_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv4_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay) + + def test_mac_pppoe_ipv4_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_pay_ip_address) + + def test_mac_pppoe_ipv6_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay) + + def test_mac_pppoe_ipv6_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_pppoe_ipv6_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay) + + def test_mac_pppoe_ipv6_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipv6_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_pay_ip_address) + + def test_mac_vlan_pppoe_ipv4_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay) + + def test_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv4_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay) + + def test_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv4_tcp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_pay_ip_address(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_pay_ip_address) + + def test_mac_vlan_pppoe_ipv6_udp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay) + + def test_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_udp_pay_non_src_dst_port) + + def test_mac_vlan_pppoe_ipv6_tcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay) + + def test_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipv6_tcp_pay_non_src_dst_port) + + def test_mac_pppoe_lcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_lcp_pay) + + def test_mac_pppoe_ipcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_pppoe_ipcp_pay) + + def test_mac_vlan_pppoe_lcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_lcp_pay) + + def test_mac_vlan_pppoe_ipcp_pay(self): + self.setup_1pf_vfs_env() + self._rte_flow_validate_pattern(tv_mac_vlan_pppoe_ipcp_pay) + def tear_down(self): """ Run after each test case. """ if self.testpmd_status != "close": # destroy all flow rules on DCF - self.dut.send_expect("flow flush 0", "testpmd> ", 120) + self.dut.send_expect("flow flush 0", "testpmd> ", 15) self.dut.send_expect("clear port stats all", "testpmd> ", 15) self.dut.send_expect("quit", "#", 15) + #kill all DPDK application + self.dut.kill_all() + # destroy vfs + for port_id in self.dut_ports: + self.dut.destroy_sriov_vfs_by_port(port_id) self.testpmd_status = "close" - #kill all DPDK application - self.dut.kill_all() - # destroy vfs - for port_id in self.dut_ports: - self.dut.destroy_sriov_vfs_by_port(port_id) - if self.running_case == "test_unsupported_pattern_in_os_default_but_supported_in_comms": - #Restore the pkg file - self.dut.send_expect("cp %s %s" % (self.tmp_dir, self.pkg_file), "# ") if getattr(self, 'session_secondary', None): self.dut.close_session(self.session_secondary) From patchwork Tue Aug 25 19:34:14 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Lu, Nannan" X-Patchwork-Id: 75917 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D6CDA04B1; Tue, 25 Aug 2020 12:43:50 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0D43E1C229; Tue, 25 Aug 2020 12:43:50 +0200 (CEST) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by dpdk.org (Postfix) with ESMTP id C0104F90 for ; Tue, 25 Aug 2020 12:43:47 +0200 (CEST) IronPort-SDR: mojrtLLEnjDx1nO96foRaAe5zx/sqDu71zRYQLumbdM2VRBbN3qtX5Vg/gOcpD4ryPOHPwBSA+ B3gIYbAHA5Tw== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143744600" X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="143744600" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 03:43:47 -0700 IronPort-SDR: PE2qj0lJoq4tlQHafyHILxVVw795J7lMECkuv1qZ3/MAG5JjlUbDAM1lYLs+SFY14eOqPvINsI SNWQ4EKaC8uQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,352,1592895600"; d="scan'208";a="443586108" Received: from dpdk-lunannan.sh.intel.com ([10.67.111.68]) by orsmga004.jf.intel.com with ESMTP; 25 Aug 2020 03:43:44 -0700 From: Nannan Lu To: dts@dpdk.org Cc: Nannan Lu Date: Tue, 25 Aug 2020 19:34:14 +0000 Message-Id: <1598384054-754384-3-git-send-email-nannan.lu@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1598384054-754384-1-git-send-email-nannan.lu@intel.com> References: <1598384054-754384-1-git-send-email-nannan.lu@intel.com> Subject: [dts] [PATCH V1 3/3] test_plans/cvl_dcf_switch_filter_test_plan.rst: add PPPOE cases X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "dts" test_plans/cvl_dcf_switch_filter_test_plan.rst: add PPPOE cases and validate check for all cases. Signed-off-by: Nannan Lu --- test_plans/cvl_dcf_switch_filter_test_plan.rst | 3155 +++++++++++++++++++----- 1 file changed, 2510 insertions(+), 645 deletions(-) diff --git a/test_plans/cvl_dcf_switch_filter_test_plan.rst b/test_plans/cvl_dcf_switch_filter_test_plan.rst index ad0befd..ff7c445 100644 --- a/test_plans/cvl_dcf_switch_filter_test_plan.rst +++ b/test_plans/cvl_dcf_switch_filter_test_plan.rst @@ -41,8 +41,8 @@ This document provides the plan for testing DCF switch filter of CVL, including: * Enable DCF switch filter for IPv4/IPv6 + TCP/UDP/IGMP (comm #1 package) * Enable DCF switch filter for tunnel: NVGRE (comm #1 package) -* Enable DCF switch filter for PPPOE (comm #1 package) -* Enable DCF switch filter for PFCP (comm #1 package) +* Enable DCF switch filter for PPPOES (comm #1 package) +* Enable DCF switch filter for PFCP/L2TPv3/AH/ESP/NAT-T-ESP (comm #1 package) * Enable DCF switch filter for IP/L2 multicast (comm #1 package) * Enable DCF switch filter for ethertype/UDP port/MAC VLAN/VLAN filter (comm #1 package) @@ -116,14 +116,84 @@ Pattern and input set | | | [Inner Source Port], [Inner Dest Port] | +---------------------+-------------------------------+-------------------------------------------+ | | MAC_VLAN_PPPOE_IPV4_PAY | [Dest MAC], [VLAN], [seid], | - | | | [pppoe_proto_id] | + | | _session_id_proto_id | [pppoe_proto_id] | | +-------------------------------+-------------------------------------------+ | | MAC_VLAN_PPPOE_IPV6_PAY | [Dest MAC], [VLAN], [seid], | - | PPPOE | | [pppoe_proto_id] | + | | _session_id_proto_id | [pppoe_proto_id] | | +-------------------------------+-------------------------------------------+ | | MAC_PPPOE_IPV4_PAY | [Dest MAC], [seid], [pppoe_proto_id] | + | | _session_id_proto_id | | | +-------------------------------+-------------------------------------------+ | | MAC_PPPOE_IPV6_PAY | [Dest MAC], [seid], [pppoe_proto_id] | + | | _session_id_proto_id | | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_PAY_IP_address | [Source IP], [Dest IP] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_UDP_PAY | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_UDP_PAY | [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_TCP_PAY | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_TCP_PAY | [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_PAY_IP_address | [Source IP], [Dest IP] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_UDP_PAY | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_UDP_PAY | [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_TCP_PAY | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | + | PPPOES +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_TCP_PAY | [Source IP], [Dest IP], | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_PAY | [VLAN], [Source IP], [Dest IP] | + | | _IP_address | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_UDP_PAY | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_UDP_PAY | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_TCP_PAY | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_TCP_PAY | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_PAY | [VLAN], [Source IP], [Dest IP] | + | | _IP_address | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_UDP_PAY | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_UDP_PAY | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_TCP_PAY | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_TCP_PAY | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_LCP_PAY | [Dest MAC], [seid], [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPCP_PAY | [Dest MAC], [seid], [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_LCP_PAY | [Dest MAC], [VLAN], [seid], | + | | | [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPCP_PAY | [Dest MAC], [VLAN], [seid], | + | | | [pppoe_proto_id] | +---------------------+-------------------------------+-------------------------------------------+ | | MAC_IPV4_PFCP_NODE | [Dest Port], [S-field] | | +-------------------------------+-------------------------------------------+ @@ -170,7 +240,13 @@ Pattern and input set | | MAC_IPV6_NAT-T-ESP | [Source IP], [Dest IP], [SPI] | +---------------------+-------------------------------+-------------------------------------------+ - +.. note:: + + 1. The maximum input set length of a switch rule is 32 bytes, and src ipv6, + dst ipv6 account for 32 bytes. Therefore, for ipv6 cases, if need to test + fields other than src, dst ip, we create rule by removing src or dst ip in + the test plan. + Supported function type ----------------------- @@ -178,6 +254,7 @@ Supported function type * validate * destroy * flush +* list Supported action type @@ -191,6 +268,7 @@ Prerequisites 1. Hardware: columbiaville_25g/columbiaville_100g + design the cases with 2 ports card. 2. Software: dpdk: http://dpdk.org/git/dpdk @@ -258,14 +336,28 @@ Prerequisites Test case: MAC_PAY ================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth src is 00:00:00:00:00:01 dst is 00:11:22:33:44:55 type is 0x0800 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth src is 00:00:00:00:00:01 dst is 00:11:22:33:44:55 type is 0x0800 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:55")/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) @@ -278,7 +370,7 @@ Test case: MAC_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -286,18 +378,31 @@ Test case: MAC_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_FRAG ======================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 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 2 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> 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 2 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2,frag=5)/("X"*480)], iface="enp27s0f0", count=1) @@ -312,7 +417,7 @@ Test case: MAC_IPV4_FRAG check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -320,18 +425,31 @@ Test case: MAC_IPV4_FRAG check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_PAY ======================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 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 proto is 6 tos is 4 ttl is 2 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> 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 proto is 6 tos is 4 ttl is 2 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/("X"*480)], iface="enp27s0f0", count=1) @@ -347,7 +465,7 @@ Test case: MAC_IPV4_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -355,30 +473,48 @@ Test case: MAC_IPV4_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_UDP_PAY =========================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 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 vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> 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 vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=30,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=19)/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -386,30 +522,48 @@ Test case: MAC_IPV4_UDP_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_TCP_PAY =========================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 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 vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> 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 vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.5",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=30,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/TCP(sport=25,dport=19)/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -417,18 +571,31 @@ Test case: MAC_IPV4_TCP_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_IGMP ======================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 proto is 0x02 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 proto is 0x02 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="00:11:22:33:44:55")/IP()/IGMP()/Raw("X"*480)], iface="enp27s0f0", count=1) @@ -440,7 +607,7 @@ Test case: MAC_IPV4_IGMP check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -448,65 +615,49 @@ Test case: MAC_IPV4_IGMP check the rule not exists in the list. send matched packets, check the packets are not to port 1. - -Test case: MAC_IPV6_FRAG_srcip_dstip -==================================== +Test case: MAC_IPV6_srcip_dstip +=============================== Description: The maximum input set length of a switch rule is 32 bytes. Therefore, if a rule carries src ipv6, dst ipv6, it can not take any other fields. -1. create a rule:: - - testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end - testpmd> flow list 0 - - check the rule exists in the list. - -2. send matched packets:: - - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) +1. validate a rule:: - check port 1 receive the packet. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - - -Test case: MAC_IPV6_FRAG_dstip_tc -================================= -1. create a rule:: +2. create a rule:: - testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -514,51 +665,34 @@ Test case: MAC_IPV6_FRAG_dstip_tc check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_IPV6_dstip_tc +============================ -Test case: MAC_IPV6_PAY_srcip_dstip -=================================== - -1. create a rule:: - - testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions vf id 1 / end - testpmd> flow list 0 - - check the rule exists in the list. - -2. send matched packets:: - - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f0", count=1) +1. validate a rule:: - check port 1 receive the packet. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)], iface="enp27s0f0", count=1) + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - -Test case: MAC_IPV6_PAY_dstip_tc -================================ - -1. create a rule:: +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: @@ -566,10 +700,13 @@ Test case: MAC_IPV6_PAY_dstip_tc sendp([Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -577,30 +714,46 @@ Test case: MAC_IPV6_PAY_dstip_tc check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV6_UDP_PAY =========================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0",count=1) check port 1 receive the packet. send mismatched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0",count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0",count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0",count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)], iface="enp27s0f0",count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=19)/("X"*480)], iface="enp27s0f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -608,30 +761,46 @@ Test case: MAC_IPV6_UDP_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV6_TCP ======================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: + sendp([Ether(dst="68:05:ca:8d:ed:a3")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=30,dport=23)/("X"*480)], iface="enp27s0f0", count=1) sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=19)/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -639,18 +808,31 @@ Test case: MAC_IPV6_TCP check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_IPV4_FRAG (not support in 20.05) ========================================================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) @@ -665,7 +847,7 @@ Test case: MAC_IPV4_VXLAN_IPV4_FRAG (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -673,18 +855,31 @@ Test case: MAC_IPV4_VXLAN_IPV4_FRAG (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_IPV4_PAY (not support in 20.05) ========================================================= -1. create a rule:: +1. validate a rule:: - testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end - testpmd> flow list 0 + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end - check the rule exists in the list. + get the message:: -2. send matched packets:: + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f0",count=1) @@ -699,7 +894,7 @@ Test case: MAC_IPV4_VXLAN_IPV4_PAY (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -707,18 +902,31 @@ Test case: MAC_IPV4_VXLAN_IPV4_PAY (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_IPV4_UDP_PAY (not support in 20.05) ============================================================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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)],iface="enp27s0f0",count=1) @@ -730,7 +938,7 @@ Test case: MAC_IPV4_VXLAN_IPV4_UDP_PAY (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -738,18 +946,31 @@ Test case: MAC_IPV4_VXLAN_IPV4_UDP_PAY (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_IPV4_TCP (not support in 20.05) ========================================================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 50 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 50 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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)],iface="enp27s0f0",count=1) @@ -761,7 +982,7 @@ Test case: MAC_IPV4_VXLAN_IPV4_TCP (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -769,18 +990,31 @@ Test case: MAC_IPV4_VXLAN_IPV4_TCP (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_MAC_IPV4_FRAG (not support in 20.05) ============================================================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([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" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) @@ -796,7 +1030,7 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_FRAG (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -804,18 +1038,31 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_FRAG (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_MAC_IPV4_PAY (not support in 20.05) ============================================================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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()/Raw("x" * 80)],iface="enp27s0f0",count=1) sendp([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")/Raw("x" * 80)],iface="enp27s0f0",count=1) @@ -831,7 +1078,7 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_PAY (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -839,18 +1086,31 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_PAY (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY (not support in 20.05) ================================================================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / udp src is 50 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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)],iface="enp27s0f0",count=1) @@ -862,7 +1122,7 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -870,18 +1130,31 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_VXLAN_MAC_IPV4_TCP (not support in 20.05) ============================================================= -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / udp / vxlan vni is 2 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([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)],iface="enp27s0f0",count=1) @@ -893,7 +1166,7 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_TCP (not support in 20.05) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -901,55 +1174,34 @@ Test case: MAC_IPV4_VXLAN_MAC_IPV4_TCP (not support in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. - -Test case: MAC_IPV4_NVGRE_IPV4_FRAG +Test case: MAC_IPV4_NVGRE_IPV4_PAY =================================== -1. create a rule:: - - testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end - testpmd> flow list 0 - - check the rule exists in the list. - -2. send matched packets:: - - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) +1. validate a rule:: - check port 1 receive the packets. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end - sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - - -Test case: MAC_IPV4_NVGRE_IPV4_PAY -================================== -1. create a rule:: +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) check port 1 receive the packets. send mismatched packets:: @@ -958,10 +1210,14 @@ Test case: MAC_IPV4_NVGRE_IPV4_PAY sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -972,26 +1228,44 @@ Test case: MAC_IPV4_NVGRE_IPV4_PAY Test case: MAC_IPV4_NVGRE_IPV4_UDP_PAY ====================================== -1. create a rule:: +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 is 50 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a 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 is 50 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) check port 1 receive the packets. send mismatched packets:: + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.5", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.7")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=20,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=19)/Raw("x"*80)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1002,26 +1276,44 @@ Test case: MAC_IPV4_NVGRE_IPV4_UDP_PAY Test case: MAC_IPV4_NVGRE_IPV4_TCP ================================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 2 / eth / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) check port 1 receive the packets. send mismatched packets:: + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=20,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=39)/Raw("x"*80)],iface="enp27s0f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1029,56 +1321,34 @@ Test case: MAC_IPV4_NVGRE_IPV4_TCP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_IPV4_NVGRE_MAC_IPV4_PAY +====================================== -Test case: MAC_IPV4_NVGRE_MAC_IPV4_FRAG -======================================= - -1. create a rule:: - - testpmd> 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 / end actions vf id 1 / end - testpmd> flow list 0 - - check the rule exists in the list. - -2. send matched packets:: - - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) +1. validate a rule:: - check port 1 receive the packets. - send mismatched packets:: + testpmd> flow validate 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 / end actions vf id 1 / end - sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - - -Test case: MAC_IPV4_NVGRE_MAC_IPV4_PAY -====================================== -1. create a rule:: +2. create a rule:: - testpmd> 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 / end actions vf id 1 / end + testpmd> 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 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) check port 1 receive the packets. send mismatched packets:: @@ -1088,10 +1358,15 @@ Test case: MAC_IPV4_NVGRE_MAC_IPV4_PAY sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3")/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5")/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.1.2", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.4", dst="192.168.1.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.5" ,frag=5)/Raw("x"*80)],iface="enp27s0f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1099,30 +1374,48 @@ Test case: MAC_IPV4_NVGRE_MAC_IPV4_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test case: MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY ========================================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. - testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 dst is 192.168.0.1 / nvgre tni is 0x8 / eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.1.2 dst is 192.168.1.3 / udp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) check port 1 receive the packets. send mismatched packets:: + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=2,dport=23)/Raw("x"*80)], iface="enp27s0f0", count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=20)/Raw("x"*80)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1133,26 +1426,45 @@ Test case: MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY Test case: MAC_IPV4_NVGRE_MAC_IPV4_TCP ====================================== -1. create a rule:: +1. validate a rule:: + + testpmd> flow validate 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 / tcp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> 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 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) check port 1 receive the packets. send mismatched packets:: + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.5", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.7")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=1,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=20)/Raw("x"*80)],iface="enp27s0f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1160,18 +1472,31 @@ Test case: MAC_IPV4_NVGRE_MAC_IPV4_TCP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_VLAN_PPPOE_IPV4_PAY_session_id_proto_id +====================================================== -Test case: MAC_VLAN_PPPOE_IPV4_PAY -================================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1) @@ -1185,7 +1510,7 @@ Test case: MAC_VLAN_PPPOE_IPV4_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1193,18 +1518,31 @@ Test case: MAC_VLAN_PPPOE_IPV4_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_VLAN_PPPOE_IPV6_PAY_session_id_proto_id +====================================================== -Test case: MAC_VLAN_PPPOE_IPV6_PAY -================================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end - testpmd> flow list 0 + get the message:: - check the rule exists in the list. + Flow rule validated -2. send matched packets:: + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1) @@ -1218,7 +1556,7 @@ Test case: MAC_VLAN_PPPOE_IPV6_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1226,18 +1564,31 @@ Test case: MAC_VLAN_PPPOE_IPV6_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_PPPOE_IPV4_PAY_session_id_proto_id +================================================= -Test case: MAC_PPPOE_IPV4_PAY -============================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1) @@ -1250,7 +1601,7 @@ Test case: MAC_PPPOE_IPV4_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1258,18 +1609,31 @@ Test case: MAC_PPPOE_IPV4_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_PPPOE_IPV6_PAY_session_id_proto_id +================================================= -Test case: MAC_PPPOE_IPV6_PAY -============================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1) @@ -1282,7 +1646,7 @@ Test case: MAC_PPPOE_IPV6_PAY check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1290,139 +1654,92 @@ Test case: MAC_PPPOE_IPV6_PAY check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: PPPoE data +===================== -Test case: MAC_IPV4_PFCP_NODE -============================= - -1. DUT create switch filter rules for MAC_IPV4_PFCP_NODE to VF1:: - - flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end - - check the rule exists in the list. - - testpmd> flow list 0 - ID Group Prio Attr Rule - 0 0 0 i-- ETH IPV4 UDP PFCP => VF - -2. send matched packets:: +Subcase 1: MAC_PPPOE_IPV4_PAY_IP_address +---------------------------------------- - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") +1. validate a rule:: - check port 1 receive the packet. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - - -Test case: MAC_IPV4_PFCP_SESSION -================================ -1. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION to VF2:: +2. create a rule:: - flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 2 / end + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end + testpmd> flow list 0 check the rule exists in the list. - testpmd> flow list 0 - ID Group Prio Attr Rule - 0 0 0 i-- ETH IPV4 UDP PFCP => VF - -2. send matched packets:: +3. send matched packets:: - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1) - check port 2 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)],iface="ens786f0",count=1) - check the packets are not to port 2. + check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 2. - - -Test case: MAC_IPV6_PFCP_NODE -============================= - -1. DUT create switch filter rules for MAC_IPV6_PFCP_NODE to VF3:: - - flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 3 / end - - check the rule exists in the list. - - testpmd> flow list 0 - ID Group Prio Attr Rule - 0 0 0 i-- ETH IPV6 UDP PFCP => VF + send matched packets, check the packets are not to port 1. -2. send matched packets:: +Subcase 2: MAC_PPPOE_IPV4_UDP_PAY +--------------------------------- - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") +1. validate a rule:: - check port 3 receive the packet. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + get the message:: - check the packets are not to port 3. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 3. - -Test case: MAC_IPV6_PFCP_SESSION -================================ +2. create a rule:: -1. DUT create switch filter rules for MAC_IPV6_PFCP_SESSION to VF1:: - - flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end + testpmd> flow list 0 check the rule exists in the list. - testpmd> flow list 0 - ID Group Prio Attr Rule - 0 0 0 i-- ETH IPV6 UDP PFCP => VF - -2. send matched packets:: +3. send matched packets:: - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") - sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1430,30 +1747,45 @@ Test case: MAC_IPV6_PFCP_SESSION check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 3: MAC_PPPOE_IPV4_UDP_PAY_non_src_dst_port +-------------------------------------------------- -Test case: QinQ (not supported in 20.05) -======================================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: - testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / vlan tci is 2 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=1)/Dot1Q(type=0x0800,vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=3)/Dot1Q(type=0x0800, vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)],iface="enp27s0f0",count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(type=0x8100,vlan=1)/Dot1Q(type=0x0800, vlan=5)/IP(src="192.168.0.1",dst="192.168.0.2")/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1461,28 +1793,45 @@ Test case: QinQ (not supported in 20.05) check the rule not exists in the list. send matched packets, check the packets are not to port 1. -Test case: IP multicast -======================= +Subcase 4: MAC_PPPOE_IPV4_TCP_PAY +--------------------------------- -1. create a rule:: +1. validate a rule:: - testpmd> flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions vf id 1 / end + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether()/IP(dst="239.0.0.0")/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether()/IP(dst="128.0.0.0")/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1490,29 +1839,45 @@ Test case: IP multicast check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 5: MAC_PPPOE_IPV4_TCP_PAY_non_src_dst_port +-------------------------------------------------- -Test case: L2 multicast -======================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="01:00:5e:7f:00:00")/IP()/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="01:00:5e:ff:00:00")/IP()/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1520,29 +1885,44 @@ Test case: L2 multicast check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 6: MAC_PPPOE_IPV6_PAY_IP_address +---------------------------------------- -Test case: ethertype filter_PPPOD -================================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: - testpmd> flow create 0 ingress pattern eth type is 0x8863 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1550,29 +1930,44 @@ Test case: ethertype filter_PPPOD check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 7: MAC_PPPOE_IPV6_UDP_PAY +--------------------------------- -Test case: ethertype filter_PPPOE -================================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1580,30 +1975,45 @@ Test case: ethertype filter_PPPOE check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 8: MAC_PPPOE_IPV6_UDP_PAY_non_src_dst_port +-------------------------------------------------- -Test case: ethertype filter_IPV6 -================================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth type is 0x86dd / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IP()/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1611,32 +2021,44 @@ Test case: ethertype filter_IPV6 check the rule not exists in the list. send matched packets, check the packets are not to port 1. -Test case: UDP port filter_DHCP discovery -========================================= +Subcase 9: MAC_PPPOE_IPV6_TCP_PAY +--------------------------------- -Description: The udp port used by DHCP server is 67, and 68 by DHCP client. -Therefore, for DHCP discovery packets, the udp srcport is 68 and the dstport is 67. +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 68 dst is 67 / end actions vf id 1 / end - testpmd> flow list 0 + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end + testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=69)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1644,32 +2066,45 @@ Therefore, for DHCP discovery packets, the udp srcport is 68 and the dstport is check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 10: MAC_PPPOE_IPV6_TCP_PAY_non_src_dst_port +--------------------------------------------------- -Test case: UDP port filter_DHCP offer -===================================== +1. validate a rule:: -Description: For DHCP offer packets, the udp srcport is 67 and the dstport is 68. + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end -1. create a rule:: + get the message:: - testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 67 dst is 68 / end actions vf id 1 / end + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=63)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1677,31 +2112,44 @@ Description: For DHCP offer packets, the udp srcport is 67 and the dstport is 68 check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 11: MAC_VLAN_PPPOE_IPV4_PAY_IP_address +---------------------------------------------- -Test case: UDP port filter_VXLAN -================================ +1. validate a rule:: -Description: The UDP dst port number used by VXLAN is 4789. + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end -1. create a rule:: + get the message:: - testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 4789 / end actions vf id 1 / end + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1709,30 +2157,46 @@ Description: The UDP dst port number used by VXLAN is 4789. check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 12: MAC_VLAN_PPPOE_IPV4_UDP_PAY +--------------------------------------- -Test case: MAC_VLAN filter -========================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1740,29 +2204,46 @@ Test case: MAC_VLAN filter check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 13: MAC_VLAN_PPPOE_IPV4_UDP_PAY_non_src_dst_port +-------------------------------------------------------- -Test case: VLAN filter -====================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end - testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1770,31 +2251,46 @@ Test case: VLAN filter check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 14: MAC_VLAN_PPPOE_IPV4_TCP_PAY +--------------------------------------- -Test case: MAC_IPV4_L2TPv3 -========================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1802,31 +2298,46 @@ Test case: MAC_IPV4_L2TPv3 check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 15: MAC_VLAN_PPPOE_IPV4_TCP_PAY_non_src_dst_port +-------------------------------------------------------- -Test case: MAC_IPV6_L2TPv3 -========================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1834,31 +2345,43 @@ Test case: MAC_IPV6_L2TPv3 check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 16: MAC_VLAN_PPPOE_IPV6_PAY_IP_address +---------------------------------------------- -Test case: MAC_IPV4_ESP -======================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1866,31 +2389,45 @@ Test case: MAC_IPV4_ESP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 17: MAC_VLAN_PPPOE_IPV6_UDP_PAY +--------------------------------------- -Test case: MAC_IPV6_ESP -======================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1898,31 +2435,45 @@ Test case: MAC_IPV6_ESP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 18: MAC_VLAN_PPPOE_IPV6_UDP_PAY_non_src_dst_port +-------------------------------------------------------- -Test case: MAC_IPV4_AH -====================== +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1930,63 +2481,45 @@ Test case: MAC_IPV4_AH check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 19: MAC_VLAN_PPPOE_IPV6_TCP_PAY +--------------------------------------- -Test case: MAC_IPV6_AH -====================== - -1. create a rule:: - - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / ah spi is 1 / end actions vf id 1 / end - testpmd> flow list 0 - - check the rule exists in the list. - -2. send matched packets:: - - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) +1. validate a rule:: - check port 1 receive the packet. - send mismatched packets:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + get the message:: - check the packets are not to port 1. + Flow rule validated -3. verify rules can be destroyed:: + check the flow list:: - testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. - send matched packets, check the packets are not to port 1. - - -Test case: MAC_IPV4_NAT-T-ESP -============================= -1. create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - check port 1 receive the packet. + check port 1 receive the packets. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -1994,31 +2527,908 @@ Test case: MAC_IPV4_NAT-T-ESP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Subcase 20: MAC_VLAN_PPPOE_IPV6_TCP_PAY_non_src_dst_port +-------------------------------------------------------- -Test case: MAC_IPV6_NAT-T-ESP -============================= +1. validate a rule:: -1. create a rule:: + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / udp / esp spi is 1 / end actions vf id 1 / end + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: PPPoE control +======================== + +Subcase 1: MAC_PPPOE_LCP_PAY +---------------------------- + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Subcase 2: MAC_PPPOE_IPCP_PAY +----------------------------- + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Subcase 3: MAC_VLAN_PPPOE_LCP_PAY +--------------------------------- + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Subcase 4: MAC_VLAN_PPPOE_IPCP_PAY +---------------------------------- + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_IPV4_PFCP_NODE +============================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. DUT create switch filter rules for MAC_IPV4_PFCP_NODE to VF1:: + + flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end + + check the rule exists in the list. + + testpmd> flow list 0 + ID Group Prio Attr Rule + 0 0 0 i-- ETH IPV4 UDP PFCP => VF + +3. send matched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + + check port 1 receive the packet. + send mismatched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_IPV4_PFCP_SESSION +================================ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 2 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. DUT create switch filter rules for MAC_IPV4_PFCP_SESSION to VF2:: + + flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 1 / end actions vf id 2 / end + + check the rule exists in the list. + + testpmd> flow list 0 + ID Group Prio Attr Rule + 0 0 0 i-- ETH IPV4 UDP PFCP => VF + +3. send matched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + + check port 2 receive the packet. + send mismatched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + + check the packets are not to port 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 2. + +Test case: MAC_IPV6_PFCP_NODE +============================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 3 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. DUT create switch filter rules for MAC_IPV6_PFCP_NODE to VF3:: + + flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 0 / end actions vf id 3 / end + + check the rule exists in the list. + + testpmd> flow list 0 + ID Group Prio Attr Rule + 0 0 0 i-- ETH IPV6 UDP PFCP => VF + +3. send matched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + + check port 3 receive the packet. + send mismatched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + + check the packets are not to port 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 3. + +Test case: MAC_IPV6_PFCP_SESSION +================================ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. DUT create switch filter rules for MAC_IPV6_PFCP_SESSION to VF1:: + + flow create 0 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end + + check the rule exists in the list. + + testpmd> flow list 0 + ID Group Prio Attr Rule + 0 0 0 i-- ETH IPV6 UDP PFCP => VF + +3. send matched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + + check port 1 receive the packet. + send mismatched packets:: + + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IP()/UDP(dport=8805)/PFCP(Sfield=1),iface="enp134s0f1") + sendp(Ether(dst="00:11:22:33:44:11")/IPv6()/UDP(dport=8805)/PFCP(Sfield=0),iface="enp134s0f1") + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: IP multicast +======================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 dst spec 224.0.0.0 dst mask 240.0.0.0 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether()/IP(dst="239.0.0.0")/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether()/IP(dst="128.0.0.0")/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: L2 multicast +======================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst spec 01:00:5e:00:00:00 dst mask ff:ff:ff:80:00:00 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="01:00:5e:7f:00:00")/IP()/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="01:00:5e:ff:00:00")/IP()/TCP()/Raw("x"*80)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: ethertype filter_PPPOD +================================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8863 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth type is 0x8863 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: ethertype filter_PPPOE +================================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8864 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw("x"*80)],iface="enp27s0f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw("x"*80)],iface="enp27s0f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: ethertype filter_IPV6 +================================= + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x86dd / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth type is 0x86dd / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x86dd)/IPv6(dst="CDCD:910A:2222:5498:8475:1111:3900:2020", tc=3)/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/TCP(dport=23)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: UDP port filter_DHCP discovery +========================================= + +Description: The udp port used by DHCP server is 67, and 68 by DHCP client. +Therefore, for DHCP discovery packets, the udp srcport is 68 and the dstport is 67. + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp src is 68 dst is 67 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 68 dst is 67 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=67)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=68,dport=69)/BOOTP(chaddr="3c:fd:fe:b2:43:90")/DHCP(options=[("message-type","discover"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: UDP port filter_DHCP offer +===================================== + +Description: For DHCP offer packets, the udp srcport is 67 and the dstport is 68. + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp src is 67 dst is 68 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 67 dst is 68 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=63,dport=68)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:55")/IP()/UDP(sport=67,dport=63)/BOOTP(chaddr="3c:fd:fe:b2:43:90",yiaddr="192.168.1.0")/DHCP(options=[("message-type","offer"),"end"])/Raw("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: UDP port filter_VXLAN +================================ + +Description: The UDP dst port number used by VXLAN is 4789. + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp dst is 4789 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / udp dst is 4789 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/TCP()/Raw("x"*80)],iface="enp27s0f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_VLAN filter +========================== + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: VLAN filter +====================== + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + + check port 1 receive the packets. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2)/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/TCP()/Raw("X"*480)],iface="enp27s0f0",count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_IPV4_L2TPv3 +========================== + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -2. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(src='192.168.1.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:12')/IP(dst='192.168.0.2', proto=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -3. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -2026,174 +3436,314 @@ Test case: MAC_IPV6_NAT-T-ESP check the rule not exists in the list. send matched packets, check the packets are not to port 1. +Test case: MAC_IPV6_L2TPv3 +========================== -Test case: negative cases -========================= +1. validate a rule:: -Subcase 1: can not create rule on vf 1 --------------------------------------- + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end -1. create rule on vf 1:: + get the message:: - testpmd> 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 vf id 1 / end - iavf_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Failed to create parser engine.: Invalid argument + Flow rule validated - check the rule can not be created successfully. + check the flow list:: -2. list the rule:: + testpmd> flow list 0 - testpmd> flow list 1 + check the rule not exists in the list. - there is no rule listed. +2. create a rule:: -Subcase 2: unsupported pattern in comms ---------------------------------------- + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + testpmd> flow list 0 -1. create an SCTP rule which is not supported in comms:: + check the rule exists in the list. - testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end +3. send matched packets:: -2. check the rule can not be created successfully, - and testpmd provide a friendly output, showing:: + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) - ice_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Invalid input pattern: Invalid argument + check port 1 receive the packet. + send mismatched packets:: -3. check the rule list:: + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x02')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(dst='1111:2222:3333:4444:5555:6666:7777:9999', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst='00:11:22:33:44:13')/IPv6(src='1111:2222:3333:4444:5555:6666:7777:8888', nh=115)/L2TP('\x00\x00\x00\x01')/('X'*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_IPV4_ESP +======================= -Subcase 3: unsupported pattern in os default, but supported in comms --------------------------------------------------------------------- +1. validate a rule:: -1. load os default package and launch testpmd as step 3-8 in Prerequisites. + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end -2. create a pppoe rule which is not supported in os default :: + get the message:: - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end + Flow rule validated -3. check the rule can not be created successfully, and - testpmd should provide a friendly output, showing:: + check the flow list:: - ice_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Invalid input pattern: Invalid argument + testpmd> flow list 0 -4. check the rule list:: + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. + send matched packets, check the packets are not to port 1. -5. repeat step 2-5 with also not supported pattern MAC_IPV4_PFCP_NODE/MAC_IPV4_L2TPv3/MAC_IPV4_ESP, get the same result. +Test case: MAC_IPV6_ESP +======================= -Subcase 4: unsupported input set --------------------------------- +1. validate a rule:: -1. create an nvgre rule with unsupported input set field [inner tos]:: + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / esp spi is 1 / end actions vf id 1 / end - testpmd> 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 vf id 1 / end + get the message:: -2. check the rule can not be created successfully, and - testpmd should provide a friendly output, showing:: + Flow rule validated - ice_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 10 (item specification): cause: 0x7ffcccb26a68, Invalid input set: Invalid argument + check the flow list:: -3. check the rule list:: + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=50)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 testpmd> flow list 0 check the rule not exists in the list. + send matched packets, check the packets are not to port 1. -Subcase 5: invalid vf id ------------------------- +Test case: MAC_IPV4_AH +====================== -1. create a rule with invalid vf id 5:: +1. validate a rule:: - testpmd> 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 vf id 5 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end -2. check the rule can not be created successfully, and - testpmd provide a friendly output, showing:: + get the message:: - ice_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): switch filter create flow fail: Invalid argument + Flow rule validated -3. check the rule list:: + check the flow list:: testpmd> flow list 0 check the rule not exists in the list. -Subcase 6: delete a non-existing rule -------------------------------------- +2. create a rule:: -1. check the rule list:: + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2", proto=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2", proto=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 testpmd> flow list 0 - check no rule exists in the list. + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. -2. destroy the rule 0:: +Test case: MAC_IPV6_AH +====================== + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / ah spi is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888", nh=51)/AH(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 - check no error reports. + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. -3. flush rules:: +Test case: MAC_IPV4_NAT-T-ESP +============================= - testpmd> flow flush 0 +1. validate a rule:: - check no error reports. + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end -Subcase 7: add long switch rule -------------------------------- + get the message:: -Description: A recipe has 5 words, one of which is reserved for switch ID, -so a recipe can use 4 words, and a maximum of 5 recipes can be chained, -one of which is reserved. Therefore, a rule can use up to 4*4*2 = 32 bytes. -This case is used to test that a rule whose input set is longer than 32 -bytes can not be created successfully, and will not affect the creation of -other rules. + Flow rule validated -1. create a rule with input set length longer than 32 bytes:: + check the flow list:: - testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / end + testpmd> flow list 0 -2. check the rule can not be created successfully, and - testpmd provide a friendly output, showing:: + check the rule not exists in the list. - ice_flow_create(): Failed to create flow - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): switch filter create flow fail: Invalid argument +2. create a rule:: -3. check the rule list:: + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.0.2")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(src="192.168.1.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IP(dst="192.168.0.2")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + + check the packets are not to port 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: MAC_IPV6_NAT-T-ESP +============================= + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / udp / esp spi is 1 / end actions vf id 1 / end + + get the message:: + + Flow rule validated + + check the flow list:: testpmd> flow list 0 check the rule not exists in the list. -4. create a MAC_IPV6_UDP_PAY rule:: +2. create a rule:: - testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions vf id 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is 1111:2222:3333:4444:5555:6666:7777:8888 / udp / esp spi is 1 / end actions vf id 1 / end testpmd> flow list 0 check the rule exists in the list. -5. send matched packets:: +3. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) check port 1 receive the packet. send mismatched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)], iface="enp27s0f0",count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=19)/("X"*480)], iface="enp27s0f0",count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=2)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(dst="1111:2222:3333:4444:5555:6666:7777:9999")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="00:11:22:33:44:13")/IPv6(src="1111:2222:3333:4444:5555:6666:7777:8888")/UDP(dport=4500)/ESP(spi=1)/("X"*480)], iface="enp27s0f0", count=1) check the packets are not to port 1. -6. verify rules can be destroyed:: +4. verify rules can be destroyed:: testpmd> flow destroy 0 rule 0 testpmd> flow list 0 @@ -2201,12 +3751,11 @@ other rules. check the rule not exists in the list. send matched packets, check the packets are not to port 1. - Test Case: multirules test ========================== -Subcase 1: add existing rules but with different vfs (not support in 20.05) ---------------------------------------------------------------------------- +Subcase 1: add existing rules but with different vfs +---------------------------------------------------- 1. Launch dpdk on VF0, VF1 and VF2, and VF0 request DCF mode:: @@ -2226,7 +3775,7 @@ Subcase 1: add existing rules but with different vfs (not support in 20.05) 3. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) check both port 1 and 2 receive the packet. @@ -2288,12 +3837,12 @@ Subcase 3: add two rules with one rule's input set included in the other 3. send a packet p0 that matches both rules:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="ens786f0", count=1) check both port 1 and 2 receive the packet. send a packet that only matches the rule 0 but not rule 1:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3")/("X"*480)], iface="ens786f0", count=1) check only port 1 receives the packet. @@ -2389,7 +3938,6 @@ Subcase 5: different input set, different vf id check the rule not exists in the list. send matched packets, check the packets are not to port 1 or port 2. - Test case: test forwarding with single vf ========================================= @@ -2409,7 +3957,7 @@ received and forwarded when there is one vf for forwarding, and no packets are d 3. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="ens786f0", count=1) 4. check port 1 receives the packet and forward it, and no packets are dropped:: @@ -2427,7 +3975,6 @@ received and forwarded when there is one vf for forwarding, and no packets are d check the RX-packets and TX-packets of port 1 are both 1, and the TX-dropped in "Accumulated forward statistics for all ports" is 0. - Test case: test forwarding with multi vfs ========================================= @@ -2452,7 +3999,7 @@ are dropped. 3. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2")/("X"*480)], iface="ens786f0", count=1) 4. check port 1 receives the packet, and forward it to port 2, and no packets are dropped:: @@ -2476,7 +4023,6 @@ are dropped. check the RX-packets of port 1 is 1, the TX-packets of port 2 is 1, and the TX-dropped in "Accumulated forward statistics for all ports" is 0. - Test case: Max vfs ================== @@ -2524,11 +4070,11 @@ This case is designed based on 4*25G NIC. 8. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1")/TCP()/Raw("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2")/TCP()/Raw("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.3")/TCP()/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1")/TCP()/Raw("X"*480)], iface="ens786f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2")/TCP()/Raw("X"*480)], iface="ens786f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.3")/TCP()/Raw("X"*480)], iface="ens786f0", count=1) ...... - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.63")/TCP()/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.63")/TCP()/Raw("X"*480)], iface="ens786f0", count=1) check the VF 1-63 each receives a packet in kernel, for example:: @@ -2545,7 +4091,7 @@ This case is designed based on 4*25G NIC. send mismatched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.64")/TCP()/Raw("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.64")/TCP()/Raw("X"*480)], iface="ens786f0", count=1) check the packets are not to any VF. @@ -2557,7 +4103,6 @@ This case is designed based on 4*25G NIC. check the rules not exist in the list. send matched packets, check the packets are not to any VF. - Test case: max field vectors ============================ @@ -2593,14 +4138,14 @@ will not hang and provide a friendly output. 4. send 3 matched packets:: - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) - sendp([Ether()/IP(dst="192.168.0.3")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether()/IP(dst="192.168.0.2")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="ens786f0",count=1) + sendp([Ether()/IP(dst="192.168.0.3")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="ens786f0",count=1) check port 1 receives the packets send mismatched packets:: - sendp([Ether()/IP(dst="192.168.0.5")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f0",count=1) + sendp([Ether()/IP(dst="192.168.0.5")/NVGRE(TNI=0x8)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="ens786f0",count=1) check the packets are not to port 1. @@ -2612,7 +4157,6 @@ will not hang and provide a friendly output. check the rules not exist in the list. send matched packets, check the packets are not to port 1. - Test case: max rule number ========================== @@ -2650,15 +4194,15 @@ create a total of 32563 switch filter rules on a DCF. 4. send 32563 matched packets for rule 0-32562:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.0")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.0")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) ...... - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.127.177")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.127.177")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) check port 1 receive the 32563 packets. send 1 mismatched packet:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.167.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.167.0.1")/TCP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) check the packet are not to port 1. @@ -2670,52 +4214,373 @@ create a total of 32563 switch filter rules on a DCF. check the rules not exist in the list. send 32563 matched packets, check the packets are not to port 1. +Test case: negative cases +========================= + +Subcase 1: can not create rule on vf 1 +-------------------------------------- -Test case: flow validation -========================== +1. create rule on vf 1:: -1. validate MAC_IPV4_UDP_PAY:: + testpmd> 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 vf id 1 / end - testpmd> flow validate 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 vf id 1 / end + Failed to create flow, report message:: - get the message:: + Failed to create parser engine.: Invalid argument - Flow rule validated +2. check the flow list:: -2. repeat step 1 with MAC_IPV4_PFCP_NODE:: + testpmd> flow list 1 - testpmd> flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end + there is no rule listed. - get the same result +Subcase 2: unsupported pattern in os default package +---------------------------------------------------- -3. validate unsupported pattern MAC_IPV4_SCTP_PAY:: +1. load os default package and launch testpmd as step 3-8 in Prerequisites. - testpmd> flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / sctp src is 25 dst is 23 / end actions vf id 1 / end +2. create unsupported pattern in os default package:: - get the message:: + testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end + + Failed to create flow, report message:: Invalid input pattern: Invalid argument -4. check the flow list:: +3. check the rule list:: testpmd> flow list 0 - there is no rule listed. + check the rule not exists in the list. -5. validate a rule on invalid vf:: +Subcase 3: unsupported input set +-------------------------------- - testpmd> flow validate 1 ingress pattern eth / ipv6 / udp / pfcp s_field is 1 / end actions vf id 1 / end +1. create an nvgre rule with unsupported input set field [inner tos]:: - get the message:: + testpmd> 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 vf id 1 / end + + Failed to create flow, report message:: + + Invalid input set: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 4: duplicated rules +--------------------------- + +1. create a rule:: + + testpmd> 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 + testpmd> flow list 0 + + check the rule exists in the list. + +2. create the same rule again, Failed to create flow, report message:: + + switch filter create flow fail: Invalid argument + +3. check the flow list:: + + testpmd> flow list 0 + + check only the first rule exists in the list. + +Subcase 5: void action +---------------------- + +1. create a rule with void action:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end + + Failed to create flow, report message:: + + NULL action.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 6: unsupported action +----------------------------- + +1. create a rule with void action:: + + testpmd> 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 mark id 1 / end + + Failed to create flow, report message:: + + Invalid action type: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 7: void input set value +------------------------------- + +1. create a rule with void input set value:: + + testpmd> flow create 0 ingress pattern eth / ipv4 / end actions vf id 1 / end + + Failed to create flow, report message:: + + Invalid input set: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 8: invalid vf id +------------------------ + +1. create a rule with invalid vf id 5:: + + testpmd> 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 vf id 5 / end + + Failed to create flow, report message:: + + Invalid vf id: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 9: delete a non-existing rule +------------------------------------- + +1. check the rule list:: + + testpmd> flow list 0 + + check no rule exists in the list. + +2. destroy the rule 0:: + + testpmd> flow destroy 0 rule 0 + + check no error reports. + +3. flush rules:: + + testpmd> flow flush 0 + + check no error reports. + +Subcase 10: add long switch rule +-------------------------------- - port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Failed to create parser engine.: Invalid argument +Description: A recipe has 5 words, one of which is reserved for switch ID, +so a recipe can use 4 words, and a maximum of 5 recipes can be chained, +one of which is reserved. Therefore, a rule can use up to 4*4*2 = 32 bytes. +This case is used to test that a rule whose input set is longer than 32 +bytes can not be created successfully, and will not affect the creation of +other rules. + +1. create a rule with input set length longer than 32 bytes:: + + testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / end + + Failed to create flow, report message:: + + Invalid input set: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +3. create a MAC_IPV6_UDP_PAY rule:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions vf id 1 / end + testpmd> flow list 0 + + check the rule exists in the list. + +4. send matched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/("X"*480)], iface="ens786f0",count=1) + + check port 1 receive the packet. + send mismatched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=30,dport=23)/("X"*480)], iface="ens786f0",count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=19)/("X"*480)], iface="ens786f0",count=1) + + check the packets are not to port 1. + +5. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to port 1. + +Test case: negative validation +============================== +Note: some of the error messages may be different. -6. check the flow list:: +Subcase 1: can not create rule on vf 1 +-------------------------------------- + +1. validate rule on vf 1:: + + testpmd> flow validate 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 vf id 1 / end + + get the error message:: + + Failed to create parser engine.: Invalid argument + +2. list the rule:: testpmd> flow list 1 there is no rule listed. +Subcase 2: unsupported patterns in os default +--------------------------------------------- + +1. load os default package and launch testpmd as step 3-8 in Prerequisites. + +2. validate unsupported patterns in os default:: + + testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions vf id 1 / end + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / l2tpv3oip session_id is 1 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / esp spi is 1 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions vf id 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / udp / esp spi is 1 / end actions vf id 1 / end + + get the error message:: + + Invalid input pattern: Invalid argument + +4. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 3: unsupported input set +-------------------------------- + +1. validate an nvgre rule with unsupported input set field [inner tos]:: + + testpmd> flow validate 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 vf id 1 / end + + get the error message:: + + Invalid input set: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 4: void action +---------------------- + +1. validate a rule with void action:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end + + Failed to create flow, report message:: + + NULL action.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 5: unsupported action +----------------------------- + +1. validate a rule with void action:: + + testpmd> flow validate 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 mark id 1 / end + + Failed to create flow, report message:: + + Invalid action type: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 6: void input set value +------------------------------- + +1. validate a rule with void input set value:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 / end actions vf id 1 / end + + get the error message:: + + Invalid input set: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 7: invalid vf id +------------------------ + +1. validate a rule with invalid vf id 5:: + + testpmd> flow validate 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 vf id 5 / end + + get the error message:: + + Invalid vf id: Invalid argument + +3. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 8: long switch rule +--------------------------- + +1. validate a rule with input set length longer than 32 bytes:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions vf id 1 / end + + get the error message:: + + Invalid input set: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. Test case: Stress test ====================== @@ -2732,7 +4597,7 @@ Subcase 1: DCF stop/DCF start 2. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f0", count=1) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="ens786f0", count=1) check port 1 receive the packet.