From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 2DB31A0093; Tue, 29 Nov 2022 11:25:05 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 299AC42BD9; Tue, 29 Nov 2022 11:25:05 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 05A7E4067E for ; Tue, 29 Nov 2022 11:25:02 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1669717503; x=1701253503; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=h5JJGbrw5fZGVY8ezqsyfDhsVk06ytaJekV+pNoan2E=; b=SkkPdCK4IZmgNEwm8MuOqXmTmrXVpV+qnn29QRFasxRhAe44qzAVHXDT SnKfsNebAppRFdzmH0/fVqY/Hqlbj1iIcta5eMy300LLqLRqZrX0RHrvY re+ixCVHVDgwsF1AqVF8Mlb0njJELFjJbdn6CTDogPApv+94q+0OwdgYw f1Zy1212c3jU95rzrcDHw/dWkLSobTqk3ocrYIa56PhgwDUeSoxdVDWA6 61LplghjVGsW2uDGZM5OV/V76UVNGW0nJLfBbfLIgbMWxpgAJl5Z21iBx AOuwp9iTJfh5kXJtW/TWMkOCvO79mYy1NOYfri8XKge5tBERs+1ARcm8C A==; X-IronPort-AV: E=McAfee;i="6500,9779,10545"; a="298426232" X-IronPort-AV: E=Sophos;i="5.96,202,1665471600"; d="scan'208";a="298426232" Received: from fmsmga004.fm.intel.com ([10.253.24.48]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 02:25:01 -0800 X-IronPort-AV: E=McAfee;i="6500,9779,10545"; a="712321752" X-IronPort-AV: E=Sophos;i="5.96,202,1665471600"; d="scan'208";a="712321752" Received: from unknown (HELO localhost.localdomain) ([10.239.252.20]) by fmsmga004-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Nov 2022 02:25:00 -0800 From: Song Jiale To: dts@dpdk.org Cc: Song Jiale Subject: [dts] [PATCH V2 2/3] test_plans/ice_iavf_flow_subscribe: add a testplan to test ice iavf flow subscribe Date: Tue, 29 Nov 2022 18:23:18 +0000 Message-Id: <20221129182319.979199-3-songx.jiale@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221129182319.979199-1-songx.jiale@intel.com> References: <20221129182319.979199-1-songx.jiale@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=y Content-Transfer-Encoding: quoted-printable X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org add testplan to test the dpdk-22.11 new feaute of iavf subscribes to the pf= flow. Signed-off-by: Song Jiale --- .../ice_iavf_flow_subscribe_test_plan.rst | 804 ++++++++++++++++++ 1 file changed, 804 insertions(+) create mode 100644 test_plans/ice_iavf_flow_subscribe_test_plan.rst diff --git a/test_plans/ice_iavf_flow_subscribe_test_plan.rst b/test_plans/= ice_iavf_flow_subscribe_test_plan.rst new file mode 100644 index 00000000..6d4c8d2e --- /dev/null +++ b/test_plans/ice_iavf_flow_subscribe_test_plan.rst @@ -0,0 +1,804 @@ +.. SPDX-License-Identifier: BSD-3-Clause=0D + Copyright(c) 2022 Intel Corporation=0D +=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0D +ICE IAVF Flow Subscription Test=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=0D +=0D +Description=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +IAVF is able to subscribe a flow from PF through virtual channel.=0D +=0D +1. IAVF driver support rte_flow "to port" action, the port id must be itse= lf.=0D +2. only trusted VF can flow subscribe.=0D +3. only a flow that dst mac address matched PF's mac addresses can be subs= cribed.=0D +4. if the rule does not contain pf dst mac address, the mac address of PF = will be used as the dst mac by default.=0D +5. vf restet, all subscribed rule will be deleted automatically by PF driv= er.=0D +6. ideally one VF's subscription should not impact another VF's subscripti= on, so the application running on each VF can belong to an independent secu= rity domain.=0D +7. if two VF's subscriptions have overlap, a packet matched both subscript= ion rules should be replicated into 2 VFs.=0D +8. pf reset all flow subscribe rules will be invalid.=0D +9. one pf reset will not affect other pfs.=0D +=0D +=0D +DPDK changes::=0D +=0D + 1. IAVF driver will support rte_flow "to port" action, the port id sho= uld be itself.=0D + 2. IAVF driver transfer the "to port" flow into virtual channel comman= d "FLOW_SUBCRIBE" combined the matched pattern.=0D + 3. to destroy a rule, IAVF need to send command "FLOW_UNSUBSCRIBE" to = PF.=0D +=0D +Kernel driver change::=0D +=0D + 1. introduce an new security level as "flow subscribe" above "trusted"= for VF, use devlink to configure VF for the new security level.(optional i= n POC)=0D + 2. support FLOW_SUBCSRIBE virtchal command and transfer it into switch= rule.=0D + 3. any rule that contain dst mac matched but the dst mac is not one of= the PF will be rejected=0D + 4. any rule don't contains dst mac match, the PF will force to append = the matched to the rule.=0D + 5. when VF reset is detected, all subscribed rule will be deleted auto= matically by PF driver.=0D +=0D +Prerequisites=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Hardware=0D +--------=0D + Supportted NICs: Intel=C2=AE Ethernet 800 Series: E810-XXVDA4/E810-CQ,= etc.=0D +=0D +Software=0D +--------=0D + DPDK: http://dpdk.org/git/dpdk=0D +=0D + Scapy: http://www.secdev.org/projects/scapy/=0D +=0D +General Set Up=0D +--------------=0D +1. Compile DPDK::=0D +=0D + # CC=3Dgcc meson --werror -Denable_kmods=3DTrue -Dlibdir=3Dlib --defau= lt-library=3Dstatic =0D + # ninja -C =0D +=0D +2. insmod ice.ko, and bind PF to ice.=0D +=0D +case: flow subscription smoke test=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Subcase 1: 1 PF 4 VFs=0D +---------------------=0D +1. only trusted VF can flow subscribe.=0D +2. only a flow that matches dst mac address to its PF=E2=80=99s mac addres= ses can be subscribed.=0D +3. rule don't contains PF dst mac match, the PF will force to append the m= atched to the rule.=0D +4. vf restet, all subscribed rule will be deleted automatically by PF driv= er.=0D +5. if two VF's subscriptions have overlap, a packet matched both subscript= ion rules should be replicated into 2 VFs.=0D +=0D +create and set vf::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:31:01.0 0000:31:01.1 0000= :31:01.2 0000:31:01.3=0D + ip link set ens85f0 vf 0 trust on=0D + ip link set ens85f0 vf 1 trust on=0D + ip link set ens85f0 vf 2 trust on=0D + ip link set ens85f0 vf 3 trust on=0D +=0D +launch the userland ``testpmd`` application on DUT as follows and ::=0D +=0D + /app/dpdk-testpmd -- -i=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D +=0D +validate and create rules::=0D +=0D + testpmd> flow validate/create 0 ingress pattern eth dst is {pf_mac} / = ipv4 / udp src is 22 / end actions port_representor port_id 0 / end=0D + Flow rule validated/Flow rule #0 created=0D + testpmd> flow validate/create 1 ingress pattern eth / ipv4 / udp src i= s 22 / end actions port_representor port_id 1 / end=0D + Flow rule validated/Flow rule #0 created=0D + testpmd> flow validate/create 2 ingress pattern eth dst is {pf_mac} / = ipv4 / udp src is 22 / end actions port_representor port_id 2 / end=0D + Flow rule validated/Flow rule #0 created=0D + testpmd> flow validate/create 3 ingress pattern eth / ipv4 / udp src i= s 22 / end actions port_representor port_id 3 / end=0D + Flow rule validated/Flow rule #0 created=0D +=0D +Check all can validate/create successully.=0D +=0D +check rule list::=0D +=0D + testpmd> flow list 0=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D + testpmd> flow list 1=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D + testpmd> flow list 2=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D + testpmd> flow list 3=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D +=0D +send matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/UD= P(sport=3D22)/Raw("x" * 80),=0D +=0D +All vf can received the packet.=0D +=0D +send mismatched packets::=0D +=0D + Ether(dst=3D{other_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")= /UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/UD= P()/Raw("x" * 80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/TC= P(sport=3D22)/Raw("x" * 80),=0D +=0D +All vf can not received all the packets.=0D +=0D +vf reset::=0D +=0D + testpmd> stop=0D + testpmd> port stop all=0D + testpmd> port reset all=0D + testpmd> port start all=0D + testpmd> start=0D + testpmd> flow list 0=0D + testpmd> flow list 1=0D + testpmd> flow list 2=0D + testpmd> flow list 3=0D +=0D +Check all vf have no flow subscribe rule.=0D +=0D +send matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/UD= P(sport=3D22)/Raw("x" * 80),=0D +=0D +All vf can not received the packet.=0D +=0D +Subcase 2: 2 PFs 4 VFs=0D +----------------------=0D +1. reset PF mac and still be able to flow subscribe.=0D +2. all VFs can flow subscribe.=0D +3. flow subscribe not affect the normal packet receiving of VF.=0D +4. ideally one VF's subscription should not impact another VF's subscripti= on, so the application running on each VF can belong to an independent secu= rity domain.=0D +=0D +create and set vf::=0D +=0D + ip link set dev ens85f0 address 00:11:22:33:44:55=0D + ip link set dev ens85f1 address 00:11:22:33:44:66=0D + echo 2 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + echo 2 > /sys/bus/pci/devices/0000\:31\:00.1/sriov_numvfs=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:31:01.0 0000:31:01.1 0000= :31:09.0 0000:31:09.1=0D + ip link set ens85f0 vf 0 trust on=0D + ip link set ens85f0 vf 1 trust off=0D + ip link set ens85f1 vf 0 trust on=0D + ip link set ens85f1 vf 1 trust off=0D +=0D +Launch two "testpmd" application on DUT as follows::=0D +=0D + /app/dpdk-testpmd -- -i=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D + /app/dpdk-testpmd -- -i=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D +=0D +create rules in two testpmds respectively::=0D +=0D + testpmd> flow create 0 ingress pattern eth dst is {old_pf_mac} / ipv4 = / udp src is 22 / end actions port_representor port_id 0 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D + testpmd> flow create 0 ingress pattern eth dst is {new_pf_mac} / ipv4 = / udp src is 22 / end actions port_representor port_id 0 / end=0D + Flow rule #0 created=0D +=0D + testpmd> flow list 0=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D +=0D +Check rule 0 create failed, rule 1 create successully in two testpmd respe= ctively.=0D +=0D +send vf normal packets::=0D +=0D + Ether(dst=3D{vf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/UD= P(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{vf_mac})/IPv6(src=3D"192.168.0.20",dst=3D"192.168.0.21")/= TCP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{vf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21")/Ra= w("x" * 80),=0D + Ether(dst=3D{vf_mac})/IPv6(src=3D"::22",dst=3D"::11")/Raw("x" * 80),=0D +=0D +Send all the normal packets to each vf separately and=0D +check all vfs only can receive the corresponding mac packets.=0D +=0D +send matched rule packets::=0D +=0D + Ether(dst=3D{new_pf0_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{new_pf1_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/UDP(sport=3D22)/Raw("x" * 80),=0D +=0D +send all matched packets from port 0 and port 1 of the tester,=0D +and check that all vfs can only receive packets whose dst mac is their pf.= =0D +=0D +send mismatched rule packets::=0D +=0D + Ether(dst=3D{old_pf0_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{old_pf1_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(dst=3D{new_pf0_mac})/IPv6()/UDP(sport=3D22)/Raw("x" * 80),=0D + Ether(src=3D{new_pf1_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/UDP()/Raw("x" * 80),=0D + Ether(dst=3D{new_pf0_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.21= ")/TCP()/Raw("x" * 80),=0D +=0D +Send all mismatched packets from port 0 and port 1 of the tester,=0D +and check that all vfs can not receive these packets.=0D +=0D +destroy the rule in two testpmd respectively::=0D +=0D + testpmd> flow flush 0=0D +=0D +Send all the normal packets to each vf separately again=0D +and check all vfs also only can receive the corresponding mac packets.=0D +=0D +Send all matched packets from port 0 and port 1 of the tester again,=0D +and check that all vfs can not receive these packets.=0D +=0D +Subcase 3: exclusive rule=0D +-------------------------=0D +1. the same flow subscribe rule only can create once.=0D +2. after the rule of to queue is created, the rule of the same input set c= an't be created.=0D +=0D +create and set vf::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + ./usertools/dpdk-devbind.py -b vfio-pci 0000:31:01.0 0000:31:01.1 0000= :31:01.2 0000:31:01.3=0D + ip link set ens85f0 vf 0 trust on=0D + ip link set ens85f0 vf 1 trust on=0D + ip link set ens85f0 vf 2 trust on=0D + ip link set ens85f0 vf 3 trust on=0D +=0D +launch the "testpmd" application on DUT as follows::=0D +=0D + /app/dpdk-testpmd -- -i --rxq=3D8 --txq= =3D8=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D +=0D +create rule::=0D +=0D + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 0 / end=0D + Flow rule #0 created=0D + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 0 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +The same flow subscribe rule only can create once, so check rule 0 create = successful, rule 1 create failed.=0D +=0D +flush rule::=0D +=0D + testpmd> flow flush 0=0D +=0D +create rule::=0D +=0D + testpmd> flow create 2 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 2 / queue index 3 / end=0D + Flow rule #0 created=0D + testpmd> flow create 3 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 3 / queue index 4 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +After the rule of to queue is created, the rule of the same inputset can't= be created,=0D +so check rule 0 create successful, rule 1 create successful failed.=0D +=0D +destory rule 0 and recreate rule::=0D +=0D + testpmd> flow destory 2 rule 0=0D + testpmd> flow create 3 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 3 / queue index 4 / end=0D + Flow rule #0 created=0D + testpmd> flow create 2 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 2 / queue index 3 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +check rule 1 create successful, rule 0 create successful failed.=0D +=0D +Subcase 4: negative rule=0D +------------------------=0D +1. Iavf driver will support rte_flow "to port" action, the port id should = be itself.=0D +2. only trusted VF can flow subscribe.=0D +3. only a flow that matches dst mac address to its PF=E2=80=99s mac addres= ses can be subscribed.=0D +4. not support the input set is src mac adress=0D +=0D +create and set vf::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + ip link set ens85f0 vf 0 trust on=0D + ip link set ens85f0 vf 1 trust on=0D + ip link set ens85f0 vf 2 trust on=0D + ip link set ens85f0 vf 3 trust off=0D +=0D +launch the "testpmd" application on DUT as follows::=0D +=0D + /app/dpdk-testpmd -- -i=0D +=0D +create rules::=0D +=0D + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 1 / end=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D + testpmd> flow create 1 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 0 / end=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +=0D + testpmd> flow create 0 ingress pattern eth dst is {not_pf0_mac} / ipv4= / udp src is 22 / end actions port_representor port_id 0 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D + testpmd> flow create 1 ingress pattern eth dst is {not_pf0_mac} / ipv4= / udp src is 22 / end actions port_representor port_id 1 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +=0D + testpmd> flow create 2 ingress pattern eth src is {pf0_mac} / ipv4 / u= dp src is 22 / end actions port_representor port_id 2 / end=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D + testpmd> flow create 3 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 3 / end=0D + iavf_execute_vf_cmd(): Return failure -5 for cmd 114=0D + iavf_flow_sub(): Failed to execute command of OP_FLOW_SUBSCRIBE=0D + iavf_flow_sub(): Failed to add rule request due to the hw doesn't supp= ort=0D + iavf_flow_create(): Failed to create flow=0D + port_flow_complain(): Caught PMD error type 2 (flow rule (handle)): Fa= iled to create parser engine.: Invalid argument=0D +=0D +check all rule create failed.=0D +=0D +Subcase 5: pf reset=0D +-------------------=0D +1. pf reset all flow subscribe rules will be invalid.=0D +2. one pf reset will not affect other pfs=0D +=0D +create and set vf::=0D +=0D + echo 2 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + echo 2 > /sys/bus/pci/devices/0000\:31\:00.1/sriov_numvfs=0D + ip link set ens85f0 vf 0 trust on=0D + ip link set ens85f0 vf 1 trust on=0D + ip link set ens85f1 vf 0 trust on=0D + ip link set ens85f1 vf 1 trust on=0D +=0D +launch two "testpmd" application on DUT as follows::=0D +=0D + /app/dpdk-testpmd -- -i=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D + /app/dpdk-testpmd -- -i=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D +=0D +rule::=0D +=0D + testpmd> flow create 0 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 0 / end=0D + Flow rule #0 created=0D + testpmd> flow create 1 ingress pattern eth / ipv4 / udp src is 22 / en= d actions port_representor port_id 1 / end=0D + Flow rule #0 created=0D + testpmd> flow list 0=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D + testpmd> flow list 1=0D + ID Group Prio Attr Rule=0D + 0 0 0 i-- ETH IPV4 UDP =3D> REPRESENTED_PORT=0D +=0D +=0D +check all vf flow subscribe rule successful in 2 testpmd respectively.=0D +=0D +send packet::=0D +=0D + packet1: Ether(dst=3D{pf0_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D + packet2: Ether(dst=3D{pf1_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D +=0D +vf0 and vf1 of pf0 can receive packet1, vf1 and vf2 of pf1 can receive pac= ket2.=0D +=0D +pf0 reset::=0D +=0D + echo 1 > /sys/bus/pci/devices/0000\:31\:00.0/reset=0D +=0D +send packet::=0D +=0D + packet1: Ether(dst=3D{pf0_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D + packet2: Ether(dst=3D{pf1_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D +=0D +vf0 and vf1 of pf0 can not receive packet1, vf1 and vf2 of pf1 can receive= packet2.=0D +=0D +pf1 reset::=0D +=0D + echo 1 > /sys/bus/pci/devices/0000\:89\:00.1/reset=0D +=0D +send packet::=0D +=0D + packet1:Ether(dst=3D{pf0_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D + packet2:Ether(dst=3D{pf1_mac})/IP()/UDP(sport=3D22)/Raw("x"*80),=0D +=0D +vf0 and vf1 of pf0 can not receive packet1, vf1 and vf2 of pf 1 can not re= ceive packet2.=0D +=0D +=0D +flow subscribe Test=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +Pattern and input set=0D +---------------------=0D +=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| Pattern | = Input Set | Comments = |=0D ++=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D+=0D +| MAC_IPV4_UDP_VXLAN_MAC_IPV4/IPV6_TCP/UDP/ICPM_PAYLOAD | outer_ipv4 + = outer_udp(dstP=3D4789) | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV6_UDP_VXLAN_MAC_IPV4/IPV6_TCP/UDP/ICPM_PAYLOAD | outer_udp(dst= P=3D4789) | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV4_UDP_PAYLOAD | srcIP + dstIP= + srcPort + dstPort | actions port_representor port_id {vf_id} + rss + pr= iority |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV4_TCP_PAYLOAD | srcIP + dstIP= + srcPort + dstPort | actions port_representor port_id {vf_id} + to queue= + priority |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV6_UDP_PAYLOAD | dstIP + srcPo= rt+ dstPort | actions port_representor port_id {vf_id} + to queue= + priority |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV6_TCP_PAYLOAD | srcIP + srcPo= rt + dstPort | actions port_representor port_id {vf_id} + rss + pr= iority |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_VLAN_IPV4 | vlan_id, dstI= P, | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV4_ICMP | ipv4(proto=3D= 1) | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV4/IPV6_PAYLOAD | srcIP mask + = dstIP mask | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +| MAC_IPV4/IPV6_TCP/UDP_PAYLOAD | srcPort mask = + dstPort mask | actions port_representor port_id {vf_id} = |=0D ++--------------------------------------------------------+----------------= ----------------------+----------------------------------------------------= ------------+=0D +=0D + .. note::=0D +=0D + 1. The maximum input set length of a switch rule is 32 bytes, and src i= pv6,=0D + dst ipv6 account for 32 bytes. Therefore, for ipv6 cases, if need to= test=0D + fields other than src, dst ip, we create rule by removing src or dst= ip in=0D + the test plan.=0D +=0D +flow subscribe Prerequisites=0D +----------------------------=0D +=0D +1. create a VF and set it trust on::=0D +=0D + echo 4 > /sys/bus/pci/devices/0000\:31\:00.0/sriov_numvfs=0D + ip link set ens85f0 vf 0 trust on=0D +=0D +2. bind the Dut port to dpdk::=0D +=0D + # ./usertools/dpdk-devbind.py -b vfio-pci =0D +=0D +3. launch "testpmd" application on DUT as follows::=0D +=0D + /app/dpdk-testpmd -a -- -i --rx= q=3D --txq=3D=0D + testpmd> set verbose 1=0D + testpmd> set fwd rxonly=0D + testpmd> set promisc all off=0D + testpmd> start=0D +=0D +test steps for flow subscribe=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=0D +1. validate rules.=0D +2. create rules and check rules list for vf.=0D +3. send matched packets, check the packets are received by vf and queue.=0D +4. send mismatched packets, check the packets are not received by vf=0D +5. destroy rule, list rules.=0D +6. send matched packets, check the packtet can not received by vf.=0D +=0D +case: MAC_IPV4_UDP_VXLAN=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv4 / udp dst is 4789 / end actio= ns port_representor port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/UDP(dport=3D4789)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IP()/TCP()/Raw("x"*80= ),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IP()/UDP()/Raw("x"*80= ),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IP()/ICMP()/Raw("x"*8= 0),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IPv6()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IPv6()/TCP()/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IPv6()/UDP()/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IPv6()/ICMP()/Raw("x"= *80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP(dport=3D1)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP(dport=3D1)/VXLAN()/Ether()/IP()/Raw("x"= *80),=0D + Ether(dst=3D{pf_mac})/IP()/TCP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/ICMP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D +=0D +case: MAC_IPV6_UDP_VXLAN=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv6 / udp dst is 4789 / end action= s port_representor port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(dport=3D4789)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IP()/TCP()/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IP()/UDP()/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IP()/ICMP()/Raw("x"= *80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IPv6()/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IPv6()/TCP()/Raw("x= "*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IPv6()/UDP()/Raw("x= "*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP()/VXLAN()/Ether()/IPv6()/ICMP()/Raw("= x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(dport=3D1)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(dport=3D1)/VXLAN()/Ether()/IP()/Raw("= x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/TCP()/VXLAN()/Ether()/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/ICMP()/VXLAN()/Ether()/IP()/Raw("x"*80),= =0D +=0D +case: MAC_VLAN_IPV4=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / vlan tci is 1 / ipv4 dst is 192.16= 8.0.1 / end actions port_representor port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D1)/IP(dst=3D"192.168.0.1")/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D1)/IP(dst=3D"192.168.0.1")/UDP()/Ra= w("x"*80),=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D1)/IP(dst=3D"192.168.0.1")/TCP()/Ra= w("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D1)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(dst=3D"192.168.0.1")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D1)/IP(dst=3D"192.168.0.2")/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/Dot1Q(vlan=3D2)/IP(dst=3D"192.168.0.1")/Raw("x"*= 80),=0D +=0D +case: MAC_IPV4_ICMP=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv4 proto is 0x1 / end actions po= rt_representor port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(proto=3D1)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/ICMP()/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(proto=3D2)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/ICMP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/TCP()/Raw("x"*80),=0D +=0D +case: l3 mask=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +subcase 1: MAC_IPV4_SRC_DST_MASK=0D +--------------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv4 src spec 224.0.0.0 src mask 2= 55.0.0.0 dst spec 224.0.0.0 dst mask 255.0.0.0 / end actions port_represent= or port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"224.255.255.255",dst=3D"224.255.255.25= 5")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"224.255.255.255",dst=3D"224.0.0.0")/UD= P(sport=3D22)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"224.0.0.0",dst=3D"224.255.255.255")/TC= P(sport=3D22)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"225.0.0.0",dst=3D"225.0.0.0")/Raw("x"*= 80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"225.0.0.0",dst=3D"224.0.0.0")/UDP(spor= t=3D22)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"224.0.0.0",dst=3D"225.0.0.0")/TCP(spor= t=3D22)/Raw("x"*80),=0D +=0D +subcase 2: MAC_IPV6_SRC_MASK=0D +----------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv6 src spec CDCD:910A:2222:5498:= 8475:1111:3900:2020 src mask ffff:ffff:ffff:ffff:0000:0000:0000:0000 dst sp= ec CDCD:910A:2222:5498:8475:1111:3900:2020 dst mask ffff:ffff:ffff:ffff:000= 0:0000:0000:0000 / end actions port_representor port_id 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"CDCD:910A:2222:5498:0000:0000:0000:0= 000",src=3D"CDCD:910A:2222:5498:0000:0000:0000:0000")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2= 020",src=3D"CDCD:910A:2222:5498:0000:0000:0000:0000")/UDP(sport=3D22)/Raw("= x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"CDCD:910A:2222:5498:0000:0000:0000:0= 000",src=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D22)/Raw("= x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"CDCD:910A:2222:5499:8475:1111:3900:2= 020",src=3D"CDCD:910A:2222:5499:8475:1111:3900:2020")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"CDCD:910A:2222:5498:0000:0000:0000:0= 000",src=3D"CDCD:910A:2222:5499:8475:1111:3900:2020")/UDP(sport=3D22)/Raw("= x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(dst=3D"dst=3D"CDCD:910A:2222:5499:8475:1111= :3900:2020",src=3D"CDCD:910A:2222:5498:0000:0000:0000:0000")/TCP(sport=3D22= )/Raw("x"*80),=0D +=0D +case : l4 mask=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +subcase 1: MAC_IPV4_UDP_SRC_DST_MASK=0D +------------------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv4 / udp src spec 2152 src mask = 0xff00 dst spec 1281 dst mask 0x00ff / end actions port_representor port_id= 0 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/UDP(sport=3D2048,dport=3D1)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP(sport=3D104,dport=3D1281)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/UDP(sport=3D2152,dport=3D1280)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/TCP(sport=3D2152,dport=3D1281)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D2152,dport=3D1281)/Raw("x"*80),= =0D +=0D +subcase 2: MAC_IPV4_TCP_SRC_DST_MASK=0D +------------------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv4 / tcp src spec 2152 src mask 0xf= f00 dst spec 1281 dst mask 0x00ff / end actions port_representor port_id 0 = / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/TCP(sport=3D2048,dport=3D1)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP()/TCP(sport=3D104,dport=3D1281)/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IP()/TCP(sport=3D2152,dport=3D1280)/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IP()/UDP(sport=3D2152,dport=3D1281)/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IPv6()/TCP(sport=3D2152,dport=3D1281)/Raw("x"*80= ),=0D +=0D +subcase 3: MAC_IPV6_UDP_SRC_DST_MASK=0D +------------------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv6 / udp src spec 2152 src mask 0xf= f00 dst spec 1281 dst mask 0x00ff / end actions port_representor port_id 0 = / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D2048,dport=3D1)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D104,dport=3D1281)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D2152,dport=3D1280)/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IPv6()/TCP(sport=3D2152,dport=3D1281)/Raw("x"*80),= =0D + Ether(dst=3D{pf_mac})/IP()/UDP(sport=3D2152,dport=3D1281)/Raw("x"*80),=0D +=0D +subcase 4: MAC_IPV6_TCP_SRC_DST_MASK=0D +------------------------------------=0D +rule::=0D +=0D + flow create 0 ingress pattern eth / ipv6 / tcp src spec 2152 src mask 0xf= f00 dst spec 1281 dst mask 0x00ff / end actions port_representor port_id 0 = / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/TCP(sport=3D2048,dport=3D1)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6()/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6()/TCP(sport=3D104,dport=3D1281)/Raw("x"*80)= ,=0D + Ether(dst=3D{pf_mac})/IPv6()/TCP(sport=3D2152,dport=3D1280)/Raw("x"*80= ),=0D + Ether(dst=3D{pf_mac})/IPv6()/UDP(sport=3D2152,dport=3D1281)/Raw("x"*80= ),=0D + Ether(dst=3D{pf_mac})/IP()/TCP(sport=3D2152,dport=3D1281)/Raw("x"*80),= =0D +=0D +test steps for supported flow subscribe priority=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +1. validate rules: two rules have same pattern, input set but different pr= iority and action(priority 0 -> to queue 5, priority 1 -> to queue 6).=0D +2. create rules and list rules for vf.=0D +3. send matched packets, check vf receive the packets for hiting the prior= ity 0.=0D +4. send mismatched packets, check the packets are not received by vf.=0D +5. destroy rule with priority 0, list rules.=0D +6. send matched packets, check vf receive the packets for hiting the prior= ity 1.=0D +7. create rule 0 and send matched packet, check vf receive the packets for= hiting the priority 0.=0D +=0D +case: MAC_IPV4_UDP_PAYLOAD_priority=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +rule::=0D +=0D + flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2= 0 dst is 192.168.0.1 / udp src is 2048 dst is 2022 / end actions port_repre= sentor port_id 0 / rss queues 4 5 end / end=0D + flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2= 0 dst is 192.168.0.1 / udp src is 2048 dst is 2022 / end actions port_repre= sentor port_id 0 / rss queues 6 7 end / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/UDP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/Raw= ("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.21",dst=3D"192.168.0.1")/UDP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.2")/UDP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/UDP= (sport=3D2047,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/UDP= (sport=3D2048,dport=3D2023)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/TCP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D +=0D +case: MAC_IPV4_TCP_PAYLOAD_priority=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +rule::=0D +=0D + flow create 0 priority 0 ingress pattern eth / ipv4 src is 192.168.0.2= 0 dst is 192.168.0.1 / tcp src is 2048 dst is 2022 / end actions port_repre= sentor port_id 0 / queue index 2 / end=0D + flow create 0 priority 1 ingress pattern eth / ipv4 src is 192.168.0.2= 0 dst is 192.168.0.1 / tcp src is 2048 dst is 2022 / end actions port_repre= sentor port_id 0 / queue index 3 / end / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/TCP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/Raw= ("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.21",dst=3D"192.168.0.1")/TCP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.21",dst=3D"192.168.0.1")/TCP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/TCP= (sport=3D2047,dport=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/TCP= (sport=3D2048,dport=3D2023)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IP(src=3D"192.168.0.20",dst=3D"192.168.0.1")/UDP= (sport=3D2048,dport=3D2022)/Raw("x"*80),=0D +=0D +=0D +case: MAC_IPV6_UDP_PAYLOAD_priority=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +rule::=0D +=0D + flow create 0 priority 0 ingress pattern eth / ipv6 dst is CDCD:910A:2= 222:5498:8475:1111:3900:2020 / udp src is 2048 dst is 2022 / end actions po= rt_representor port_id 0 / rss queues 4 5 end / end=0D + flow create 0 priority 1 ingress pattern eth / ipv6 dst is CDCD:910A:2= 222:5498:8475:1111:3900:2020 / udp src is 2048 dst is 2022 / end actions po= rt_representor port_id 0 / rss queues 6 7 end / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2021")/UDP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=3D2048,dpor= t=3D2023)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=3D2047,dpor= t=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D +=0D +case: MAC_IPV6_TCP_PAYLOAD_priority=0D +=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=0D +=0D +rule::=0D +=0D + flow create 0 priority 0 ingress pattern eth / ipv6 src is CDCD:910A:2= 222:5498:8475:1111:3900:1515 / tcp src is 2048 dst is 2022 / end actions po= rt_representor port_id 0 / queue index 2 / end=0D + flow create 0 priority 1 ingress pattern eth / ipv6 src is CDCD:910A:2= 222:5498:8475:1111:3900:1515 / tcp src is 2048 dst is 2022 / end actions po= rt_representor port_id 0 / queue index 3 / end=0D +=0D +matched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D +=0D +mismatched packets::=0D +=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 516",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D2047,dpor= t=3D2023)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/TCP(sport=3D2048,dpor= t=3D2023)/Raw("x"*80),=0D + Ether(dst=3D{pf_mac})/IPv6(src=3D"CDCD:910A:2222:5498:8475:1111:3900:1= 515",dst=3D"CDCD:910A:2222:5498:8475:1111:3900:2020")/UDP(sport=3D2048,dpor= t=3D2022)/Raw("x"*80),=0D +=0D --=20 2.25.1