23. ICE DCF Switch Filter PPPOE Tests

23.1. Description

This document provides the plan for testing DCF switch filter pppoe of Intel® Ethernet 800 Series, including:

  • Enable DCF switch filter for PPPOES (comm #1 package)

23.1.1. Pattern and input set

Packet Types Pattern Input Set
PPPOES MAC_VLAN_PPPOE_IPV4_PAY _session_id_proto_id [Dest MAC], [VLAN], [seid], [pppoe_proto_id]
MAC_VLAN_PPPOE_IPV6_PAY _session_id_proto_id [Dest MAC], [VLAN], [seid], [pppoe_proto_id]
MAC_PPPOE_IPV4_PAY _session_id_proto_id [Dest MAC], [seid], [pppoe_proto_id]
MAC_PPPOE_IPV6_PAY _session_id_proto_id [Dest MAC], [seid], [pppoe_proto_id]
MAC_PPPOE_IPV4_PAY_IP_address [Source IP], [Dest IP]
MAC_PPPOE_IPV4_UDP_PAY [Source IP], [Dest IP], [Source Port], [Dest Port]
MAC_PPPOE_IPV4_UDP_PAY _non_src_dst_port [Source IP], [Dest IP]
MAC_PPPOE_IPV4_TCP_PAY [Source IP], [Dest IP], [Source Port], [Dest Port]
MAC_PPPOE_IPV4_TCP_PAY _non_src_dst_port [Source IP], [Dest IP]
MAC_PPPOE_IPV6_PAY_IP_address [Source IP], [Dest IP]
MAC_PPPOE_IPV6_UDP_PAY [Source IP], [Dest IP], [Source Port], [Dest Port]
MAC_PPPOE_IPV6_UDP_PAY _non_src_dst_port [Source IP], [Dest IP]
MAC_PPPOE_IPV6_TCP_PAY [Source IP], [Dest IP], [Source Port], [Dest Port]
MAC_PPPOE_IPV6_TCP_PAY _non_src_dst_port [Source IP], [Dest IP],
MAC_VLAN_PPPOE_IPV4_PAY _IP_address [VLAN], [Source IP], [Dest IP]
MAC_VLAN_PPPOE_IPV4_UDP_PAY [VLAN], [Source IP], [Dest IP] [Source Port], [Dest Port]
MAC_VLAN_PPPOE_IPV4_UDP_PAY _non_src_dst_port [VLAN], [Source IP], [Dest IP]
MAC_VLAN_PPPOE_IPV4_TCP_PAY [VLAN], [Source IP], [Dest IP] [Source Port], [Dest Port]
MAC_VLAN_PPPOE_IPV4_TCP_PAY _non_src_dst_port [VLAN], [Source IP], [Dest IP]
MAC_VLAN_PPPOE_IPV6_PAY _IP_address [VLAN], [Source IP], [Dest IP]
MAC_VLAN_PPPOE_IPV6_UDP_PAY [VLAN], [Source IP], [Dest IP] [Source Port], [Dest Port]
MAC_VLAN_PPPOE_IPV6_UDP_PAY _non_src_dst_port [VLAN], [Source IP], [Dest IP]
MAC_VLAN_PPPOE_IPV6_TCP_PAY [VLAN], [Source IP], [Dest IP] [Source Port], [Dest Port]
MAC_VLAN_PPPOE_IPV6_TCP_PAY _non_src_dst_port [VLAN], [Source IP], [Dest IP]
MAC_PPPOE_LCP_PAY [Dest MAC], [seid], [pppoe_proto_id]
MAC_PPPOE_IPCP_PAY [Dest MAC], [seid], [pppoe_proto_id]
MAC_VLAN_PPPOE_LCP_PAY [Dest MAC], [VLAN], [seid], [pppoe_proto_id]
MAC_VLAN_PPPOE_IPCP_PAY [Dest MAC], [VLAN], [seid], [pppoe_proto_id]

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.

23.1.2. Supported function type

  • create
  • validate
  • destroy
  • flush
  • list

23.1.3. Supported action type

  • To vf/vsi

23.2. Prerequisites

  1. Hardware: Intel® Ethernet 810 Series: E810-XXVDA4/E810-CQ design the cases with 2 ports card.

  2. Software: dpdk: http://dpdk.org/git/dpdk scapy: http://www.secdev.org/projects/scapy/

  3. Copy specific ice package to /lib/firmware/updates/intel/ice/ddp/ice.pkg, then load driver:

    rmmod ice
    insmod ice.ko
    
  4. Compile DPDK:

    CC=gcc meson -Denable_kmods=True -Dlibdir=lib  --default-library=static x86_64-native-linuxapp-gcc
    ninja -C x86_64-native-linuxapp-gcc
    
  5. Get the pci device id of DUT, for example:

    ./usertools/dpdk-devbind.py -s
    
    0000:18:00.0 'Device 1593' if=enp24s0f0 drv=ice unused=vfio-pci
    0000:18:00.1 'Device 1593' if=enp24s0f1 drv=ice unused=vfio-pci
    
  6. Generate 4 VFs on PF0:

    echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs
    
    ./usertools/dpdk-devbind.py -s
    0000:18:01.0 'Ethernet Adaptive Virtual Function 1889' if=enp24s1 drv=iavf unused=vfio-pci
    0000:18:01.1 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f1 drv=iavf unused=vfio-pci
    0000:18:01.2 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f2 drv=iavf unused=vfio-pci
    0000:18:01.3 'Ethernet Adaptive Virtual Function 1889' if=enp24s1f3 drv=iavf unused=vfio-pci
    
  7. Set VF0 as trust:

    ip link set enp24s0f0 vf 0 trust on
    
  8. Bind VFs to dpdk driver:

    modprobe vfio-pci
    ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:01.0 0000:18:01.1 0000:18:01.2 0000:18:01.3
    
  9. Launch dpdk on VF0 and VF1, and VF0 request DCF mode:

    ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 -a 0000:18:01.0,cap=dcf,representor=[1] -a 0000:18:01.1 -- -i
    testpmd> set portlist 2
    testpmd> set fwd rxonly
    testpmd> set verbose 1
    testpmd> start
    testpmd> show port info all
    

    check the VF0 driver is net_ice_dcf.

  10. on tester side, copy the layer python file to /root:

    cp pfcp.py to /root
    

    then import layers when start scapy:

    >>> import sys
    >>> sys.path.append('/root')
    >>> from pfcp import PFCP
    >>> from scapy.contrib.igmp import *
    

23.3. Test case: MAC_VLAN_PPPOE_IPV4_PAY_session_id_proto_id

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check port 2 receive the packets. send 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="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.4. Test case: MAC_VLAN_PPPOE_IPV6_PAY_session_id_proto_id

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check port 2 receive the packets. send 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="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.5. Test case: MAC_PPPOE_IPV4_PAY_session_id_proto_id

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.6. Test case: MAC_PPPOE_IPV6_PAY_session_id_proto_id

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x0057 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(dst="00:11:22:33:44:54",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x0057)/IPv6()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="enp27s0f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7. Test case: PPPoE data

23.7.1. Subcase 1: MAC_PPPOE_IPV4_PAY_IP_address

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send 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)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.2. Subcase 2: MAC_PPPOE_IPV4_UDP_PAY

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send 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)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.3. Subcase 3: MAC_PPPOE_IPV4_UDP_PAY_non_src_dst_port

  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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send 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)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.4. Subcase 4: MAC_PPPOE_IPV4_TCP_PAY

  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 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.5. Subcase 5: MAC_PPPOE_IPV4_TCP_PAY_non_src_dst_port

  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 / tcp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.6. Subcase 6: MAC_PPPOE_IPV6_PAY_IP_address

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched 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(src="11:22:33:44:55:99",dst="00:11:22:33:44:55")/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.7. Subcase 7: MAC_PPPOE_IPV6_UDP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched 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)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.8. Subcase 8: MAC_PPPOE_IPV6_UDP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched 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")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.9. Subcase 9: MAC_PPPOE_IPV6_TCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.10. Subcase 10: MAC_PPPOE_IPV6_TCP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.11. Subcase 11: MAC_VLAN_PPPOE_IPV4_PAY_IP_address

  1. validate 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 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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")/Raw("x"*80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/Raw("x"*80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.12. Subcase 12: MAC_VLAN_PPPOE_IPV4_UDP_PAY

  1. validate 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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.13. Subcase 13: MAC_VLAN_PPPOE_IPV4_UDP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / udp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.14. Subcase 14: MAC_VLAN_PPPOE_IPV4_TCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.15. Subcase 15: MAC_VLAN_PPPOE_IPV4_TCP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv4 src is 192.168.1.1 dst is 192.168.1.2 / tcp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.3", dst="192.168.1.2")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.4")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP(src="192.168.1.1", dst="192.168.1.2")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.16. Subcase 16: MAC_VLAN_PPPOE_IPV6_PAY_IP_address

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check port 2 receive the 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=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1)
    sendp([Ether(dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x"*80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.17. Subcase 17: MAC_VLAN_PPPOE_IPV6_UDP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.18. Subcase 18: MAC_VLAN_PPPOE_IPV6_UDP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / udp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.19. Subcase 19: MAC_VLAN_PPPOE_IPV6_TCP_PAY

  1. validate 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 represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2023")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=27,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=19)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.7.20. Subcase 20: MAC_VLAN_PPPOE_IPV6_TCP_PAY_non_src_dst_port

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth / vlan tci is 1 / pppoes / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 / tcp / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1537", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/TCP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/UDP(sport=25,dport=23)/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0057)/IPv6(src="CDCD:910A:2222:5498:8475:1111:3900:1536", dst="CDCD:910A:2222:5498:8475:1111:3900:2022")/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.8. Test case: PPPoE control

23.8.1. Subcase 1: MAC_PPPOE_LCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.8.2. Subcase 2: MAC_PPPOE_IPCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.8.3. Subcase 3: MAC_VLAN_PPPOE_LCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0xc021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0xc021)/PPP_LCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.

23.8.4. Subcase 4: MAC_VLAN_PPPOE_IPCP_PAY

  1. validate a rule:

    testpmd> flow validate 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions represented_port ethdev_port_id 1 / end
    

    get the message:

    Flow rule validated
    

    check the flow list:

    testpmd> flow list 0
    

    check the rule not exists in the list.

  2. create a rule:

    testpmd> flow create 0 ingress pattern eth dst is 00:11:22:33:44:55 / vlan tci is 1 / pppoes seid is 3 / pppoe_proto_id is 0x8021 / end actions represented_port ethdev_port_id 1 / end
    testpmd> flow list 0
    

    check the rule exists in the list.

  3. send matched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check port 2 receive the packets. send mismatched packets:

    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:53",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=2,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=4)/PPP(proto=0x8021)/PPP_IPCP()/Raw("x" * 80)],iface="ens786f0",count=1)
    sendp([Ether(src="11:22:33:44:55:99",dst="00:11:22:33:44:55",type=0x8100)/Dot1Q(vlan=1,type=0x8864)/PPPoE(sessionid=3)/PPP(proto=0x0021)/IP()/Raw("x" * 80)],iface="ens786f0",count=1)
    

    check the packets are not to port 2.

  4. verify rules can be destroyed:

    testpmd> flow destroy 0 rule 0
    testpmd> flow list 0
    

    check the rule not exists in the list. send matched packets, check the packets are not to port 2.