From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7CDCCA04B4; Tue, 25 Aug 2020 10:13:27 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 2AE361C10C; Tue, 25 Aug 2020 10:13:27 +0200 (CEST) Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by dpdk.org (Postfix) with ESMTP id DB0051C10A for ; Tue, 25 Aug 2020 10:13:23 +0200 (CEST) IronPort-SDR: W6c7H3lbKaIGlTqBlHYAuDVFYEK4DOZvRItv/5vU3sah33iY97ASeAEp9KK2Nt2Dcez78Y+Xzb 69WNbuPXXrZA== X-IronPort-AV: E=McAfee;i="6000,8403,9723"; a="143842726" X-IronPort-AV: E=Sophos;i="5.76,351,1592895600"; d="scan'208";a="143842726" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 25 Aug 2020 01:13:22 -0700 IronPort-SDR: E7S7lPD0tvgP8rOzk7wf8aTebDjQ53guDj6XzVXlC4FMNqAXkFIglV53oxHWhT9njLproU6uuC qNew12uxjVtw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.76,351,1592895600"; d="scan'208";a="443549180" Received: from dpdk-lunannan.sh.intel.com ([10.67.111.68]) by orsmga004.jf.intel.com with ESMTP; 25 Aug 2020 01:13:17 -0700 From: Nannan Lu To: dts@dpdk.org Cc: Nannan Lu Date: Tue, 25 Aug 2020 17:03:54 +0000 Message-Id: <1598375034-753454-1-git-send-email-nannan.lu@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dts] [PATCH V1] test_plans/cvl_switch_filter_test_plan.rst: add PPPOE cases and modify the format 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_switch_filter_test_plan.rst: add PPPOE cases and modify the format. Signed-off-by: Nannan Lu --- test_plans/cvl_switch_filter_test_plan.rst | 11313 +++++++++++++++++++++------ 1 file changed, 8707 insertions(+), 2606 deletions(-) diff --git a/test_plans/cvl_switch_filter_test_plan.rst b/test_plans/cvl_switch_filter_test_plan.rst index 7ab7578..7604fe5 100644 --- a/test_plans/cvl_switch_filter_test_plan.rst +++ b/test_plans/cvl_switch_filter_test_plan.rst @@ -1,4 +1,4 @@ -.. Copyright (c) <2019>, Intel Corporation +.. Copyright (c) <2019-2020>, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without @@ -41,7 +41,7 @@ This document provides the plan for testing switch filter feature of CVL, includ * Enable switch filter for IPv4/IPv6 + TCP/UDP in non-pipeline/pipeline mode (comm #1 package) * Enable switch filter for tunnel : VXLAN / NVGRE in non-pipeline/pipeline mode (comm #1 package) -* Enable switch filter for PPPOE in non-pipeline mode (comm #1 package) +* Enable switch filter for PPPOE in non-pipeline/pipeline mode (comm #1 package) In pipeline mode, a flow can be set at one specific stage by setting parameter ``priority``. Currently, we support two stages: priority = 0 or !0. Flows with priority 0 located at the first pipeline stage @@ -54,7 +54,9 @@ In non-pipeline mode, ``priority`` is ignored, a flow rule can be created as a f switch rule depends on its pattern/action. If a rule is supported by switch or fdir at the same time, it will be created in the fdir table first. Therefore, to test switch filter in non-pipeline mode, we need to fill the fdir table first, and then the rules are created in the switch filter table. The capacity of fdir -table is 16K, so we create 16K fdir rules to make the fdir table full. +table is 16K, of which 14K is shared by all pfs and vfs, and the remaining 2K is gurantee for pfs. If 4*25G +NIC, the gurantee for each pf is 512. If 2*100G NIC, the gurantee of each pf is 1024. so 1 pf can create at +most 14848 rules on 4 ports card and 15360 rules on 2 ports card. Pattern and input set --------------------- @@ -64,7 +66,7 @@ Pattern and input set | Packet Types | Pattern +-------------------------------------------+-------------------------------------------+ | | | non-pipeline mode | pipeline mode | +=====================+===============================+===========================================+===========================================+ - | | MAC_IPV4_FRAG | N/A | [Source IP], [Dest IP], | + | | MAC_IPV4_FRAG | N/A | [Source IP], [Dest IP], | | | | | [DSCP] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ | | MAC_IPV4_PAY | [Source IP], [Dest IP],[TOS],[TTL] | [Source IP], [Dest IP], | @@ -75,27 +77,25 @@ Pattern and input set | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ | IPv4/IPv6 + TCP/UDP | MAC_IPV4_TCP | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | - | | | [Source Port],[Dest Port] | [DSCP], | + | | | [Source Port], [Dest Port] | [DSCP], | | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV6_FRAG | [Source IP], [Dest IP] | [Source IP], [Dest IP], | + | | MAC_IPV6 | [Source IP], [Dest IP] | [Source IP], [Dest IP], | | | | | [TC] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ | | MAC_IPV6_UDP_PAY | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | - | | | [Source Port],[Dest Port] | [Source IP], [Dest IP], | - | | | | [TC], | + | | | [Source Port],[Dest Port] | [TC], | | | | | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ | | MAC_IPV6_TCP | [Source IP], [Dest IP],[TOS],[TTL], | [Source IP], [Dest IP], | - | | | [Source Port],[Dest Port] | [Source IP], [Dest IP], | - | | | | [TC], | + | | | [Source Port],[Dest Port] | [TC], | | | | | [Source Port], [Dest Port] | +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ | | MAC_IPV4_TUN_IPV4_FRAG | [Out Dest IP], [VNI/GRE_KEY], | [inner Source IP], [inner Dest IP], | | | | [Inner Source IP], [Inner Dest IP], | [DSCP] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_IPV4_TUN_IPV4_PAY | [Out Dest IP], [VNI/GRE_KEY], | N/A | - | | | [Inner Source IP], [Inner Dest IP], | | + | | MAC_IPV4_TUN_IPV4_PAY | [Out Dest IP], [VNI/GRE_KEY], | [inner Source IP], [inner Dest IP], | + | | | [Inner Source IP], [Inner Dest IP], | [IP protocol], [DSCP] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ | | MAC_IPV4_TUN_IPV4_UDP_PAY | [Out Dest IP], [VNI/GRE_KEY], | [inner Source IP], [inner Dest IP], | | | | [Inner Source IP], [Inner Dest IP], | [DSCP], | @@ -123,26 +123,124 @@ Pattern and input set | | | [Inner Source IP], [Inner Dest IP], | | | | | [Inner Source Port], [Inner Dest Port] | | +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_PPPOD_PAY | all this kind of packets | N/A | + | ethertype filter | ethertype filter_PPPOED | [Ether type] | [Ether type] | + | | ethertype filter_PPPOES | | | + +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_PAY | [Dest MAC], [VLAN], [seid], | [Dest MAC], [VLAN], [seid], | + | | _session_id_proto_id | [pppoe_proto_id] | [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_PAY | [Dest MAC], [VLAN], [seid], | [Dest MAC], [VLAN], [seid], | + | | _session_id_proto_id | [pppoe_proto_id] | [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_PAY_session_id | [Dest MAC], [seid], [pppoe_proto_id] | [Dest MAC], [seid], [pppoe_proto_id] | + | | _proto_id | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_PAY_session_id | [Dest MAC], [seid], [pppoe_proto_id] | [Dest MAC], [seid], [pppoe_proto_id] | + | | _proto_id | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_PAY_IP_address | [Source IP], [Dest IP] | [Source IP], [Dest IP] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_UDP_PAY | [Source IP], [Dest IP], | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_UDP_PAY | [Source IP], [Dest IP] | [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_TCP_PAY | [Source IP], [Dest IP], | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV4_TCP_PAY | [Source IP], [Dest IP] | [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_PAY_IP_address | [Source IP], [Dest IP] | [Source IP], [Dest IP] | + | PPPOES +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_UDP_PAY | [Source IP], [Dest IP], | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_UDP_PAY | [Source IP], [Dest IP] | [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_TCP_PAY | [Source IP], [Dest IP], | [Source IP], [Dest IP], | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPV6_TCP_PAY | [Source IP], [Dest IP], | [Source IP], [Dest IP], | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _IP_address | | | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | PPPOD / PPPOE | MAC_PPPOE_PAY | all this kind of packets | N/A | + | | MAC_VLAN_PPPOE_IPV4_UDP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | | +-------------------------------+-------------------------------------------+-------------------------------------------+ - | | MAC_PPPOE_IPV4_PAY | [Dest MAC], [VLAN] | N/A | + | | MAC_VLAN_PPPOE_IPV4_UDP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_TCP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV4_TCP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _IP_address | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_UDP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_UDP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_TCP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | | [Source Port], [Dest Port] | [Source Port], [Dest Port] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPV6_TCP_PAY | [VLAN], [Source IP], [Dest IP] | [VLAN], [Source IP], [Dest IP] | + | | _non_src_dst_port | | | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_LCP_PAY | [Dest MAC], [seid], [pppoe_proto_id] | [Dest MAC], [seid], [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_PPPOE_IPCP_PAY | [Dest MAC], [seid], [pppoe_proto_id] | [Dest MAC], [seid], [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_LCP_PAY | [Dest MAC], [VLAN], [seid], | [Dest MAC], [VLAN], [seid], | + | | | [pppoe_proto_id] | [pppoe_proto_id] | + | +-------------------------------+-------------------------------------------+-------------------------------------------+ + | | MAC_VLAN_PPPOE_IPCP_PAY | [Dest MAC], [VLAN], [seid], | [Dest MAC], [VLAN], [seid], | + | | | [pppoe_proto_id] | [pppoe_proto_id] | +---------------------+-------------------------------+-------------------------------------------+-------------------------------------------+ -Action type ------------ +.. 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. + + 2. For MAC_IPV4_TUN_IPV4_FRAG/MAC_IPV4_TUN_IPV4_PAY cases and + MAC_IPV4_TUN_MAC_IPV4_FRAG/MAC_IPV4_TUN_MAC_IPV4_PAY cases, the input set + of each pair is the same, so use MAC_IPV4_TUN_IPV4 and MAC_IPV4_TUN_MAC_IPV4 + pattern to replace them in the test plan. + +Supported function type +----------------------- + +* validate +* create +* destroy +* flush +* list -* To queue -* To queue group -* Drop +Supported action type +--------------------- + +* to queue +* to queue group +* drop Prerequisites ============= 1. Hardware: - - - columbiaville_25g/columbiaville_100g + columbiaville_25g/columbiaville_100g + design the cases with 2 ports card. 2. software: @@ -150,4727 +248,10730 @@ Prerequisites - scapy: http://www.secdev.org/projects/scapy/ 3. Copy comm #1 package to /lib/firmware/intel/ice/ddp/ice.pkg, - then reboot server, and compile DPDK. + then load driver:: + + rmmod ice + insmod ice.ko -4. Bind the pf to dpdk driver:: +4. Compile DPDK:: - ./usertools/dpdk-devbind.py -b igb_uio 18:00.2 + make -j install T=x86_64-native-linuxapp-gcc -5. Launch the app ``testpmd`` with the following arguments:: +5. Bind pf to dpdk driver:: - ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:18:00.2 --log-level="ice,8" -- -i --txq=8 --rxq=8 + ./usertools/dpdk-devbind.py -b vfio-pci 18:00.2 + +6. Launch dpdk with the following arguments in non-pipeline mode:: + + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:18:00.0 --log-level="ice,8" -- -i --txq=16 --rxq=16 --cmdline-file=testpmd_fdir_rules testpmd> port config 0 rss-hash-key ipv4 1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd1234abcd testpmd> set fwd rxonly testpmd> set verbose 1 + testpmd> start If set VXLAN flow rule:: testpmd> rx_vxlan_port add 4789 0 - testpmd> start - If create rules in pipeline mode, please add the following parameters in testpmd command line:: + Note: file ``testpmd_fdir_rules`` contains 15,360 fdir rules to make fdir table full. - -w 0000:18:00.2,pipeline-mode-support=1 + Launch dpdk in pipeline mode with the following testpmd command line:: + ./x86_64-native-linuxapp-gcc/app/testpmd -c 0xf -n 4 -w 0000:18:00.0,pipeline-mode-support=1 --log-level="ice,8" -- -i --txq=16 --rxq=16 Test case: VXLAN non-pipeline mode ================================== -1. create fdir rules to make the fdir table full, - which can be created as follows:: +MAC_IPV4_VXLAN_IPV4 +------------------- - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end +matched packets:: -2. create switch filter rules and verify + 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="enp27s0f2",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="enp27s0f2",count=1) -MAC_IPV4_VXLAN_IPV4_FRAG ------------------------- +mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",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.5")/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",frag=5)/Raw("x"*80)],iface="enp27s0f2",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.5",frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) to queue action ^^^^^^^^^^^^^^^ -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 queue index 3 / 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 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions queue index 3 / end +2. create a rule:: -send matched packets:: + 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 queue index 3 / end - 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="enp27s0f2",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="enp27s0f2",count=1) + get the message:: -verify these two packets to queue 3 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",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.5",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 3. + +4. verify rules can be destroyed:: -verify these packets not to queue 3 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 3. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -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 rss queues 2 3 end / end + + get the message:: - 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 rss queues 2 3 end / end + Flow rule validated -send matched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + 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 rss queues 2 3 end / end + testpmd> flow list 0 + + check the rule exists in the list. -verify these two packets to queue 2 or 3 +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",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.5",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 2 and 3 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. drop action ^^^^^^^^^^^ -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 drop / end - 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 drop / end + get the message:: -send matched packets:: + Flow rule validated - 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="enp27s0f2",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="enp27s0f2",count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",frag=5)/Raw('x'*80)],iface="enp27s0f2",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.5",frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify these packets not dropped + 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 drop / end -MAC_IPV4_VXLAN_IPV4_PAY ------------------------ + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_IPV4_UDP_PAY +--------------------------- + +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="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.5", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",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.7")/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",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")/UDP(sport=20,dport=23)/Raw("x"*80)],iface="enp27s0f2",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")/UDP(sport=50,dport=19)/Raw("x"*80)],iface="enp27s0f2",count=1) to queue action ^^^^^^^^^^^^^^^ -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 queue index 4 / end + + get the message:: + + Flow rule validated + + check the flow list:: - 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 queue index 3 / end + 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 queue index 4 / end -send matched packets:: + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 - 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="enp27s0f2",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="enp27s0f2",count=1) + check the rule exists in the list. -verify these two packets to queue 3 +3. send matched packets, check the packets are to queue 4. + send mismatched packets, check the packets are not to queue 4. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 3 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -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 rss queues 4 5 end / 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 / udp / vxlan vni is 2 / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions rss queues 4 5 end / end +2. create a rule:: -send matched packets:: + 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 rss queues 4 5 end / end - 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="enp27s0f2",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="enp27s0f2",count=1) + get the message:: -verify these two packets to queue 4 or 5 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: -verify these packets not to queue 4 and 5 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. drop action ^^^^^^^^^^^ -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 drop / end + 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 drop / end -send matched packets:: + get the message:: - 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="enp27s0f2",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="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(dst="192.168.0.2")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.4", dst="192.168.0.3")/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5")/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_VXLAN_IPV4_UDP_PAY ---------------------------- + 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_IPV4_TCP +----------------------- + +mathced 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="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.5", dst="192.168.0.3")/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",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.7")/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",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")/TCP(sport=29,dport=23)/Raw("x"*80)],iface="enp27s0f2",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")/TCP(sport=50,dport=100)/Raw("x"*80)],iface="enp27s0f2",count=1) to queue action ^^^^^^^^^^^^^^^ -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 queue index 5 / 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 queue index 5 / end - 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 queue index 4 / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - 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="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 4 + testpmd> flow list 0 + + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 5. + send mismatched packets, check the packets are not to queue 5. - 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=20,dport=23) /Raw('x'*80)],iface="enp27s0f2",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")/UDP(sport=50,dport=19) /Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 4 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 5. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -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 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + 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 rss queues 4 5 end / end -send matched packets:: + get the message:: - 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="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 4 or 5 + check the flow list:: -send mismatched packets:: + 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: - 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=20,dport=23) /Raw('x'*80)],iface="enp27s0f2",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")/UDP(sport=50,dport=19) /Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 4 and 5 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. drop action ^^^^^^^^^^^ -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 rss queues 4 5 end / end - 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 drop / end + get the message:: -send matched packets:: + Flow rule validated - 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="enp27s0f2",count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. - 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=20,dport=23) /Raw('x'*80)],iface="enp27s0f2",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")/UDP(sport=50,dport=19) /Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify these packets not dropped + 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 drop / end -MAC_IPV4_VXLAN_IPV4_TCP + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_MAC_IPV4 ----------------------- +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")/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",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.4", dst="192.168.0.3")/Raw("x"*80)],iface="enp27s0f2",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.5")/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f2",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.4", dst="192.168.0.3" ,frag=5)/Raw("x"*80)],iface="enp27s0f2",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.5" ,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + to queue action ^^^^^^^^^^^^^^^ -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 queue index 2 / end - 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 queue index 5 / end + get the message:: -send mathced packets:: + Flow rule validated - 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="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 5 + 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. - 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=29,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/TCP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 5 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -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 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + 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 rss queues 2 3 end / end -send mathced packets:: + get the message:: - 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="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 4 or 5 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - 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=29,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/TCP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 4 and 5 +2. create a rule:: -drop action -^^^^^^^^^^^ + 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 rss queues 2 3 end / end + + get the message:: -create a rule:: + Succeeded to create (2) flow - 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 drop / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - 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="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet dropped +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -send mismatched packets:: +4. verify rules can be destroyed:: - 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=29,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/TCP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not dropped + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -MAC_IPV4_VXLAN_IPV4_SCTP (not support in 19.11) ------------------------------------------------ +drop action +^^^^^^^^^^^ -to queue action ---------------- +1. validate a rule:: -create 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 drop / end - 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 / sctp src is 25 dst is 23 / end actions queue index 4 / end + get the message:: -send matched packets:: + Flow rule validated - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 4 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify these packets not to queue 4 + 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 drop / end -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + get the message:: -create a rule:: + Succeeded to create (2) flow - 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 / sctp src is 25 dst is 23 / end actions rss queues 4 5 end / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet to queue 4 or 5 +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 4 and 5 + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -drop action -^^^^^^^^^^^ +MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY +------------------------------- + +matched packets:: -create a rule:: + 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="enp27s0f2",count=1) - 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 / sctp src is 25 dst is 23 / end actions drop / end +mismatched packets:: -send matched packets:: + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a1")/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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.5", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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.7")/UDP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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")/UDP(sport=20,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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")/UDP(sport=50,dport=29)/Raw("x" * 80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue action +--------------- -verify this packet dropped +1. validate a rule:: -send mismatched packets:: + 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 queue index 1 / end - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not dropped + Flow rule validated -MAC_IPV4_VXLAN_IPV4_ICMP (not support in 19.11) ------------------------------------------------ + check the flow list:: -to queue action -^^^^^^^^^^^^^^^ + 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 queue index 1 / end -create a rule:: + get the message:: - 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 / icmp / end actions queue index 2 / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 + + check the rule exists in the list. -verify this packet to queue 2 +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -send mismatched packets:: +4. verify rules can be destroyed:: - 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="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 2 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -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 rss queues 4 5 end / 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 rss queues 4 5 end / end - 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 / icmp / end actions rss queues 4 5 end / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 4 or 5 + testpmd> flow list 0 + + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. - 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="enp27s0f2",count=1) +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 4 and 5 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. drop action ^^^^^^^^^^^ -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 / icmp / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - 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="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_VXLAN_MAC_IPV4_FRAG ----------------------------- + 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_MAC_IPV4_TCP +--------------------------- + +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="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a2")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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.5", dst="192.168.0.3")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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.7")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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")/TCP(sport=20,dport=23)/Raw("x" * 80)],iface="enp27s0f2",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")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="enp27s0f2",count=1) to queue action ^^^^^^^^^^^^^^^ -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 dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions queue index 2 / end + 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 queue index 1 / end -send matched packets:: + get the message:: - 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="enp27s0f2",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="enp27s0f2",count=1) + Flow rule validated -verify these two packets to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.4", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 2 +2. create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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 queue index 1 / end -create a rule:: + get the message:: - 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 rss queues 2 3 end / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow list 0 -verify these two packets to queue 2 or 3 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 rss queues 1 2 end / 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 rss queues 1 2 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 1 or 2. + send mismatched packets, check the packets are not to queue 1 and 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1 and 2. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +Test case: VXLAN pipeline mode +============================== + +MAC_IPV4_VXLAN_IPV4_FRAG +------------------------ + +matched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_VXLAN_IPV4_PAY +----------------------- + +MAC_IPV4_VXLAN_IPV4_PAY proto tcp +................................. + +matched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4, proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5", dst="192.168.0.3", tos=4, proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.7", tos=4, proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=5, proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4, proto=0x01)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5", dst="192.168.0.3", tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.7", tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=5)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rules exist in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not to queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions rss queues 2 3 end / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rules exist in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions drop / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x06 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exist in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_IPV4_PAY proto udp +................................. + +matched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4, proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5", dst="192.168.0.3", tos=4, proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.7", tos=4, proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=5, proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4, proto=0x01)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5", dst="192.168.0.3", tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.7", tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=5)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3", tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rules exist in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not to queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions rss queues 2 3 end / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rules exist in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions drop / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 proto is 0x11 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exist in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 0 + testpmd> flow list 0 + + check the rules not exist in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_VXLAN_IPV4_UDP_PAY +--------------------------- + +matched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=20,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=99)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_VXLAN_IPV4_TCP +----------------------- + +matched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=19,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=30)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 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 queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / 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 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +Test case: NVGRE non-pipeline mode +================================== + +MAC_IPV4_NVGRE_IPV4 +------------------- + +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")/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",count=1) + +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")/Raw("x"*80)],iface="enp27s0f2",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")/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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)/TCP()/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 / end actions queue index 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. 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 queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 / end actions rss queues 2 3 end / 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 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +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 / end actions drop / 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 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_NVGRE_IPV4_UDP_PAY +--------------------------- + +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="enp27s0f2", count=1) + +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="enp27s0f2", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x1)/Ether()/IP(src="192.168.0.2", dst="192.168.0.3")/UDP(sport=50,dport=23)/Raw("x"*80)], iface="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 4 / 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 queue index 4 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4. + send mismatched packets, check the packets are not to queue 4. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 rss queues 4 5 end / 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_NVGRE_IPV4_TCP +----------------------- + +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="enp27s0f2",count=1) + +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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 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 queue index 1 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 rss queues 1 2 end / 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 rss queues 1 2 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 1 or 2 + send mismatched packets, check the packets are not to queue 1 and 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1 and 2. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_NVGRE_MAC_IPV4 +----------------------- + +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")/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",count=1) + +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")/Raw("x"*80)],iface="enp27s0f2",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")/Raw("x"*80)],iface="enp27s0f2",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")/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 / end actions queue index 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. 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 queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 / end actions rss queues 2 3 end / 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 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +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 / end actions drop / 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 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY +------------------------------- + +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="enp27s0f2", count=1) + +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="enp27s0f2", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x1)/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="enp27s0f2", count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=0x8)/Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.1.2", dst="192.168.1.3")/UDP(sport=25,dport=23)/Raw("x"*80)], iface="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", 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="enp27s0f2", count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 rss queues 2 3 end / 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 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 rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +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 drop / 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 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_NVGRE_MAC_IPV4_TCP +--------------------------- + +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="enp27s0f2",count=1) + +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="enp27s0f2",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="enp27s0f2",count=1) + sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether(dst="68:05:ca:8d:ed:a3")/IP(src="192.168.1.2", dst="192.168.1.3")/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 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. 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 queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 rss queues 2 3 end / 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 rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +Test case: NVGRE pipeline mode +============================== + +MAC_IPV4_NVGRE_IPV4_FRAG +------------------------ + +matched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.7",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 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 queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_NVGRE_IPV4_PAY +----------------------- + +MAC_IPV4_NVGRE_IPV4_PAY proto tcp +................................. + +matched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",proto=0x06,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",proto=0x06,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x01,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 2 3 end / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_NVGRE_IPV4_PAY proto udp +................................. + +matched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",proto=0x11,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",proto=0x11,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x01,tos=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_NVGRE_IPV4_UDP_PAY +--------------------------- + +matched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=100)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_NVGRE_IPV4_TCP +----------------------- + +matched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/TCP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/TCP(sport=50,dport=23)/Raw("x" * 80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=3,dport=23)/Raw("x" * 80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=100)/Raw("x" * 80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / 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 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +Test case: IPv4/IPv6 + TCP/UDP pipeline mode +============================================ + +MAC_IPV4_FRAG +------------- + +matched packets:: + + sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=7,frag=5)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 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 queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / 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 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / 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 dst is 192.168.0.3 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_PAY +------------ + +MAC_IPV4_PAY proto tcp +...................... + +matched packets:: + + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4,proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(src="192.168.0.4",dst="192.168.0.3",tos=4,proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.5",tos=4,proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=7,proto=0x06)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4,proto=0x01)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.4",dst="192.168.0.3",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.5",tos=4)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=7)/TCP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 5 / 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 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 5 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 5. + send mismatched packets, check the packets are not to queue 5. + +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 queue 5. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validateg 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 4 5 end / 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 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / 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 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_PAY proto udp +...................... + +matched packets:: + + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4,proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4,proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4,proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5,proto=0x11)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4,proto=0x01)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/UDP()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP()/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / 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 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / 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 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_UDP_PAY +---------------- + +matched packets:: + + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 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 queue 2. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / 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 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV4_TCP +------------ + +matched packets:: + + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IP(src="192.168.0.5",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.7",tos=4)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=5)/TCP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=5,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=7)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 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 queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / 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 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / 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 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV6 +-------- + +MAC_IPV6 src ipv6 + dst ipv6 +................................. + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1514",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1514",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 5 / 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 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 5 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 5. + send mismatched packets, check the packets are not to queue 5. + +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 queue 5. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / 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 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / 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 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV6 dst ipv6 + tc +........................... + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2027",tc=3)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 3 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 3. + send mismatched packets, check the packets are not to queue 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 queue 3. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions drop / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV6_UDP_PAY +---------------- + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=5)/UDP(sport=50,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=3,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=4)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions queue index 5 / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions queue index 5 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 5. + send mismatched packets, check the packets are not to queue 5. + +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 queue 5. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions rss queues 2 3 end / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 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 queue 2 and 3. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions drop / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +MAC_IPV6_TCP +------------ + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=7)/TCP(sport=25,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=1,dport=23)/Raw("x"*80)],iface="enp27s0f2",count=1) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw("x"*80)],iface="enp27s0f2",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions queue index 4 / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions queue index 4 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4. + send mismatched packets, check the packets are not to queue 4. + +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 queue 4. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions drop / 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 CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +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 dropped. + +Test case: IPv4/IPv6 + TCP/UDP non-pipeline mode +================================================ + +MAC_IPV4_PAY +------------ + +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)/("X"*480)], iface="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a1")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.3",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.7",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=5,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=9)/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 4 / 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 queue index 4 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4. + send mismatched packets, check the packets are not to queue 4. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_UDP_PAY +---------------- + +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="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a1")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.3",dst="192.168.0.2",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.5",tos=4,ttl=3)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + 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="enp27s0f2", count=100) + 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="enp27s0f2", count=100) + 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=19,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + 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=99)/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +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 queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +drop action +^^^^^^^^^^^ + +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 drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV4_TCP_PAY +---------------- + +matched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether(dst="68:05:ca:8d:ed:a1")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.3",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.39",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=5)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=19,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=99)/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +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.32 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 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. 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.32 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +drop action +^^^^^^^^^^^ + +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.32 tos is 4 / tcp src is 25 dst is 23 / end actions drop / 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.32 tos is 4 / tcp src is 25 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV6_PAY +------------ + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + 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 queue index 8 / 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 / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 8 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 8. + send mismatched packets, check the packets are not to queue 8. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 8. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + 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 drop / 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 / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV6_UDP +------------ + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=19,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=99)/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 25 dst is 23 / end actions queue index 6 / 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 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 25 dst is 23 / end actions queue index 6 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 6. + send mismatched packets, check the packets are not to queue 6. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 6. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 25 dst is 23 / end actions drop / 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 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / udp src is 25 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +MAC_IPV6_TCP +------------ + +matched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + +mismatched packets:: + + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=19,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=25,dport=99)/("X"*480)], iface="enp27s0f2", count=100) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 25 dst is 23 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 25 dst is 23 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 25 dst is 23 / end actions drop / 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 / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / tcp src is 25 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +Test case: Ethertype filter +=========================== + +Ethertype filter_PPPOED +----------------------- + +matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55", type=0x8863)/Raw("x" *80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/Raw("x" *80)],iface="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55", type=0x8864)/Raw("x" *80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/Raw("x" *80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8863 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 ingress pattern eth type is 0x8863 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + The rules in pipeline mode are similar to rules in non-pipeline mode, + just need to add priority 0 to show it is created as a switch filter rule. + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth type is 0x8863 / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth type is 0x8863 / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8863 / end actions drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth type is 0x8863 / end actions drop / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth type is 0x8863 / end actions drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Ethertype filter_PPPOES +----------------------- + +create PPPOE rule to enable RSS for PPPOE packets:: + + testpmd> flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end + +matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55", type=0x8864)/PPPoE(sessionid=3)/Raw("x" *80)],iface="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:55", type=0x8863)/PPPoED()/Raw("x" *80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8864 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8864 / end actions rss queues 4 5 end / 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +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 queue 4 and 5. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth type is 0x8864 / end actions rss queues 4 5 end / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth type is 0x8864 / end actions rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth type is 0x8864 / end actions drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth type is 0x8864 / end actions drop / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth type is 0x8864 / end actions drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Test case: MAC_VLAN_PPPOE_IPV4_PAY_session_id_proto_id +====================================================== + +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="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",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()/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=4)/PPP(proto=0x0021)/IP()/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()/Raw("x" * 80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 0x0021 / end actions queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 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 queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 0x0021 / end actions rss queues 4 5 end / 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end + + create a rule:: + + testpmd> flow create 0 priority 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 rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +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 0x0021 / end actions drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 drop / end + + create a rule:: + + testpmd> flow create 0 priority 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 drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Test case: MAC_VLAN_PPPOE_IPV6_PAY_session_id_proto_id +====================================================== + +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="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="ens786f0",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()/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=4)/PPP(proto=0x0057)/IPv6()/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()/Raw("x" * 80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 0x0057 / end actions queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 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 queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 0x0057 / end actions rss queues 4 5 end / 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 0x0057 / end actions rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end + + create a rule:: + + testpmd> flow create 0 priority 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 rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +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 0x0057 / end actions drop / 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 0x0057 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 drop / end + + create a rule:: + + testpmd> flow create 0 priority 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 drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Test case: MAC_PPPOE_IPV4_PAY_session_id_proto_id +================================================= + +matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 0x0021 / end actions queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 0x0021 / end actions rss queues 4 5 end / 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +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 0x0021 / end actions drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Test case: MAC_PPPOE_IPV6_PAY_session_id_proto_id +================================================= + +matched packets:: + + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="ens786f0",count=1) + +mismatched packets:: + + sendp([Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="ens786f0",count=1) + sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0057)/IPv6()/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()/Raw("x" * 80)],iface="ens786f0",count=1) + +to queue action +^^^^^^^^^^^^^^^ + +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 0x0057 / end actions queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packet are distributed to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +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 0x0057 / end actions rss queues 4 5 end / 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 rss queues 4 5 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packet to queue 4 or 5. + send mismatched packets, check the packet not to queue 4 and 5. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +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 0x0057 / end actions drop / 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 drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packet is dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Test case: PPPoE data +===================== + +Subcase 1: MAC_PPPOE_IPV4_PAY_IP_address +---------------------------------------- + +matched packets:: + + 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) + +mismatched packets:: + + 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) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 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. create a rule:: + + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / 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 / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / 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 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Subcase 2: MAC_PPPOE_IPV4_UDP_PAY +--------------------------------- + +matched packets:: + + 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) + +mismatched packets:: + + 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) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate a rule:: + + 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 queue index 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 / udp src is 25 dst is 23 / end actions queue index 1 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 queue index 1 / end + + create a rule:: + + testpmd> flow create 0 priority 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 queue index 1 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate a rule:: + + 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 rss queues 7 8 end / 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 / udp src is 25 dst is 23 / end actions rss queues 7 8 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end + + create a rule:: + + testpmd> flow create 0 priority 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 rss queues 7 8 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: + + 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 drop / 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 / udp src is 25 dst is 23 / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not dropped. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 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 drop / end + + create a rule:: + + testpmd> flow create 0 priority 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 drop / end + + repeat step 1-4 to check the pattern in pipeline mode. + +Subcase 3: MAC_PPPOE_IPV4_UDP_PAY_non_src_dst_port +-------------------------------------------------- + +matched packets:: + + 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) + +mismatched packets:: + + 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) + +to queue action +^^^^^^^^^^^^^^^ + +1. validate 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 queue index 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. 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 queue index 2 / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions queue index 2 / end + + repeat step 1-4 to check the pattern in pipeline mode. + +to queue group action +^^^^^^^^^^^^^^^^^^^^^ + +1. validate 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 rss queues 2 3 end / 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 / udp / end actions rss queues 2 3 end / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. + +5. check the pattern in pipeline mode + + validate a rule:: + + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 2 3 end / end + + create a rule:: + + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions rss queues 2 3 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate 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 drop / 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 / udp / end actions drop / end + + get the message:: + + Succeeded to create (2) flow + + check the flow list:: + + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.4", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify these packets not to queue 2 and 3 +5. check the pattern in pipeline mode -drop action -^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end - 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 drop / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions drop / end - 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="enp27s0f2",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="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet dropped +Subcase 4: MAC_PPPOE_IPV4_TCP_PAY +--------------------------------- -send mismatched packets:: +matched packets:: - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.4", dst="192.168.0.3" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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.5" ,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",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) -verify these packets not dropped +mismatched packets:: -MAC_IPV4_VXLAN_MAC_IPV4_PAY ---------------------------- + 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) to queue action ^^^^^^^^^^^^^^^ -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 queue index 3 / end +1. validate a rule:: -send matched packets:: + 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 queue index 1 / end - 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="enp27s0f2",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="enp27s0f2",count=1) + get the message:: -verify these two packets to queue 3 + Flow rule validated -send mismatched packets:: - - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3") /TCP()/Raw('x' * 80)],iface="enp27s0f2",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.4", dst="192.168.0.3") /TCP()/Raw('x' * 80)],iface="enp27s0f2",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.5") /TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - -verify these packets not to queue 3 - -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - 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 rss queues 4 5 end / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - 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="enp27s0f2",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="enp27s0f2",count=1) + 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 queue index 1 / end -verify these two packets to queue 4 or 5 + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",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.4", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",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.5")/TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + check the flow list:: -verify these packets not to queue 4 and 5 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule exists in the list. -create a rule:: +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. - 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 drop / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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="enp27s0f2",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="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -verify these two packets dropped +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether()/IP(dst="192.168.0.2")/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="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=3)/Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(dst="192.168.0.1")/UDP()/VXLAN(vni=2)/Ether(dst="68:05:ca:8d:ed:a9")/IP(src="192.168.0.2", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",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.4", dst="192.168.0.3")/TCP()/Raw('x' * 80)],iface="enp27s0f2",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.5")/TCP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 queue index 1 / end -verify these packets not dropped + create a rule:: -MAC_IPV4_VXLAN_MAC_IPV4_UDP_PAY --------------------------------- + testpmd> flow create 0 priority 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 queue index 1 / end -to queue action ---------------- + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - 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 queue index 1 / end +1. validate a rule:: -send matched packets:: + 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 rss queues 7 8 end / end - 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="enp27s0f2",count=1) + get the message:: -verify this packet to queue 1 + Flow rule validated -send mismatched packets:: + check the flow list:: - 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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/UDP(sport=50,dport=29)/Raw('x' * 80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not to queue 1 + check the rule not exists in the list. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +2. create a rule:: -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 rss queues 7 8 end / end - 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 rss queues 4 5 end / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - 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="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 4 or 5 + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - 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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/UDP(sport=50,dport=29)/Raw('x' * 80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. -verify these packets not to queue 4 and 5 +4. verify rules can be destroyed:: -drop action -^^^^^^^^^^^ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. - 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 drop / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - 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="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end -verify this packet dropped + create a rule:: -send mismatched packets:: + testpmd> flow create 0 priority 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 rss queues 7 8 end / end - 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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/UDP(sport=50,dport=29)/Raw('x' * 80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not dropped +drop action +^^^^^^^^^^^ -MAC_IPV4_VXLAN_MAC_IPV4_TCP ---------------------------- +1. validate a rule:: -to queue action -^^^^^^^^^^^^^^^ + 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 drop / end -create a rule:: + get the message:: - 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 queue index 1 / end + Flow rule validated -send matched packets:: + check the flow list:: - 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="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 1 + check the rule not exists in the list. -send mismatched packets:: +2. create a rule:: - 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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/TCP(sport=25,dport=19)/Raw('x' * 80)],iface="enp27s0f2",count=1) + 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 drop / end -verify these packets not to queue 1 + get the message:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + Succeeded to create (2) flow -create a rule:: + check the flow list:: - 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 rss queues 1 2 end / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - 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="enp27s0f2",count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify this packet to queue 1 or 2 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/TCP(sport=25,dport=19)/Raw('x' * 80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify these packets not to queue 1 and 2 +5. check the pattern in pipeline mode -drop action -^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 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 drop / end - 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 drop / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 drop / end - 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="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet dropped +Subcase 5: MAC_PPPOE_IPV4_TCP_PAY_non_src_dst_port +-------------------------------------------------- -send mismatched packets:: +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=20,dport=23)/Raw('x' * 80)],iface="enp27s0f2",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")/TCP(sport=25,dport=19)/Raw('x' * 80)],iface="enp27s0f2",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) -verify these packets not dropped +mismatched packets:: -MAC_IPV4_VXLAN_MAC_IPV4_SCTP (not support in 19.11) ---------------------------------------------------- + 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) to queue action ^^^^^^^^^^^^^^^ -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 dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / sctp src is 25 dst is 23 / end actions queue index 4 / end + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end -send matched packets:: + get the message:: - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 4 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - 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")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 4 +2. create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end -create a rule:: + get the message:: - 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 / sctp src is 25 dst is 23 / end actions rss queues 4 5 end / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 4 or 5 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. - 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")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not to queue 4 and 5 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. -drop action -^^^^^^^^^^^ +5. check the pattern in pipeline mode -create a rule:: + validate 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 / sctp src is 25 dst is 23 / end actions drop / end + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end -send matched packets:: + create a rule:: - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions queue index 2 / end -verify this packet dropped + repeat step 1-4 to check the pattern in pipeline mode. -send mismatched packets:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - 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")/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify these packets not dropped + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end -MAC_IPV4_VXLAN_MAC_IPV4_ICMP (not support in 19.11) ---------------------------------------------------- + get the message:: -to queue action -^^^^^^^^^^^^^^^ + Flow rule validated -create a rule:: + check the flow list:: - 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 / icmp / end actions queue index 3 / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet to queue 3 + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end -send a mismatched packet:: + get the message:: - 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="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet not to queue 3 + check the flow list:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. -create a rule:: +4. verify rules can be destroyed:: - 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 / icmp / end actions rss queues 4 5 end / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet to queue 4 or 5 + validate a rule:: -send a mismatched packet:: + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end - 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="enp27s0f2",count=1) + create a rule:: -verify this packet not to queue 4 and 5 + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions rss queues 7 8 end / end + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -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 / icmp / end actions drop / end +1. validate a rule:: -send matched packets:: + testpmd> flow validate 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Flow rule validated -send a mismatched packet:: + check the flow list:: - 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="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not dropped + check the rule not exists in the list. -3. verify rules can be listed and destroyed:: +2. create a rule:: - testpmd> flow list 0 + testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + get the message:: - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 + Succeeded to create (2) flow - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + check the flow list:: + testpmd> flow list 0 -Test case: VXLAN pipeline mode -============================== + check the rule exists in the list. -1. create switch filter rules and verify +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -MAC_IPV4_VXLAN_IPV4_FRAG ------------------------- +4. verify rules can be destroyed:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 2 / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end -verify these two packets to queue 2 + create a rule:: -send mismatched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not to queue 2 +Subcase 6: MAC_PPPOE_IPV6_PAY_IP_address +---------------------------------------- -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +matched packets:: -create a rule:: + 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) - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end +mismatched packets:: -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=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()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue action +^^^^^^^^^^^^^^^ -verify these two packets to queue 2 or 3 +1. validate a rule:: -send mismatched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not to queue 2 and 3 + Flow rule validated + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not dropped + check the rule exists in the list. -MAC_IPV4_VXLAN_IPV4_PAY (not support in 19.11) ----------------------------------------------- +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule for tcp:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 2 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 2 + testpmd> flow validate 0 priority 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 queue index 1 / end -send a mismatched packet:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify this packet not to queue 2 + repeat step 1-4 to check the pattern in pipeline mode. -create a rule for udp:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 2 / end +1. validate a rule:: -send matched packets:: + 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 rss queues 2 3 end / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 2 + Flow rule validated -send a mismatched packet:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not to queue 2 + check the rule not exists in the list. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +2. create a rule:: -create a rule for tcp:: + 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 rss queues 2 3 end / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 2 3 end / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 2 or 3 + testpmd> flow list 0 -send a mismatched packet:: + check the rule exists in the list. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -verify this packet not to queue and 3 +4. verify rules can be destroyed:: -create a rule for udp:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 4 5 end / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 4 or 5 + testpmd> flow validate 0 priority 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 rss queues 2 3 end / end -send a mismatched packet:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 2 3 end / end -verify this packet not to queue 4 and 5 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule for tcp:: - - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / end +1. validate a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Flow rule validated -send a mismatched packet:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not dropped + check the rule not exists in the list. -create a rule for udp:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet dropped + check the flow list:: -send a mismatched packet:: + testpmd> flow list 0 - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet not dropped +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -MAC_IPV4_VXLAN_IPV4_UDP_PAY ---------------------------- +4. verify rules can be destroyed:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 drop / end -verify this packet to queue 2 + create a rule:: -send mismatched packets:: + testpmd> flow create 0 priority 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not to queue 2 +Subcase 7: MAC_PPPOE_IPV6_UDP_PAY +--------------------------------- -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +matched packets:: -create a rule:: + 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) - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end +mismatched packets:: -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=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) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue action +^^^^^^^^^^^^^^^ -verify this packet to queue 4 or 5 +1. validate a rule:: -send mismatched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not to queue 4 and 5 + Flow rule validated + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not dropped + check the rule exists in the list. -MAC_IPV4_VXLAN_IPV4_TCP ------------------------ +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 3 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 3 + testpmd> flow validate 0 priority 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 queue index 1 / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify these packets not to queue 3 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: - - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end - -send matched packets:: +1. validate a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 rss queues 4 5 end / end -verify this packet to queue 4 or 5 + get the message:: -send mismatched packets:: + Flow rule validated - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) - -verify these packets not to queue 4 and 5 - -drop action -^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 rss queues 4 5 end / end -verify this packet dropped + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify these packets not dropped + testpmd> flow list 0 -MAC_IPV4_VXLAN_IPV4_SCTP (not support in 19.11) ------------------------------------------------ + check the rule exists in the list. -to queue action -^^^^^^^^^^^^^^^ +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. -create a rule:: +4. verify rules can be destroyed:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions queue index 4 / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet to queue 4 + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=9)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify these packets not to queue 4 + testpmd> flow create 0 priority 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 rss queues 4 5 end / end -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +drop action +^^^^^^^^^^^ - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions rss queues 4 5 end / end +1. validate a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 4 or 5 + Flow rule validated -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=9)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not to queue 4 and 5 + check the rule not exists in the list. -drop action -^^^^^^^^^^^ +2. create a rule:: -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 drop / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions drop / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=19,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=9)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify these packets not dropped +4. verify rules can be destroyed:: -MAC_IPV4_VXLAN_IPV4_ICMP (not support in 19.11) ------------------------------------------------ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -create a rule:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions queue index 2 / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet to queue 2 + testpmd> flow create 0 priority 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 drop / end -send a mismatched packet:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x05)/Raw('x'*80)],iface="enp27s0f2",count=1) +Subcase 8: MAC_PPPOE_IPV6_UDP_PAY_non_src_dst_port +-------------------------------------------------- -verify this packet not to queue 2 +matched packets:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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) -create a rule:: +mismatched packets:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions rss queues 4 5 end / end + 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) -send matched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 4 or 5 + 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 queue index 1 / end -send a mismatched packet:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x05)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not to queue 4 and 5 + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send a mismatched packet:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x05)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not dropped + check the rule exists in the list. -MAC_IPV4_VXLAN_IPV6_FRAG (not support in 19.11) ------------------------------------------------ +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 2 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 2 + testpmd> flow validate 0 priority 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 queue index 1 / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify these packets not to queue 2 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 2 or 3 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 2 and 3 +2. create a rule:: -drop action -^^^^^^^^^^^ + 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 rss queues 2 3 end / end -create a rule:: + get the message:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions drop / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet dropped + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not dropped + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -MAC_IPV4_VXLAN_IPV6_PAY (not support in 19.11) ----------------------------------------------- + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -to queue action -^^^^^^^^^^^^^^^ +5. check the pattern in pipeline mode -create a rule for tcp:: + validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions queue index 3 / end + testpmd> flow validate 0 priority 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 rss queues 2 3 end / end -send matched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 2 3 end / end -verify this packet to queue 3 + repeat step 1-4 to check the pattern in pipeline mode. -send a mismatched packet:: +drop action +^^^^^^^^^^^ - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet not to queue 3 + 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 drop / end -create a rule for udp:: + get the message:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions queue index 3 / end + Flow rule validated -send matched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 3 + check the rule not exists in the list. -send a mismatched packet:: +2. create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 drop / end -verify this packet not to queue 3 + get the message:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + Succeeded to create (2) flow -create a rule for tcp:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions rss queues 4 5 end / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify this packet to queue 4 or 5 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify this packet not to queue 4 and 5 +5. check the pattern in pipeline mode -create a rule for udp:: + validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions rss queues 4 5 end / end + testpmd> flow validate 0 priority 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 drop / end -send matched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 drop / end -verify this packet to queue 4 or 5 + repeat step 1-4 to check the pattern in pipeline mode. -send mismatched packets:: +Subcase 9: MAC_PPPOE_IPV6_TCP_PAY +--------------------------------- - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +matched packets:: -verify this packet not to queue 4 and 5 + 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) -drop action -^^^^^^^^^^^ +mismatched packets:: -create a rule for tcp:: + 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) - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions drop / end +to queue action +^^^^^^^^^^^^^^^ -send matched packets:: +1. validate a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 queue index 1 / end -verify this packet dropped + get the message:: -send mismatched packets:: + Flow rule validated - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not dropped + testpmd> flow list 0 -create a rule for udp:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not dropped + check the rule exists in the list. -MAC_IPV4_VXLAN_IPV6_UDP_PAY (not support in 19.11) --------------------------------------------------- +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions queue index 2 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 2 + testpmd> flow validate 0 priority 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 queue index 1 / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify these packets not to queue 2 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: - - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions rss queues 1 2 end / end - -send matched packets:: - - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 1 or 2 + 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 rss queues 4 5 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these packets not to queue 1 and 2 + check the flow list:: -drop action -^^^^^^^^^^^ - -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions drop / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 rss queues 4 5 end / end -verify this packet dropped + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=29)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify these packets not dropped + testpmd> flow list 0 -MAC_IPV4_VXLAN_IPV6_TCP (not support in 19.11) ----------------------------------------------- + check the rule exists in the list. -to queue action -^^^^^^^^^^^^^^^ +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. -create a rule:: +4. verify rules can be destroyed:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 50 dst is 23 / end actions queue index 2 / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet to queue 2 + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify these packets not to queue 2 + testpmd> flow create 0 priority 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 rss queues 4 5 end / end -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +drop action +^^^^^^^^^^^ - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 50 dst is 23 / end actions rss queues 2 3 end / end +1. validate a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 2 or 3 + Flow rule validated -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not to queue 2 and 3 + check the rule not exists in the list. -drop action -^^^^^^^^^^^ +2. create a rule:: -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 drop / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 50 dst is 23 / end actions drop / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=50,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify these packets not dropped +4. verify rules can be destroyed:: -MAC_IPV4_VXLAN_IPV6_SCTP (not support in 19.11) ------------------------------------------------ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -create a rule:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions queue index 3 / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 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 drop / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet to queue 3 + testpmd> flow create 0 priority 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 drop / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) +Subcase 10: MAC_PPPOE_IPV6_TCP_PAY_non_src_dst_port +--------------------------------------------------- -verify these packets not to queue 3 +matched packets:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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) -create a rule:: +mismatched packets:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions rss queues 2 3 end / end + 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) -send matched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 2 or 3 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these packets not to queue 2 and 3 + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not dropped + check the rule exists in the list. -MAC_IPV4_VXLAN_IPV6_ICMPV6 (not support in 19.11) -------------------------------------------------- +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions queue index 2 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 2 + testpmd> flow validate 0 priority 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 queue index 1 / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x02)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify this packet not to queue 2 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions rss queues 4 5 end / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 4 or 5 + check the flow list:: -send mismatched packets:: - - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x02)/Raw('x'*80)],iface="enp27s0f2",count=1) - -verify this packet not to queue 4 and 5 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / vxlan / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions drop / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/UDP()/VXLAN()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x02)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet not dropped +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -2. verify rules can be listed and destroyed:: +4. verify rules can be destroyed:: + testpmd> flow destroy 0 rule 15360 testpmd> flow list 0 - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 +5. check the pattern in pipeline mode - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + validate a rule:: + testpmd> flow validate 0 priority 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 rss queues 2 3 end / end -Test case: NVGRE non-pipeline mode -================================== + create a rule:: -1. create fdir rules to make the fdir table full, - which can be created as follows:: + testpmd> flow create 0 priority 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 rss queues 2 3 end / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end + repeat step 1-4 to check the pattern in pipeline mode. -2. create switch filter rules and verify +drop action +^^^^^^^^^^^ -MAC_IPV4_NVGRE_IPV4_FRAG ------------------------- +1. validate a rule:: -to queue action -^^^^^^^^^^^^^^^ + 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 drop / end -create a rule:: + get the message:: - 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 queue index 3 / end + Flow rule validated -send matched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow list 0 -verify these two packets to queue 3 + check the rule not exists in the list. -send mismatched packets:: +2. create a rule:: - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + 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 drop / end -verify these packets not to queue 3 + get the message:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + Succeeded to create (2) flow -create a rule:: + check the flow list:: - 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 rss queues 2 3 end / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - 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="enp27s0f2",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="enp27s0f2",count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify these two packets to queue 2 or 3 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify these packets not to queue 2 and 3 +5. check the pattern in pipeline mode -drop action -^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 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 drop / end - 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 drop / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 drop / end - 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="enp27s0f2",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="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these two packets dropped +Subcase 11: MAC_VLAN_PPPOE_IPV4_PAY_IP_address +---------------------------------------------- -send mismatched packets:: +matched packets:: - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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) -verify these packets not dropped +mismatched packets:: -MAC_IPV4_NVGRE_IPV4_PAY ------------------------ + 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) to queue action ^^^^^^^^^^^^^^^ -create a rule:: +1. validate 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 queue index 3 / end + 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 queue index 2 / end -send matched packets:: + get the message:: - 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="enp27s0f2",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="enp27s0f2",count=1) + Flow rule validated -verify these two packets to queue 3 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([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)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 3 +2. create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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 queue index 2 / end -create a rule:: + get the message:: - 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 rss queues 2 3 end / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow list 0 -verify these two packets to queue 2 or 3 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. - sendp([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)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not to queue 2 and 3 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. -create a rule:: +5. check the pattern in pipeline mode - 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 drop / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end - 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="enp27s0f2",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="enp27s0f2",count=1) + create a rule:: -verify these two packets dropped + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions queue index 2 / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([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)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -verify these packets not dropped +1. validate a rule:: -MAC_IPV4_NVGRE_IPV4_UDP_PAY ---------------------------- + 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 rss queues 2 3 end / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: + + Flow rule validated -create a rule:: + check the flow list:: - 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 queue index 4 / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - 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="enp27s0f2", count=1) +2. create a rule:: -verify this packet to queue 4 + 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 rss queues 2 3 end / end -send mismatched packets:: + get the message:: - 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="enp27s0f2", 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="enp27s0f2", count=1) + Succeeded to create (2) flow -verify these packets not to queue 4 + check the flow list:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule exists in the list. + +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. + +4. verify rules can be destroyed:: + + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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 rss queues 4 5 end / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -send matched packets:: +5. check the pattern in pipeline mode - 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="enp27s0f2", count=1) + validate a rule:: -verify this packet to queue 4 or 5 + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end -send mismatched packets:: + create a rule:: - 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="enp27s0f2", 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="enp27s0f2", count=1) + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions rss queues 2 3 end / end -verify these packets not to queue 4 and 5 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule:: +1. validate 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 drop / end + 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 drop / end -send matched packets:: + get the message:: - 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="enp27s0f2", count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - 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="enp27s0f2", 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="enp27s0f2", count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_NVGRE_IPV4_TCP ------------------------ + 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 drop / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: -create a rule:: + Succeeded to create (2) flow - 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 queue index 1 / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - 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="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet to queue 1 +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -send mismatched packets:: +4. verify rules can be destroyed:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these packets not to queue 1 + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +5. check the pattern in pipeline mode -create a rule:: + validate 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 rss queues 1 2 end / end + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end -send matched packets:: + create a rule:: - 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="enp27s0f2",count=1) + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions drop / end -verify this packet to queue 1 or 2 + repeat step 1-4 to check the pattern in pipeline mode. -send mismatched packets:: +Subcase 12: MAC_VLAN_PPPOE_IPV4_UDP_PAY +--------------------------------------- - 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="enp27s0f2",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="enp27s0f2",count=1) +matched packets:: -verify these packets not to queue 1 and 2 + 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) -drop action -^^^^^^^^^^^ +mismatched packets:: -create a rule:: + 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) - 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 drop / end +to queue action +^^^^^^^^^^^^^^^ -send matched packets:: +1. validate a rule:: - 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="enp27s0f2",count=1) + 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 queue index 1 / end -verify this packet dropped + get the message:: -send mismatched packets:: + Flow rule validated - 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="enp27s0f2",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="enp27s0f2",count=1) + check the flow list:: -verify these packets not dropped + testpmd> flow list 0 -MAC_IPV4_NVGRE_IPV4_SCTP (not support in 19.11) ------------------------------------------------ + check the rule not exists in the list. -to queue action -^^^^^^^^^^^^^^^ +2. create a rule:: -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 queue index 1 / end - 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 / sctp src is 25 dst is 23 / end actions queue index 3 / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 3 + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -verify these packets not to queue 3 +4. verify rules can be destroyed:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. - 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 / sctp src is 25 dst is 23 / end actions rss queues 2 3 end / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 queue index 1 / end -verify this packet to queue 2 or 3 + create a rule:: -send mismatched packets:: + flow create 0 priority 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 queue index 1 / end - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not to queue 2 and 3 +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -drop action -^^^^^^^^^^^ +1. validate a rule:: -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 rss queues 7 8 end / end - 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 / sctp src is 25 dst is 23 / end actions drop / end + get the message:: -send matched packets:: + Flow rule validated - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify these packets not dropped + 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 rss queues 7 8 end / end -MAC_IPV4_NVGRE_IPV4_ICMP (not support in 19.11) ------------------------------------------------ + get the message:: -to queue action -^^^^^^^^^^^^^^^ + Succeeded to create (2) flow -create a rule:: + check the flow list:: - 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 / icmp / end actions queue index 3 / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. -verify this packet to queue 3 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. -verify this packet not to queue 3 +5. check the pattern in pipeline mode -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end - 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 / icmp / end actions rss queues 2 3 end / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 rss queues 7 8 end / end - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet to queue 2 or 3 +drop action +^^^^^^^^^^^ -send mismatched packets:: +1. validate a rule:: - 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="enp27s0f2",count=1) + 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 drop / end -verify this packet not to queue 2 and 3 + get the message:: -drop action -^^^^^^^^^^^ + Flow rule validated -create a rule:: + check the flow list:: - 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 / icmp / end actions drop / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - sendp([Ether()/IP(dst="192.168.0.1")/NVGRE(TNI=2)/Ether()/IP(src="192.168.1.2", dst="192.168.1.3")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet dropped + 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 drop / end -send mismatched packets:: + get the message:: - 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="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet not dropped + check the flow list:: -MAC_IPV4_NVGRE_MAC_IPV4_FRAG ----------------------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule exists in the list. -create a rule:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - 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 queue index 3 / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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="enp27s0f2",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="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify these two packets to queue 3 +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 drop / end -verify these packets not to queue 3 + create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow create 0 priority 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 drop / end -create a rule:: + repeat step 1-4 to check the pattern in pipeline mode. - 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 rss queues 2 3 end / end +Subcase 13: MAC_VLAN_PPPOE_IPV4_UDP_PAY_non_src_dst_port +-------------------------------------------------------- -send matched packets:: +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="enp27s0f2",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="enp27s0f2",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) -verify these two packets to queue 2 or 3 +mismatched packets:: -send mismatched packets:: + 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) - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) +to queue action +^^^^^^^^^^^^^^^ -verify these packets not to queue 2 and 3 +1. validate a rule:: -drop action -^^^^^^^^^^^ + 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 queue index 2 / end -create a rule:: + 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 / end actions drop / end + Flow rule validated -send matched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow list 0 -verify these two packets dropped + check the rule not exists in the list. -send mismatched packets:: +2. create a rule:: - 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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + 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 queue index 2 / end -verify these packets not dropped + get the message:: -MAC_IPV4_NVGRE_MAC_IPV4_PAY ---------------------------- + Succeeded to create (2) flow -to queue action -^^^^^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - 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 queue index 3 / end + check the rule exists in the list. -send matched packets:: +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. - 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="enp27s0f2",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="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these two packets to queue 3 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. - 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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify these packets not to queue 3 + validate a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow validate 0 priority 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 queue index 2 / end -create a rule:: + 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 rss queues 2 3 end / end + testpmd> flow create 0 priority 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 queue index 2 / end -send matched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - 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="enp27s0f2",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="enp27s0f2",count=1) +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -verify this packet to queue 2 or 3 +1. validate a rule:: -send mismatched packets:: + 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 rss queues 7 8 end / 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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + get the message:: -verify these packets not to queue 2 and 3 + Flow rule validated -drop action -^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - 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 drop / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - 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="enp27s0f2",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="enp27s0f2",count=1) + 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 rss queues 7 8 end / end -verify this packet dropped + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - 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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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")/Raw('x'*80)],iface="enp27s0f2",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="enp27s0f2",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="enp27s0f2",count=1) + check the flow list:: -verify these packets not dropped + testpmd> flow list 0 -MAC_IPV4_NVGRE_MAC_IPV4_UDP_PAY -------------------------------- + check the rule exists in the list. -to queue action -^^^^^^^^^^^^^^^ +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. -create a rule:: +4. verify rules can be destroyed:: - 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 queue index 2 / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. - 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="enp27s0f2", count=1) +5. check the pattern in pipeline mode -verify this packet to queue 2 + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end - 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="enp27s0f2", 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="enp27s0f2", count=1) + create a rule:: -verify these packets not to queue 2 + testpmd> flow create 0 priority 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 rss queues 7 8 end / end -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +drop action +^^^^^^^^^^^ - 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 rss queues 2 3 end / end +1. validate a rule:: -send matched packets:: + 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 drop / end - 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="enp27s0f2", count=1) + get the message:: -verify this packet to queue 2 or 3 + Flow rule validated -send mismatched packets:: + check the flow list:: - 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="enp27s0f2", 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="enp27s0f2", count=1) + testpmd> flow list 0 -verify these packets not to queue 2 and 3 + check the rule not exists in the list. -drop action -^^^^^^^^^^^ +2. create a rule:: -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 drop / end - 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 drop / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - 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="enp27s0f2", count=1) + check the flow list:: -verify this packet dropped + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - 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="enp27s0f2", 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="enp27s0f2", count=1) +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -verify these packets not dropped +4. verify rules can be destroyed:: -MAC_IPV4_NVGRE_MAC_IPV4_TCP ---------------------------- + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -create a rule:: +5. check the pattern in pipeline mode - 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 queue index 3 / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 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 drop / end - 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="enp27s0f2",count=1) + create a rule:: -verify this packet to queue 3 + testpmd> flow create 0 priority 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 drop / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - 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="enp27s0f2",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="enp27s0f2",count=1) +Subcase 14: MAC_VLAN_PPPOE_IPV4_TCP_PAY +--------------------------------------- -verify these packets not to queue 3 +matched packets:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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) -create a rule:: +mismatched packets:: - 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 rss queues 2 3 end / end + 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) -send matched packets:: +to queue action +^^^^^^^^^^^^^^^ - 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="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 2 or 3 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - 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="enp27s0f2",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="enp27s0f2",count=1) + Flow rule validated -verify these packets not to queue 2 and 3 + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + 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 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 drop / end +2. create a rule:: -send matched packets:: + 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 queue index 1 / end - 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="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - 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="enp27s0f2",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="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not dropped + check the rule exists in the list. -MAC_IPV4_NVGRE_MAC_IPV4_SCTP (not support in 19.11) ---------------------------------------------------- +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -to queue action -^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - 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 / sctp src is 25 dst is 23 / end actions queue index 3 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 3 + testpmd> flow validate 0 priority 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 queue index 1 / end -send mismatched packets:: + create a rule:: - 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")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify these packets not to queue 3 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: +1. validate 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 / sctp src is 25 dst is 23 / end actions rss queues 2 3 end / end + 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 rss queues 7 8 end / end -send matched packets:: + get the message:: - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 2 or 3 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - 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")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 2 and 3 +2. create a rule:: -drop action -^^^^^^^^^^^ + 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 rss queues 7 8 end / end -create a rule:: + 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 / sctp src is 25 dst is 23 / end actions drop / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - 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")/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet dropped + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. - 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")/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",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")/SCTP(sport=25,dport=19)/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not dropped + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -MAC_IPV4_NVGRE_MAC_IPV4_ICMP (not support in 19.11) ---------------------------------------------------- + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. -to queue action -^^^^^^^^^^^^^^^ +5. check the pattern in pipeline mode -create a rule:: + validate 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 / icmp / end actions queue index 3 / end + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end -send matched packets:: + create a rule:: - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 7 8 end / end -verify this packet to queue 3 + repeat step 1-4 to check the pattern in pipeline mode. -send mismatched packets:: +drop action +^^^^^^^^^^^ - 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")/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet not to queue 3 + 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 drop / end -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + get the message:: -create a rule:: + Flow rule validated - 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 / icmp / end actions rss queues 2 3 end / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify this packet to queue 2 or 3 +2. create a rule:: -send mismatched packets:: + 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 drop / end - 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")/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet not to queue 2 and 3 + Succeeded to create (2) flow -drop action -^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - 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 / icmp / end actions drop / end + check the rule exists in the list. -send matched packets:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - 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")/ICMP()/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify this packet dropped + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - 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")/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet not dropped + validate a rule:: -3. verify rules can be listed and destroyed:: + testpmd> flow validate 0 priority 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 drop / end - testpmd> flow list 0 + create a rule:: - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + testpmd> flow create 0 priority 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 drop / end - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 + repeat step 1-4 to check the pattern in pipeline mode. - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. +Subcase 15: MAC_VLAN_PPPOE_IPV4_TCP_PAY_non_src_dst_port +-------------------------------------------------------- +matched packets:: -Test case: NVGRE pipeline mode -============================== + 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) -1. create switch filter rules and verify +mismatched packets:: -MAC_IPV4_NVGRE_IPV4_FRAG ------------------------- + 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) to queue action ^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end + 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 queue index 2 / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these two packets to queue 3 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 3 +2. create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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 queue index 2 / end -create a rule:: + get the message:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these two packets to queue 2 or 3 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 2. + send mismatched packets, check the packets are not to queue 2. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not to queue 2 and 3 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2. -create a rule:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 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 queue index 2 / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet dropped + testpmd> flow create 0 priority 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 queue index 2 / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=5,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -verify these packets not dropped +1. validate a rule:: -MAC_IPV4_NVGRE_IPV4_PAY (not support in 19.11) ----------------------------------------------- + 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 rss queues 7 8 end / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: -create a rule for tcp:: + Flow rule validated - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 2 / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify this packet to queue 2 +2. create a rule:: -send mismatched packets:: + 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 rss queues 7 8 end / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet not to queue 2 + Succeeded to create (2) flow -create a rule for udp:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 2 / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 7 or 8. + send mismatched packets, check the packets are not to queue 7 and 8. -verify this packet to queue 2 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 7 and 8. -verify this packet not to queue 2 +5. check the pattern in pipeline mode -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + validate a rule:: -create a rule for tcp:: + testpmd> flow validate 0 priority 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 rss queues 7 8 end / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 2 3 end / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 rss queues 7 8 end / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet to queue 2 or 3 +drop action +^^^^^^^^^^^ -send mismatched packets:: +1. validate a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 drop / end -verify this packet not to queue 2 and 3 + get the message:: -create a rule for udp:: + Flow rule validated - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify this packet to queue 2 or 3 +2. create a rule:: -send mismatched packets:: + 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 drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet not to queue 2 and 3 + Succeeded to create (2) flow -drop action -^^^^^^^^^^^ + check the flow list:: -create a rule for tcp:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / end + check the rule exists in the list. -send matched packets:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify this packet dropped + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet not dropped + validate a rule:: -create a rule for udp:: + testpmd> flow validate 0 priority 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 drop / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x11,tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet dropped +Subcase 16: MAC_VLAN_PPPOE_IPV6_PAY_IP_address +---------------------------------------------- -send mismatched packets:: +matched packets:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",proto=0x06,tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",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) -verify this packet not dropped +mismatched packets:: -MAC_IPV4_NVGRE_IPV4_UDP_PAY ---------------------------- + 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")/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")/Raw("x"*80)],iface="ens786f0",count=1) to queue action ^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end + 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 queue index 1 / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 2 +2. create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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 queue index 1 / end -create a rule:: + get the message:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 4 or 5 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not to queue 4 and 5 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -create a rule:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet dropped + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions queue index 1 / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=100)/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -verify these packets not dropped +1. validate a rule:: -MAC_IPV4_NVGRE_IPV4_TCP ------------------------ + 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 rss queues 2 3 end / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: -create a rule:: + Flow rule validated - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 2 / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify this packet to queue 2 +2. create a rule:: -send mismatched packets:: + 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 rss queues 2 3 end / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=3,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=100)/Raw('x' * 80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not to queue 2 + Succeeded to create (2) flow -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + check the rule exists in the list. -send matched packets:: +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify this packet to queue 4 or 5 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=3,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=100)/Raw('x' * 80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify these packets not to queue 4 and 5 + validate a rule:: -drop action -^^^^^^^^^^^ + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end -create a rule:: + create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions rss queues 2 3 end / end -send matched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) +drop action +^^^^^^^^^^^ -verify this packet dropped +1. validate a rule:: -send mismatched packets:: + 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 drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=3,dport=23)/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=100)/Raw('x' * 80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not dropped + Flow rule validated -MAC_IPV4_NVGRE_IPV4_SCTP (not support in 19.11) ------------------------------------------------ + check the flow list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions queue index 4 / end +2. create a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 4 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=4,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=10)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not to queue 4 + check the rule exists in the list. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -create a rule:: +4. verify rules can be destroyed:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions rss queues 4 5 end / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet to queue 4 or 5 + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=4,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=10)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify these packets not to queue 4 and 5 + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions drop / end -drop action -^^^^^^^^^^^ + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +Subcase 17: MAC_VLAN_PPPOE_IPV6_UDP_PAY +--------------------------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions drop / end +matched packets:: -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")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +mismatched packets:: -verify this packet dropped + 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) -send mismatched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=4,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=10)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify these packets not dropped + 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 queue index 1 / end -MAC_IPV4_NVGRE_IPV4_ICMP (not support in 19.11) ------------------------------------------------ + get the message:: -to queue action -^^^^^^^^^^^^^^^ + Flow rule validated -create a rule:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions queue index 2 / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x' * 80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet to queue 2 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x' * 80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet not to queue 2 + check the flow list:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions rss queues 4 5 end / end +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -send matched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x' * 80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet to queue 4 or 5 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send mismatched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x' * 80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet not to queue 4 and 5 + testpmd> flow validate 0 priority 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 queue index 1 / end -drop action -^^^^^^^^^^^ + create a rule:: -create a rule:: + testpmd> flow create 0 priority 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 queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions drop / end + repeat step 1-4 to check the pattern in pipeline mode. -send matched packets:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x' * 80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet dropped + 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 rss queues 4 5 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x' * 80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not dropped + check the flow list:: -MAC_IPV4_NVGRE_IPV6_FRAG (not support in 19.11) ------------------------------------------------ + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 2 / end + 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 rss queues 4 5 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify these packets not to queue 2 +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 2 or 3 + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 4 5 end / end -verify these packets not to queue 2 and 3 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_NVGRE_IPV6_PAY (not support in 19.11) ----------------------------------------------- + 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 drop / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: -create a rule for tcp:: + Succeeded to create (2) flow - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions queue index 3 / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet to queue 3 +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet not to queue 3 + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -create a rule for udp:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions queue index 3 / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 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 drop / end - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet to queue 3 + testpmd> flow create 0 priority 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 drop / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +Subcase 18: MAC_VLAN_PPPOE_IPV6_UDP_PAY_non_src_dst_port +-------------------------------------------------------- -verify this packet not to queue 3 +matched packets:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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) -create a rule for tcp:: +mismatched packets:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions rss queues 4 5 end / end + 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) -send matched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 4 or 5 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not to queue 4 and 5 + check the flow list:: -create a rule for udp:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions rss queues 4 5 end / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 queue index 1 / end -verify this packet to queue 4 or 5 + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not to queue 4 and 5 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule exists in the list. -create a rule for tcp:: +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions drop / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -verify this packet dropped +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end -verify this packet not dropped + create a rule:: -create a rule for udp:: + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions drop / end + repeat step 1-4 to check the pattern in pipeline mode. -send matched packets:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet dropped + 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 rss queues 2 3 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not dropped + check the flow list:: -MAC_IPV4_NVGRE_IPV6_UDP_PAY (not support in 19.11) --------------------------------------------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions queue index 2 / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify these packets not to queue 2 +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions rss queues 4 5 end / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 4 or 5 + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions rss queues 2 3 end / end -verify these packets not to queue 4 and 5 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 25 dst is 23 / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=25,dport=30)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_NVGRE_IPV6_TCP (not support in 19.11) ----------------------------------------------- + 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 drop / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: + + Succeeded to create (2) flow + + check the flow list:: -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions queue index 1 / end + check the rule exists in the list. -send matched packets:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify this packet to queue 1 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=7,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify these packets not to queue 1 + validate a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end -create a rule:: + create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions drop / end -send matched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +Subcase 19: MAC_VLAN_PPPOE_IPV6_TCP_PAY +--------------------------------------- -verify this packet to queue 4 or 5 +matched packets:: -send mismatched 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) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=7,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +mismatched packets:: -verify these packets not to queue 4 and 5 + 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) -drop action -^^^^^^^^^^^ +to queue action +^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions drop / end + 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 queue index 1 / end -send matched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=7,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_NVGRE_IPV6_SCTP (not support in 19.11) ------------------------------------------------ + 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 queue index 1 / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: + + Succeeded to create (2) flow -create a rule:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions queue index 5 / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -verify this packet to queue 5 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=39)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -verify these packets not to queue 5 +5. check the pattern in pipeline mode -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 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 queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions rss queues 2 3 end / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 queue index 1 / end - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet to queue 2 or 3 +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -send mismatched packets:: +1. validate a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=39)/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 rss queues 4 5 end / end -verify these packets not to queue 2 and 3 + get the message:: -drop action -^^^^^^^^^^^ + Flow rule validated -create a rule:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions drop / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet dropped + 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 rss queues 4 5 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=20,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=39)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify these packets not dropped + check the flow list:: -MAC_IPV4_NVGRE_IPV6_ICMPV6 (not support in 19.11) -------------------------------------------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule exists in the list. -create a rule:: +3. send matched packets, check the packets are to queue 4 or 5. + send mismatched packets, check the packets are not to queue 4 and 5. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions queue index 2 / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 4 and 5. -verify this packet to queue 2 +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 rss queues 4 5 end / end -verify this packet not to queue 2 + create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow create 0 priority 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 rss queues 4 5 end / end + + repeat step 1-4 to check the pattern in pipeline mode. + +drop action +^^^^^^^^^^^ + +1. validate a rule:: -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 / tcp src is 25 dst is 23 / end actions drop / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions rss queues 4 5 end / end + get the message:: -send matched packets:: + Flow rule validated - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet to queue 4 or 5 + testpmd> flow list 0 -send mismatched packets:: + check the rule not exists in the list. - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet not to queue 4 and 5 + 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 drop / end -drop action -^^^^^^^^^^^ + get the message:: -create a rule:: + Succeeded to create (2) flow - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / nvgre / eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions drop / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet dropped +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP()/NVGRE()/Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet not dropped + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -2. verify rules can be listed and destroyed:: +5. check the pattern in pipeline mode - testpmd> flow list 0 + validate a rule:: - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + testpmd> flow validate 0 priority 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 drop / end - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 + create a rule:: - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + testpmd> flow create 0 priority 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 drop / end + repeat step 1-4 to check the pattern in pipeline mode. -Test case: PPPOD non-pipeline mode -================================== +Subcase 20: MAC_VLAN_PPPOE_IPV6_TCP_PAY_non_src_dst_port +-------------------------------------------------------- -1. create fdir rules to make the fdir table full, - which can be created as follows:: +matched packets:: - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end + 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) -2. create switch filter rules and verify +mismatched packets:: -MAC_PPPOD_PAY -------------- + 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) to queue action ^^^^^^^^^^^^^^^ -create rules:: - - testpmd> flow create 0 ingress pattern eth type is 0x8863 / end actions queue index 2 / end - -send matched packets:: +1. validate a rule:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw('x' *80)],iface="enp27s0f2",count=1) + 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 queue index 1 / end -verify this packet to queue 2 + get the message:: -send mismatched packets:: + Flow rule validated - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw('x' *80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not to queue 2 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 ingress pattern eth type is 0x8863 / end actions drop / end + 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 queue index 1 / end -send matched packets:: + get the message:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw('x' *80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw('x' *80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet not dropped +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -3. verify rules can be listed and destroyed:: +4. verify rules can be destroyed:: + testpmd> flow destroy 0 rule 15360 testpmd> flow list 0 - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 +5. check the pattern in pipeline mode - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + validate a rule:: + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end -Test case: PPPOE non-pipeline mode -================================== + create a rule:: -1. create fdir rules to make the fdir table full, - which can be created as follows:: + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions queue index 1 / end - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end + repeat step 1-4 to check the pattern in pipeline mode. -2. create switch filter rules and verify +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -MAC_PPPOE_PAY -------------- +1. validate a rule:: -to queue action -^^^^^^^^^^^^^^^ + 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 rss queues 2 3 end / end -create rules:: + get the message:: - testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions queue index 2 / end + Flow rule validated -send matched packets:: + check the flow list:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 2 + check the rule not exists in the list. -send mismatched packets:: +2. create a rule:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 rss queues 2 3 end / end -verify this packet not to queue 2 + get the message:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + Succeeded to create (2) flow -create a rule:: + check the flow list:: - testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions rss queues 2 3 end / end + testpmd> flow list 0 -send matched packets:: + check the rule exists in the list. - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -verify this packet to queue 2 or 3 +4. verify rules can be destroyed:: -send mismatched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -verify this packet not to queue 2 and 3 +5. check the pattern in pipeline mode -drop action -^^^^^^^^^^^ + validate a rule:: -create a rule:: + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end - testpmd> flow create 0 ingress pattern eth type is 0x8864 / end actions drop / end + create a rule:: -send matched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions rss queues 2 3 end / end - sendp([Ether(dst="00:11:22:33:44:55")/PPPoE()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify this packet dropped +drop action +^^^^^^^^^^^ -send mismatched packets:: +1. validate a rule:: - sendp([Ether(dst="00:11:22:33:44:55")/PPPoED()/PPP()/IP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 drop / end -verify this packet not dropped + get the message:: -MAC_PPPOE_IPV4_PAY ------------------- + Flow rule validated -to queue action -^^^^^^^^^^^^^^^ + check the flow list:: -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes / end actions queue index 1 / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + 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 drop / end -verify this packet to queue 1 + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not to queue 1 + testpmd> flow list 0 -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + check the rule exists in the list. -create a rule:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes / end actions rss queues 2 3 end / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -verify this packet to queue 2 or 3 +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end -verify this packet not to queue 2 and 3 + create a rule:: -drop action -^^^^^^^^^^^ + testpmd> flow create 0 priority 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions drop / end -create a rule:: + repeat step 1-4 to check the pattern in pipeline mode. - testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes / end actions drop / end +Test case: PPPoE Control +======================== -send matched packets:: +create a PPPOE rule to enable RSS for PPPOE_control packets:: - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 ingress pattern eth / pppoes / end actions rss types pppoe end key_len 0 queues end / end -verify this packet dropped +Subcase 1: MAC_PPPOE_LCP_PAY +---------------------------- -send mismatched packets:: +matched packets:: - sendp([Ether(dst="00:11:22:33:44:54",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",count=1) - sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE()/PPP(proto=0x0021)/IP()/Raw('x' * 80)],iface="enp27s0f2",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=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1) -verify this packet not dropped +mismatched packets:: -3. verify rules can be listed and destroyed:: + 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) - testpmd> flow list 0 +to queue action +^^^^^^^^^^^^^^^ - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: +1. validate a rule:: - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 + 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 queue index 1 / end - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + get the message:: + Flow rule validated -Test case: IPv4/IPv6 + TCP/UDP pipeline mode -============================================ + check the flow list:: -1. create switch filter rules and verify + testpmd> flow list 0 -MAC_IPV4_FRAG -------------- + check the rule not exists in the list. -to queue action -^^^^^^^^^^^^^^^ +2. create a rule:: -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 queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions queue index 3 / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify these two packets to queue 3 + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=7,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -verify these packets not to queue 3 +4. verify rules can be destroyed:: -create a rule with partial fields:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions queue index 3 / end + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify these two packets to queue 3 + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions queue index 1 / end -verify these packets not to queue 3 + repeat step 1-4 to check the pattern in pipeline mode. to queue group action ^^^^^^^^^^^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions rss queues 2 3 end / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these two packets to queue 2 or 3 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=7,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not to queue 2 and 3 +2. create a rule:: -create a rule with partial fields:: + 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 rss queues 2 3 end / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions rss queues 2 3 end / end + get the message:: -send matched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify these two packets to queue 2 or 3 + testpmd> flow list 0 -send mismatched packets:: + check the rule exists in the list. - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. - verify these packets not to queue 2 and 3 +4. verify rules can be destroyed:: -drop action -^^^^^^^^^^^ + testpmd> flow destroy 0 rule 15360 + testpmd> flow destroy 0 rule 15361 + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / end actions drop / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end -verify these two packets dropped + create a rule:: -send mismatched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions rss queues 2 3 end / end - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=7,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not dropped +drop action +^^^^^^^^^^^ -create a rule with partial fields:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.3",tos=4,frag=5)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these two packets dropped + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.4", dst="192.168.0.3",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2", dst="192.168.0.5",tos=4,frag=5)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify these packets not dropped +2. create a rule:: -MAC_IPV4_PAY ------------- + 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 drop / end -to queue action -^^^^^^^^^^^^^^^ + get the message:: -create a rule for tcp:: + Succeeded to create (2) flow - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions queue index 2 / end + check the flow list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet to queue 2 +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -send mismatched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet not to queue 2 + check the rule not exists in the list. + send matched packets, check the packets are not dropped. -create a rule for udp:: +5. check the pattern in pipeline mode - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions queue index 2 / end + validate a rule:: -send matched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet to queue 2 + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions drop / end -send mismatched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +Subcase 2: MAC_PPPOE_IPCP_PAY +----------------------------- -verify this packet not to queue 2 +matched packets:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + 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) -create a rule for tcp:: +mismatched packets:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions rss queues 2 3 end / end + 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) -send matched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet to queue 2 or 3 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not to queue 2 and 3 + check the flow list:: -create a rule for udp:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions rss queues 2 3 end / end + check the rule not exists in the list. -send matched packets:: +2. create a rule:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 queue index 1 / end -verify this packet to queue 2 or 3 + get the message:: -send mismatched packets:: + Succeeded to create (2) flow - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not to queue 2 and 3 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check the rule exists in the list. -create a rule for tcp:: +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x06 tos is 4 / end actions drop / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -verify this packet dropped +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end -verify this packet not dropped + create a rule:: -create a rule for udp:: + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 proto is 0x11 tos is 4 / end actions drop / end + repeat step 1-4 to check the pattern in pipeline mode. -send matched packets:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet dropped + 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 rss queues 2 3 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet not dropped + check the flow list:: -MAC_IPV4_UDP_PAY ----------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions queue index 2 / end + 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 rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify these packets not to queue 2 +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow destroy 0 rule 15361 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions rss queues 4 5 end / end + check the rules not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 4 or 5 + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions rss queues 2 3 end / end -verify these packets not to queue 4 and 5 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule:: - - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / udp src is 50 dst is 23 / end actions drop / end +1. validate a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet dropped + Flow rule validated -send mismatched packets:: - - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=2,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/UDP(sport=50,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) - -verify these packets not dropped - -MAC_IPV4_TCP ------------- + check the flow list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions queue index 3 / end +2. create a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 3 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=7)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify these packets not to queue 3 + check the rule exists in the list. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -create a rule:: +4. verify rules can be destroyed:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions rss queues 4 5 end / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet to queue 4 or 5 + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=7)/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify these packets not to queue 4 and 5 + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions drop / end -drop action -^^^^^^^^^^^ + repeat step 1-4 to check the pattern in pipeline mode. -create a rule:: +Subcase 3: MAC_VLAN_PPPOE_LCP_PAY +--------------------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / tcp src is 50 dst is 23 / end actions drop / end +matched packets:: -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) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +mismatched packets:: -verify this packet dropped + 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) -send mismatched packets:: +to queue action +^^^^^^^^^^^^^^^ - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=5,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/TCP(sport=50,dport=7)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify these packets not dropped + 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 queue index 1 / end -MAC_IPV4_SCTP (not support in 19.11) ------------------------------------- + get the message:: -to queue action -^^^^^^^^^^^^^^^ + Flow rule validated -create a rule:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions queue index 4 / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet to queue 4 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify these packets not to queue 4 + check the flow list:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions rss queues 4 5 end / end +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -send matched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet to queue 4 or 5 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send mismatched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify these packets not to queue 4 and 5 + testpmd> flow validate 0 priority 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 queue index 1 / end -drop action -^^^^^^^^^^^ + create a rule:: -create a rule:: + testpmd> flow create 0 priority 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 queue index 1 / end - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / sctp src is 25 dst is 23 / end actions drop / end + repeat step 1-4 to check the pattern in pipeline mode. -send matched packets:: +to queue group action +^^^^^^^^^^^^^^^^^^^^^ - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. validate a rule:: -verify this packet dropped + 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 rss queues 2 3 end / end -send mismatched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/SCTP(sport=25,dport=3)/Raw('x'*80)],iface="enp27s0f2",count=1) + Flow rule validated -verify these packets not dropped + check the flow list:: -MAC_IPV4_ICMP (not support in 19.11) ------------------------------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +2. create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions queue index 2 / 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 0xc021 / end actions rss queues 2 3 end / end -send matched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify this packet to queue 2 + check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet not to queue 2 +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +4. verify rules can be destroyed:: -create a rule:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow destroy 0 rule 15361 + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions rss queues 4 5 end / end + check the rules not exist in the list. + send matched packets, check the packets are not to queue 2 and 3. -send matched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify this packet to queue 4 or 5 + testpmd> flow validate 0 priority 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 rss queues 2 3 end / end -send mismatched packets:: + create a rule:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 2 3 end / end -verify this packet not to queue 4 and 5 + repeat step 1-4 to check the pattern in pipeline mode. drop action ^^^^^^^^^^^ -create a rule:: +1. validate a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 dst is 192.168.0.3 tos is 4 / icmp type is 0x08 / end actions drop / end + 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 drop / end -send matched packets:: + get the message:: - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x08)/Raw('x' * 80)],iface="enp27s0f2",count=1) + Flow rule validated -verify this packet dropped + check the flow list:: -send mismatched packets:: - - sendp([Ether()/IP(src="192.168.0.2",dst="192.168.0.3",tos=4)/ICMP(type=0x04)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not dropped + check the rule not exists in the list. -MAC_IPV6_FRAG +2. create a rule:: -to queue action -^^^^^^^^^^^^^^^ + 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 drop / end -create a rule with src ipv6 + dst ipv6:: + get the message:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions queue index 5 / end + Succeeded to create (2) flow -send matched packets:: + check the flow list:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet to queue 5 + check the rule exists in the list. -send mismatched packets:: +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1514",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) +4. verify rules can be destroyed:: -verify these packets not to queue 5 + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -create a rule with dst ipv6 + tc:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions queue index 3 / end +5. check the pattern in pipeline mode -send matched packets:: + validate a rule:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 drop / end -verify this packet to queue 3 + create a rule:: -send mismatched packets:: + testpmd> flow create 0 priority 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 drop / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2027",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + repeat step 1-4 to check the pattern in pipeline mode. -verify these packets not to queue 3 +Subcase 4: MAC_VLAN_PPPOE_IPCP_PAY +---------------------------------- -to queue group action -^^^^^^^^^^^^^^^^^^^^^ +matched packets:: -create a rule with src ipv6 + dst ipv6:: + 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) - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions rss queues 2 3 end / end +mismatched packets:: -send matched 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) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue action +^^^^^^^^^^^^^^^ -verify this packet to queue 2 or 3 +1. validate a rule:: -send mismatched packets:: + 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 queue index 1 / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1514",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not to queue 2 and 3 + Flow rule validated -create a rule with dst ipv6 + tc:: + check the flow list:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions rss queues 2 3 end / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) +2. create a rule:: -verify this packet to queue 2 or 3 + 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 queue index 1 / end -send mismatched packets:: + get the message:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2027",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + Succeeded to create (2) flow -verify these packets not to queue 2 and 3 + check the flow list:: -drop action -^^^^^^^^^^^ + testpmd> flow list 0 -create a rule with src ipv6 + dst ipv6:: + check the rule exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1515 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end +3. send matched packets, check the packets are to queue 1. + send mismatched packets, check the packets are not to queue 1. -send matched packets:: +4. verify rules can be destroyed:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify this packet dropped + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -send mismatched packets:: +5. check the pattern in pipeline mode - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1514",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2023",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + validate a rule:: -verify these packets not dropped + testpmd> flow validate 0 priority 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 queue index 1 / end -create a rule with dst ipv6 + tc:: + create a rule:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / end actions drop / end + testpmd> flow create 0 priority 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 queue index 1 / end -send matched packets:: + repeat step 1-4 to check the pattern in pipeline mode. - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) +to queue group action +^^^^^^^^^^^^^^^^^^^^^ -verify this packet dropped +1. validate a rule:: -send mismatched packets:: + 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 rss queues 2 3 end / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2027",tc=3)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=4)/IPv6ExtHdrFragment()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify these packets not dropped + Flow rule validated -MAC_IPV6_PAY (not support in 19.11) ------------------------------------ + check the flow list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule for tcp:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions queue index 3 / end +2. create a rule:: -send matched packets:: + 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 rss queues 2 3 end / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 3 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not to queue 3 + check the rule exists in the list. -create a rule for udp:: +3. send matched packets, check the packets are to queue 2 or 3. + send mismatched packets, check the packets are not to queue 2 and 3. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions queue index 3 / end +4. verify rules can be destroyed:: -send matched packets:: + testpmd> flow destroy 0 rule 15360 + testpmd> flow destroy 0 rule 15361 + testpmd> flow list 0 - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. + send matched packets, check the packets are not to queue 2 and 3. -verify this packet to queue 3 +5. check the pattern in pipeline mode -send mismatched packets:: + validate a rule:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow validate 0 priority 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 rss queues 2 3 end / end -verify this packet not to queue 3 + create a rule:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + testpmd> flow create 0 priority 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 rss queues 2 3 end / end -create a rule for tcp:: + repeat step 1-4 to check the pattern in pipeline mode. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions rss queues 4 5 end / end +drop action +^^^^^^^^^^^ -send matched packets:: +1. validate a rule:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + 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 drop / end -verify this packet to queue 4 or 5 + get the message:: -send mismatched packets:: + Flow rule validated - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + check the flow list:: -verify this packet not to queue 4 and 5 + testpmd> flow list 0 -create a rule for udp:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions rss queues 4 5 end / end +2. create a rule:: -send matched packets:: + 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 drop / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + get the message:: -verify this packet to queue 4 or 5 + Succeeded to create (2) flow -send mismatched packets:: + check the flow list:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not to queue 4 and 5 + check the rule exists in the list. -drop action -^^^^^^^^^^^ +3. send matched packets, check the packets are dropped. + send mismatched packets, check the packets are not dropped. -create a rule for tcp:: +4. verify rules can be destroyed:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x06 tc is 3 / end actions drop / end + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + send matched packets, check the packets are not dropped. - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) +5. check the pattern in pipeline mode -verify this packet dropped + validate a rule:: -send mismatched packets:: + testpmd> flow validate 0 priority 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 drop / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) + create a rule:: -verify this packet not dropped + testpmd> flow create 0 priority 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 drop / end -create a rule for udp:: + repeat step 1-4 to check the pattern in pipeline mode. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 proto is 0x11 tc is 3 / end actions drop / end +Test case: negative cases +========================= +Note: some of the error messages may be differernt. -send matched packets:: +Subcase 1: invalid parameters of queue index +-------------------------------------------- - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x11,tc=3)/UDP()/Raw('x'*80)],iface="enp27s0f2",count=1) +1. create a rule with invalid queue index:: -verify this packet dropped + testpmd> flow create 0 priority 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 queue index 16 / end -send mismatched packets:: + Failed to create flow, report message:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",nh=0x06,tc=3)/TCP()/Raw('x'*80)],iface="enp27s0f2",count=1) + Invalid action type or queue number: Invalid argument -verify this packet not dropped +2. check the flow list:: -MAC_IPV6_UDP_PAY ----------------- + testpmd> flow list 0 -to queue action -^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +Subcase 2: invalid parameters of rss queues +------------------------------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions queue index 5 / end +1. Invalid number of queues:: -send matched packets:: + testpmd> flow create 0 priority 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 rss queues 1 2 3 end / end + testpmd> flow create 0 priority 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 rss queues 0 end / end + testpmd> flow create 0 priority 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 rss queues end / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Failed to create flow, report messag:: -verify this packet to queue 5 + Invalid action type or queue number: Invalid argument -send mismatched packets:: +2. Discontinuous queues:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=3,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=4)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 rss queues 1 2 3 5 end / end -verify these packets not to queue 5 + Failed to create flow, report message:: -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + Discontinuous queue region: Invalid argument -create a rule:: +3. Invalid queue index:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions rss queues 2 3 end / end + testpmd> flow create 0 priority 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 rss queues 15 16 end / end -send matched packets:: + Failed to create flow, report message:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + Invalid queue region indexes: Invalid argument -verify this packet to queue 2 or 3 +4. set queue group 17 queues:: -send mismatched packets:: + testpmd> flow create 0 priority 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 rss queues 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 end / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=3,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=4)/Raw('x'*80)],iface="enp27s0f2",count=1) + Failed to create flow, report message:: -verify these packets not to queue 2 and 3 + Invalid action type or queue number: Invalid argument -drop action -^^^^^^^^^^^ +5. check the flow list:: -create a rule:: + testpmd> flow list 0 - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / udp src is 50 dst is 23 / end actions drop / end + check the rules not exist in the list. -send matched packets:: +Subcase 3: unsupported patterns in os default package +----------------------------------------------------- - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) +1. load os default package and launch testpmd in pipeline mode as step 3-6 in Prerequisites. -verify this packet dropped +2. create unsupported patterns in os default package:: -send mismatched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions queue index 1 / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 17 / end actions rss queues 2 3 end / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 / udp / esp spi is 8 / end actions rss queues 2 3 end / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions queue index 1 / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=3,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/UDP(sport=50,dport=4)/Raw('x'*80)],iface="enp27s0f2",count=1) + Failed to create flow, report message:: -verify these packets not dropped + Invalid input pattern: Invalid argument -MAC_IPV6_TCP ------------- +3. check the rule list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions queue index 4 / end +Subcase 4: unsupported input set +-------------------------------- -send matched packets:: +1. create an nvgre rule with unsupported input set field [inner tos]:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / end -verify this packet to queue 4 +2. Failed to create flow, report message:: -send mismatched packets:: + Invalid input set: Invalid argument - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. check the rule list:: -verify these two packets not to queue 4 + testpmd> flow list 0 -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +Subcase 5: duplicated rules +--------------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions rss queues 4 5 end / end +1. create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 queue index 1 / end + testpmd> flow list 0 - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet to queue 4 or 5 +2. create the same rule again, Failed to create flow, report message:: -send mismatched packets:: + switch filter create flow fail: Invalid argument - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) +3. check the flow list:: -verify these two packets not to queue 4 and 5 + testpmd> flow list 0 -drop action -^^^^^^^^^^^ + check only the first rule exists in the list. -create a rule:: +Subcase 6: conflicted rules +--------------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / tcp src is 25 dst is 23 / end actions drop / end +1. create a rule:: -send matched packets:: + testpmd> flow create 0 priority 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 queue index 1 / end + testpmd> flow list 0 - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule exists in the list. -verify this packet dropped +2. create a rule with same input set but different actions:: -send mismatched packets:: + testpmd> flow create 0 priority 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 queue index 2 / end + testpmd> flow create 0 priority 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 drop / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/TCP(sport=25,dport=20)/Raw('x'*80)],iface="enp27s0f2",count=1) + Failed to create the two rules, report message:: -verify these two packets not dropped + switch filter create flow fail: Invalid argument -MAC_IPV6_SCTP (not support in 19.11) ------------------------------------- +3. check the flow list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check only the first rule exists in the list. - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / sctp src is 25 dst is 23 / end actions queue index 4 / end +Subcase 7: multiple actions +--------------------------- -send matched packets:: +1. create a rule with two conflicted actions:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow create 0 priority 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 queue index 1 / rss queues 2 3 end / end -verify this packet to queue 4 + Failed to create flow, report message:: -send mismatched packets:: + Invalid input action number: Invalid argument - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=1,dport=23)/Raw('x'*80)],iface="enp27s0f2",count=1) - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/SCTP(sport=25,dport=9)/Raw('x'*80)],iface="enp27s0f2",count=1) +2. check the flow list:: -verify these two packets not to queue 4 + testpmd> flow list 0 -to queue group action -^^^^^^^^^^^^^^^^^^^^^ + check the rule not exists in the list. -create a rule:: +Subcase 8: void action +---------------------- - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions rss queues 4 5 end / end +1. create a rule with void action:: -send matched packets:: + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + Failed to create flow, report message:: -verify this packet to queue 4 or 5 + NULL action.: Invalid argument -send mismatched packets:: +2. check the flow list:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x03)/Raw('x'*80)],iface="enp27s0f2",count=1) + testpmd> flow list 0 -verify this packet not to queue 4 and 5 + check the rule not exists in the list. -drop action -^^^^^^^^^^^ +Subcase 9: unsupported action +----------------------------- -create a rule:: +1. create a rule with void action:: - testpmd> flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 tc is 3 / icmp type is 0x01 / end actions drop / end + testpmd> flow create 0 priority 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 -send matched packets:: + Failed to create flow, report message:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x01)/Raw('x'*80)],iface="enp27s0f2",count=1) + Invalid action type: Invalid argument -verify this packet dropped +2. check the flow list:: -send mismatched packets:: + testpmd> flow list 0 - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515",dst="CDCD:910A:2222:5498:8475:1111:3900:2020",tc=3)/ICMP(type=0x03)/Raw('x'*80)],iface="enp27s0f2",count=1) + check the rule not exists in the list. -verify this packet not dropped +Subcase 10: delete a non-existing rule +-------------------------------------- -2. verify rules can be listed and destroyed:: +1. check the rule list:: testpmd> flow list 0 - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + check no switch filter rule exists in the list. - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 +2. destroy the rule 20000:: - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + testpmd> flow destroy 0 rule 20000 -Test case: IPv4/IPv6 + TCP/UDP non-pipeline mode -================================================ + check no error reports. -1. create fdir rules to make the fdir table full, - which can be created as follows:: +Subcase 11: add long switch rule +-------------------------------- - flow create 0 ingress pattern eth / ipv4 src is 192.168.0.0 dst is 192.1.0.0 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 5 / end +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. -2. create switch filter rules and verify +1. create a rule with input set length longer than 32 bytes:: -MAC_IPV4_PAY ------------- + testpmd> flow create 0 priority 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 src is 25 dst is 23 / end actions queue index 1 / end -to queue action -^^^^^^^^^^^^^^^ + Failed to create flow, report message:: -create a rule:: + Invalid input set: Invalid argument - 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 queue index 4 / end +2. check the rule list:: -send matched packets:: + testpmd> flow list 0 - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.2",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) - -verify these 100 packets to queue 4 + check the rule not exists in the list. -drop action -^^^^^^^^^^^ +3. create a MAC_PPPOE_IPV6_UDP_PAY rule with to queue action:: -create a rule:: + testpmd> flow create 0 priority 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 queue index 1 / end + testpmd> flow list 0 - 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.3 tos is 4 ttl is 2 / end actions drop / end + check the rule exists in the list. -send matched packets:: +4. send matched packets:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4,ttl=2)/("X"*480)], iface="enp27s0f2", count=100) - -verify theses 100 packets dropped + 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) -MAC_IPV4_UDP_PAY ----------------- + check queue 1 receive the packet. + send mismatched packets:: -to queue action -^^^^^^^^^^^^^^^ + 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) -create a rule:: + check the packets are not to queue 1. - 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 queue index 2 / end - -send matched packets:: +5. verify rules can be destroyed:: - 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="enp27s0f2", count=100) + testpmd> flow destroy 0 rule 15360 + testpmd> flow list 0 -verify these 100 packets to queue 2 + check the rule not exists in the list. + send matched packets, check the packets are not to queue 1. -drop action -^^^^^^^^^^^ +Subcase 12: void input set value +-------------------------------- -create a rule:: +1. create a IPV4_PAY rule with void input set value:: - 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.3 tos is 4 / udp src is 25 dst is 23 / end actions drop / end + testpmd> flow create 0 priority 0 ingress pattern eth / ipv4 / end actions queue index 1 / end -send matched packets:: + Failed to create flow, report message:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) - -verify theses 100 packets dropped + Invalid input set: Invalid argument -MAC_IPV4_TCP_PAY ----------------- +2. check the rule list:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow list 0 -create a rule:: + check the rule not exists in the list. - 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.32 tos is 4 / tcp src is 25 dst is 23 / end actions queue index 3 / end +Subcase 13: invalid port +------------------------ -send matched packets:: +1. create a rule with invalid port:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.32",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + testpmd> flow create 1 priority 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 queue index 1 / end -verify these 100 packets to queue 3 + Failed to create flow, report message:: -drop action -^^^^^^^^^^^ + No such device: No such device -create a rule:: +2. check the rule list on port 0:: - 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.3 tos is 4 / tcp src is 25 dst is 23 / end actions drop / end + testpmd> flow list 0 -send matched packets:: + check the rule not exists in the list. + check on port 1:: - sendp([Ether(dst="68:05:ca:8d:ed:a8")/IP(src="192.168.0.1",dst="192.168.0.3",tos=4)/TCP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) - -verify theses 100 packets dropped - + testpmd> flow list 1 -MAC_IPV6_PAY ------------- + get the message:: -to queue action -^^^^^^^^^^^^^^^ + Invalid port 1 -create a rule:: +Test case: negative validation +============================== +Note: some of the error messages may be different. - 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 queue index 8 / end - -send matched packets:: +1. invalid parameters of queue index - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + testpmd> flow validate 0 priority 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 queue index 16 / end -verify these 100 packets to queue 8 + get the error message:: -drop action -^^^^^^^^^^^ + Invalid action type or queue number: Invalid argument -create a rule:: +2. invalid parameters of rss queues - testpmd> flow create 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1537 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 / end actions drop / end + Invalid number of queues:: -send matched packets:: + testpmd> flow validate 0 priority 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 rss queues 1 2 3 end / end + testpmd> flow validate 0 priority 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 rss queues 0 end / end + testpmd> flow validate 0 priority 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 rss queues end / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/("X"*480)], iface="enp27s0f2", count=100) + get the error message:: -verify theses 100 packets dropped + Invalid action type or queue number: Invalid argument -MAC_IPV6_FRAG -------------- + Discontinuous queues:: -to queue action -^^^^^^^^^^^^^^^ + testpmd> flow validate 0 priority 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 rss queues 1 2 3 5 end / end -create a rule:: + get the error message:: - 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 queue index 10 / end - -send matched packets:: + Discontinuous queue region: Invalid argument - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + Invalid rss queues index:: -verify these 100 packets to queue 10 + testpmd> flow validate 0 priority 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 rss queues 15 16 end / end -drop action -^^^^^^^^^^^ + get the error message:: -create a rule:: + Invalid queue region indexes: Invalid argument - 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:2023 / end actions drop / end +3. unsupported pattern in os default package:: -send matched packets:: + testpmd> flow validate 0 priority 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions queue index 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / gtpu teid is 0x12345678 / gtp_psc qfi is 0x34 / end actions drop / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp / pfcp s_field is 0 / end actions queue index 1 / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / l2tpv3oip session_id is 17 / end actions rss queues 2 3 end / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv6 / udp / esp spi is 8 / end actions rss queues 2 3 end / end + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2 / ah spi is 1 / end actions queue index 1 / end - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/IPv6ExtHdrFragment()/("X"*480)], iface="enp27s0f2", count=100) + get the error message:: -verify theses 100 packets dropped - -MAC_IPV6_UDP ------------- + Invalid input pattern: Invalid argument -to queue action -^^^^^^^^^^^^^^^ +4. unsupported input set -create a rule:: + testpmd> flow validate 0 priority 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 queue index 1 / end - testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1518 / udp src is 25 dst is 23 / end actions queue index 6 / end + get the error message:: -send matched packets:: + Invalid input set: Invalid argument - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1518", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) +5. multiple actions -verify these 100 packets to queue 6 + testpmd> flow validate 0 priority 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 queue index 1 / rss queues 2 3 end / end -drop action -^^^^^^^^^^^ + get the error message:: -create a rule:: + Invalid input action number: Invalid argument - testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1528 / udp src is 25 dst is 23 / end actions drop / end - -send matched packets:: +6. void action - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1528", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=25,dport=23)/("X"*480)], iface="enp27s0f2", count=100) + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / udp src is 25 dst is 23 / end actions end -verify theses 100 packets dropped - -MAC_IPV6_TCP ------------- + get the error message:: -to queue action -^^^^^^^^^^^^^^^ + NULL action.: Invalid argument -create a rule:: +7. unsupported action - testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1515 / tcp / end actions queue index 12 / end + 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 -send matched packets:: + get the error message:: - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1515", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)], iface="enp27s0f2", count=100) + Invalid action type: Invalid argument -verify these 100 packets to queue 12 +8. long switch rule + testpmd> flow validate 0 priority 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 src is 25 dst is 23 / end actions queue index 1 / end -create a rule:: + get the error message:: - testpmd> flow create 0 ingress pattern eth / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2020 src is CDCD:910A:2222:5498:8475:1111:3900:1516 / tcp / end actions drop / end + Invalid input set: Invalid argument -send matched packets:: +9. void input set value - sendp([Ether()/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1516", dst="CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP()/("X"*480)], iface="enp27s0f2", count=100) + testpmd> flow validate 0 priority 0 ingress pattern eth / ipv4 / end actions queue index 1 / end -verify theses 100 packets dropped + get the error message:: -3. verify rules can be listed and destroyed:: + Invalid input set: Invalid argument - testpmd> flow list 0 +10. invalid port - verify the rule exists in the list. - destroy the rule, suppose the rule number is 0:: + testpmd> flow validate 1 priority 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 queue index 1 / end - testpmd> flow destroy 0 rule 0 - testpmd> flow list 0 + get the error message:: + + No such device: No such device + +11. check the rule list:: - verify the rule does not exist, and send matched packets, the packets are not to the corresponding queues. + testpmd> flow list 0 + no rule exists in the list. -- 2.7.4