test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ke Xu <ke1.xu@intel.com>
To: dts@dpdk.org
Cc: lijuan.tu@intel.com, yuan.peng@intel.com, qi.fu@intel.com,
	Ke Xu <ke1.xu@intel.com>
Subject: [DTS][PATCH V2 1/4] test_plans/ice_dcf_switch_filter: update existing negative cases to validate represented port action and port representor action
Date: Wed, 21 Dec 2022 18:12:49 +0800	[thread overview]
Message-ID: <20221221101252.59230-2-ke1.xu@intel.com> (raw)
In-Reply-To: <20221221101252.59230-1-ke1.xu@intel.com>

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 <ke1.xu@intel.com>
---
 .../ice_dcf_switch_filter_test_plan.rst       | 470 ++++++++++++++++--
 1 file changed, 440 insertions(+), 30 deletions(-)

diff --git a/test_plans/ice_dcf_switch_filter_test_plan.rst b/test_plans/ice_dcf_switch_filter_test_plan.rst
index a04567b0..fb685ffc 100644
--- a/test_plans/ice_dcf_switch_filter_test_plan.rst
+++ b/test_plans/ice_dcf_switch_filter_test_plan.rst
@@ -2769,11 +2769,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.
+
+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 1::
+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
 
@@ -2787,8 +2890,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.
 
@@ -2811,8 +2982,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]::
 
@@ -2828,8 +2999,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::
 
@@ -2848,8 +3019,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::
 
@@ -2865,8 +3036,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::
 
@@ -2882,12 +3053,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::
 
@@ -2899,8 +3105,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::
 
@@ -2920,7 +3126,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,
@@ -2992,8 +3198,178 @@ Subcase 1: can not create to vf rule on a representor
 
    there is no rule listed.
 
-Subcase 2: unsupported patterns in os default
----------------------------------------------
+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::
+
+     Failed to create parser engine.: Invalid argument
+
+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 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.
 
@@ -3016,8 +3392,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]::
 
@@ -3033,8 +3409,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::
 
@@ -3050,8 +3426,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::
 
@@ -3067,8 +3443,25 @@ 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::
 
@@ -3084,9 +3477,26 @@ 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::
 
      testpmd> flow validate 0 ingress pattern eth / ipv6 src is CDCD:910A:2222:5498:8475:1111:3900:1536 dst is CDCD:910A:2222:5498:8475:1111:3900:2022 tc is 3 / end actions represented_port ethdev_port_id 1 / end
-- 
2.25.1


  reply	other threads:[~2022-12-21 10:15 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-21 10:12 [DTS][PATCH V2 0/4] update existing cases and add new sub-cases to validate port representor action and represented port action Ke Xu
2022-12-21 10:12 ` Ke Xu [this message]
2022-12-21 10:12 ` [DTS][PATCH V2 2/4] test_plans/ice_dcf_switch_filter: update existing TO_VF action cases to cover port representor action from not covered vf original action Ke Xu
2022-12-21 10:12 ` [DTS][PATCH V2 3/4] tests/ice_dcf_switch_filter: " Ke Xu
2022-12-21 10:12 ` [DTS][PATCH V2 4/4] tests/ice_dcf_switch_filter: update existing negative cases to validate represented port action and port representor action Ke Xu
2022-12-22  4:07   ` Peng, Yuan
2022-12-21 10:38 ` [DTS][PATCH V2 0/4] update existing cases and add new sub-cases to validate port representor action and represented port action Xu, Ke1
2022-12-22  7:45 ` Tu, Lijuan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20221221101252.59230-2-ke1.xu@intel.com \
    --to=ke1.xu@intel.com \
    --cc=dts@dpdk.org \
    --cc=lijuan.tu@intel.com \
    --cc=qi.fu@intel.com \
    --cc=yuan.peng@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).