From patchwork Fri Sep 30 05:46:45 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ke Xu X-Patchwork-Id: 117168 Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF19EA0540; Fri, 30 Sep 2022 07:47:43 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id DA713410FA; Fri, 30 Sep 2022 07:47:43 +0200 (CEST) Received: from mga12.intel.com (mga12.intel.com [192.55.52.136]) by mails.dpdk.org (Postfix) with ESMTP id 389A040E5A for ; Fri, 30 Sep 2022 07:47:42 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1664516862; x=1696052862; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=qMA5TTe+mDVYBCD1bYxZmSgTGbcwfuHwE1doyzY5Rbs=; b=VlQSQb4bWYj7ukgDqiuteQkNv9lVqW+IStBxZFOFtzs+/2RBZeV8y+SD RjTYbPWwjXemL4tOQxv0NxvAyq3nSAUGvPtPvtT9WKx6MHCKa4ajNqqIl ZnqH6kw5zwooJt0goaqmUNibWMbXdu3VfTpGeX2zaSIr9K2L6MLNi59dO cYtEgxbDaj7MXTgbOL0F1h1adiJXN1ViaE8qzqpyakJeqbxBKSIwPxOYo DiT496nz/U6yWpIj/SE3XAnw0NE9zvSIZPTtAesocyqLhQ1Z/6goDTEKP zSaJARtDmyWRgiRxvXVgJ3AutOuh4YgQwOFGz9Fk0YZfNtYcqFQkAUEl6 Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10485"; a="281822349" X-IronPort-AV: E=Sophos;i="5.93,357,1654585200"; d="scan'208";a="281822349" Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 29 Sep 2022 22:47:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10485"; a="748116359" X-IronPort-AV: E=Sophos;i="5.93,357,1654585200"; d="scan'208";a="748116359" Received: from bmca4bf0170a856.sh.intel.com (HELO DPDK-XUKE-LAB.sh.intel.com) ([10.67.115.115]) by orsmga004.jf.intel.com with ESMTP; 29 Sep 2022 22:47:39 -0700 From: Ke Xu To: dts@dpdk.org Cc: qi.fu@intel.com, lijuan.tu@intel.com, Ke Xu Subject: [DTS][PATCH V1 2/4] test_plans/ice_dcf_switch_filter: update existing negative cases to validate represented port action and port representor action Date: Fri, 30 Sep 2022 05:46:45 +0000 Message-Id: <20220930054647.545932-3-ke1.xu@intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220930054647.545932-1-ke1.xu@intel.com> References: <20220930054647.545932-1-ke1.xu@intel.com> MIME-Version: 1.0 X-BeenThere: dts@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: test suite reviews and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dts-bounces@dpdk.org 1. Add second PF with VFs for following cases 2. Add a subcase to validate creating 'represented port' action on a representor 3. Add a subcase to validate creating 'represented port' action on a VF 4. Add a subcase to validate creating 'represented port' action to a VF 5. Add two subcases to validate creating 'represented port' action to DCFs 6. Add a subcase to validate creating 'represented port' action to a representor of another DCF 7. Add a subcase to validate creating 'port representor' action on a representor 8. Add a subcase to validate creating 'port representor' action on a VF 9. Add a subcase to validate creating 'port representor' action to a VF 10. Add a subcase to validate creating 'port representor' action to a representor 11. Add a subcase to validate creating 'port representor' action to another DCF 12. Add a subcase to validate deprecated action 13. Add a subcase to validate using an invalid port id Signed-off-by: Ke Xu --- .../ice_dcf_switch_filter_test_plan.rst | 518 ++++++++++++++++-- 1 file changed, 485 insertions(+), 33 deletions(-) diff --git a/test_plans/ice_dcf_switch_filter_test_plan.rst b/test_plans/ice_dcf_switch_filter_test_plan.rst index 7eab578a..24fc6e4b 100644 --- a/test_plans/ice_dcf_switch_filter_test_plan.rst +++ b/test_plans/ice_dcf_switch_filter_test_plan.rst @@ -183,37 +183,45 @@ Prerequisites 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:: +6. Generate 5 VFs on PF0 and PF1:: echo 4 > /sys/bus/pci/devices/0000:18:00.0/sriov_numvfs + echo 4 > /sys/bus/pci/devices/0000:18:00.1/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 + 0000:18:11.0 'Ethernet Adaptive Virtual Function 1889' if=enp24s2 drv=iavf unused=vfio-pci + 0000:18:11.1 'Ethernet Adaptive Virtual Function 1889' if=enp24s2f1 drv=iavf unused=vfio-pci + 0000:18:11.2 'Ethernet Adaptive Virtual Function 1889' if=enp24s2f2 drv=iavf unused=vfio-pci + 0000:18:11.3 'Ethernet Adaptive Virtual Function 1889' if=enp24s2f3 drv=iavf unused=vfio-pci 7. Set VF0 as trust:: ip link set enp24s0f0 vf 0 trust on + ip link set enp24s0f1 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 + ./usertools/dpdk-devbind.py -b vfio-pci 0000:18:11.0 0000:18:11.1 0000:18:11.2 0000:18:11.3 -9. Launch dpdk on VF0 and VF1, and VF0 request DCF mode, representing VF1 and VF2:: +9. Launch dpdk on VF0, VF1 and VF2 of each PF, and VF0 request DCF mode, representing VF1 and VF2:: ./x86_64-native-linuxapp-gcc/app/dpdk-testpmd -c 0xf -n 4 \ -a 0000:18:01.0,cap=dcf,representor=[1,2] -a 0000:18:01.1 -a 0000:18:01.2 \ + -a 0000:18:11.0,cap=dcf,representor=[1,2] -a 0000:18:11.1 -a 0000:18:01.2 \ -- -i - testpmd> set portlist 3,4 + testpmd> set portlist 3,4,8,9 testpmd> set fwd rxonly testpmd> set verbose 1 testpmd> start testpmd> show port info all - check the VF0 driver is net_ice_dcf. + check the VF0 driver of both PF is net_ice_dcf. 10. on tester side, copy the layer python file to /root:: @@ -2915,11 +2923,114 @@ will not hang and provide a friendly output. Test case: negative cases ========================= +Note: some of the error messages may be different. -Subcase 1: can not create rule on vf 1 --------------------------------------- +Subcase 1: can not create to vf rule on a representor +----------------------------------------------------- + +1. create rule on representor 1 which is at port 1:: + + testpmd> flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 1 + + there is no rule listed. + +Subcase 2: can not create to vf rule on a vf +-------------------------------------------- + +1. create rule on vf 1 which is at port 3:: + + testpmd> flow create 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 3 + + there is no rule listed. -1. create rule on vf 1:: +Subcase 3: can not create to vf rule to a vf +-------------------------------------------- + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 3 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 4: can not create to vf rule to self dcf +------------------------------------------------ + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 0 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 5: can not create to vf rule to another dcf +--------------------------------------------------- + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 5 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 6: can not create to vf rule to a representor of another pf +------------------------------------------------------------------- + +1. create rule on vf 0 of pf 0 which is at port 0, to representor 1 of pf 1 which is at port 6:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 6 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 7: can not create vf original rule on a representor +----------------------------------------------------------- + +1. create rule on representor 1 which is at port 1:: testpmd> flow create 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end @@ -2933,8 +3044,76 @@ Subcase 1: can not create rule on vf 1 there is no rule listed. -Subcase 2: unsupported pattern in os default package ----------------------------------------------------- +Subcase 8: can not create vf original rule on a vf +-------------------------------------------------- + +1. create rule on vf 1 which is at port 3:: + + testpmd> flow create 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 3 + + there is no rule listed. + +Subcase 9: can not create vf original rule to a vf +-------------------------------------------------- + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 3 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 10: can not create vf original rule to a representor +------------------------------------------------------------ + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 11: can not create vf original rule to another dcf +---------------------------------------------------------- + +1. create rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 5 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 12: unsupported pattern in os default package +----------------------------------------------------- 1. load os default package and launch testpmd as step 3-8 in Prerequisites. @@ -2957,8 +3136,8 @@ Subcase 2: unsupported pattern in os default package check the rule not exists in the list. -Subcase 3: unsupported input set --------------------------------- +Subcase 13: unsupported input set +--------------------------------- 1. create an nvgre rule with unsupported input set field [inner tos]:: @@ -2974,8 +3153,8 @@ Subcase 3: unsupported input set check the rule not exists in the list. -Subcase 4: duplicated rules ---------------------------- +Subcase 14: duplicated rules +---------------------------- 1. create a rule:: @@ -2994,8 +3173,8 @@ Subcase 4: duplicated rules check only the first rule exists in the list. -Subcase 5: void action ----------------------- +Subcase 15: void action +----------------------- 1. create a rule with void action:: @@ -3011,8 +3190,8 @@ Subcase 5: void action check the rule not exists in the list. -Subcase 6: unsupported action ------------------------------ +Subcase 16: unsupported action +------------------------------ 1. create a rule with void action:: @@ -3028,12 +3207,47 @@ Subcase 6: unsupported action check the rule not exists in the list. -Subcase 7: void input set value -------------------------------- +Subcase 17: deprecated action +----------------------------- + +1. create a rule with void action:: + + testpmd> flow create 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions vf id 1 / end + + Failed to create flow, report message:: + + Invalid action type: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 18: invalid port id +--------------------------- + +1. create a rule with invalid port id 10:: + + testpmd> flow create 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 20 / end + + Failed to create flow, report message:: + + ice_flow_create(): Failed to create flow + port_flow_complain(): Caught PMD error type 16 (specific action): cause: 0x7fff2c460900, Invalid ethdev_port_id: Invalid argument + +2. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 19: void input set value +-------------------------------- 1. create a rule with void input set value:: - testpmd> flow create 0 ingress pattern eth / ipv4 / end actions vf id 1 / end + testpmd> flow create 0 ingress pattern eth / ipv4 / end actions represented_port ethdev_port_id 1 / end Failed to create flow, report message:: @@ -3045,8 +3259,8 @@ Subcase 7: void input set value check the rule not exists in the list. -Subcase 9: delete a non-existing rule -------------------------------------- +Subcase 20: delete a non-existing rule +-------------------------------------- 1. check the rule list:: @@ -3066,7 +3280,7 @@ Subcase 9: delete a non-existing rule check no error reports. -Subcase 10: add long switch rule +Subcase 21: add long switch rule -------------------------------- Description: A recipe has 5 words, one of which is reserved for switch ID, @@ -3138,6 +3352,12 @@ Subcase 1: can not create to vf rule on a representor there is no rule listed. +Subcase 2: can not create to vf rule on a vf +-------------------------------------------- + +1. validate rule on representor 1 which is at port 3:: + + testpmd> flow validate 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 1 / end get the error message:: @@ -3145,12 +3365,165 @@ Subcase 1: can not create to vf rule on a representor 2. list the rule:: + testpmd> flow list 3 + + there is no rule listed. + +Subcase 3: can not create to vf rule to a vf +-------------------------------------------- + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 3 / end + + get the error message:: + + Failed to create parser engine.: Invalid argument + +2. list the rule:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 4: can not create to vf rule to self dcf +------------------------------------------------ + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 0 / end + + get the error message:: + + Failed to create parser engine.: Invalid argument + +2. list the rule:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 5: can not create to vf rule to another dcf +--------------------------------------------------- + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 5 / end + + get the error message:: + + Failed to create parser engine.: Invalid argument + +2. list the rule:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 6: can not create to vf rule to a representor of another pf +------------------------------------------------------------------- + +1. validate rule on vf 0 of pf 0 which is at port 0, to representor 1 of pf 1 which is at port 6:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions represented_port ethdev_port_id 6 / end + + get the error message:: + + Failed to create parser engine.: Invalid argument + +2. list the rule:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 7: can not create vf original rule on a representor +----------------------------------------------------------- + +1. validate rule on representor 1 which is at port 1:: + + testpmd> flow validate 1 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + testpmd> flow list 1 there is no rule listed. -Subcase 2: unsupported patterns in os default ---------------------------------------------- +Subcase 8: can not create vf original rule on a vf +-------------------------------------------------- + +1. validate rule on vf 1 which is at port 3:: + + testpmd> flow validate 3 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 3 + + there is no rule listed. + +Subcase 9: can not create vf original rule to a vf +-------------------------------------------------- + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 3 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 10: can not create vf original rule to a representor +------------------------------------------------------------ + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 1 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 11: can not create vf original rule to another dcf +---------------------------------------------------------- + +1. validate rule on vf 0 which is at port 0, to vf 1 which is at port 3:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / udp src is 25 dst is 23 / end actions port_representor port_id 5 / end + + Failed to create flow, report message:: + + Failed to create parser engine.: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + there is no rule listed. + +Subcase 12: unsupported patterns in os default +---------------------------------------------- 1. load os default package and launch testpmd as step 3-8 in Prerequisites. @@ -3173,8 +3546,8 @@ Subcase 2: unsupported patterns in os default check the rule not exists in the list. -Subcase 3: unsupported input set --------------------------------- +Subcase 13: unsupported input set +--------------------------------- 1. validate an nvgre rule with unsupported input set field [inner tos]:: @@ -3190,8 +3563,8 @@ Subcase 3: unsupported input set check the rule not exists in the list. -Subcase 4: void action ----------------------- +Subcase 14: void action +----------------------- 1. validate a rule with void action:: @@ -3207,8 +3580,8 @@ Subcase 4: void action check the rule not exists in the list. -Subcase 5: unsupported action ------------------------------ +Subcase 15: unsupported action +------------------------------ 1. validate a rule with void action:: @@ -3224,7 +3597,24 @@ Subcase 5: unsupported action check the rule not exists in the list. -Subcase 6: void input set value +Subcase 16: deprecated action +----------------------------- + +1. validate a rule with deprecated action:: + + testpmd> flow validate 0 ingress pattern eth / ipv4 src is 192.168.0.20 dst is 192.168.0.21 ttl is 2 tos is 4 / end actions vf id 1 / end + + Failed to create flow, report message:: + + Invalid action type: Invalid argument + +2. check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 17: void input set value ------------------------------- 1. validate a rule with void input set value:: @@ -3241,7 +3631,24 @@ Subcase 6: void input set value check the rule not exists in the list. -Subcase 8: long switch rule +Subcase 18: invalid port id +--------------------------- + +1. validate a rule with invalid port id 10:: + + testpmd> flow validate 0 ingress pattern eth dst is 68:05:ca:8d:ed:a8 / ipv4 src is 192.168.0.1 dst is 192.168.0.2 tos is 4 ttl is 3 / tcp src is 25 dst is 23 / end actions represented_port ethdev_port_id 10 / end + + get the error message:: + + Invalid port id: Invalid argument + +3. check the rule list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +Subcase 19: long switch rule --------------------------- 1. validate a rule with input set length longer than 32 bytes:: @@ -3284,6 +3691,51 @@ Subcase 1: DCF stop/DCF start 4. send matched packets, port 3 can't receive the packets. +Test case: VF Original action test +================================== + +1. validate a rule:: + + testpmd> flow validate 0 ingress pattern eth src is 00:00:00:00:00:01 dst is 00:11:22:33:44:55 type is 0x0800 / end actions port_representor port_id 0 / end + + get the message:: + + Flow rule validated + + check the flow list:: + + testpmd> flow list 0 + + check the rule not exists in the list. + +2. create a rule:: + + testpmd> flow create 0 ingress pattern eth src is 00:00:00:00:00:01 dst is 00:11:22:33:44:55 type is 0x0800 / end actions port_representor port_id 0 / end + testpmd> flow list 0 + + check the rule exists in the list. + +3. send matched packets:: + + sendp([Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:55")/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + + check port 0 receive the packet. + send mismatched packets:: + + sendp([Ether(src="00:00:00:00:00:02",dst="00:11:22:33:44:55")/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + sendp([Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:54")/IP()/Raw("x" *80)],iface="enp27s0f0",count=1) + sendp([Ether(src="00:00:00:00:00:01",dst="00:11:22:33:44:55")/IPv6()/Raw("x" *80)],iface="enp27s0f0",count=1) + + check the packets are not to port 0. + +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 0. + Test case: Drop action test ===========================