test suite reviews and discussions
 help / color / mirror / Atom feed
From: Lunyuan Cui <lunyuanx.cui@intel.com>
To: dts@dpdk.org
Cc: Lunyuan Cui <lunyuanx.cui@intel.com>
Subject: [dts] [PATCH V1 1/2] test_plans/generic_flow_api: add l2 mac addr fdir filter test plan
Date: Tue, 31 Mar 2020 07:08:46 +0000	[thread overview]
Message-ID: <20200331070847.17395-2-lunyuanx.cui@intel.com> (raw)
In-Reply-To: <20200331070847.17395-1-lunyuanx.cui@intel.com>

FVL enable src MAC address and dst MAC address as FDIR's input set
for ipv4-other. Add test plan for it.

Signed-off-by: Lunyuan Cui <lunyuanx.cui@intel.com>
---
 test_plans/generic_flow_api_test_plan.rst | 266 ++++++++++++++++++++++
 1 file changed, 266 insertions(+)

diff --git a/test_plans/generic_flow_api_test_plan.rst b/test_plans/generic_flow_api_test_plan.rst
index 380d9e8..a3f49fb 100644
--- a/test_plans/generic_flow_api_test_plan.rst
+++ b/test_plans/generic_flow_api_test_plan.rst
@@ -1423,3 +1423,269 @@ Test case: igb flexbytes
     testpmd> flow list 0
     testpmd> flow flush 0
     testpmd> flow list 0
+
+Test case: fdir_L2_mac_filter
+=============================
+    Prerequisites:
+
+    bind the PF to dpdk driver::
+        ./usertools/dpdk-devbind.py -b igb_uio 0000:81:00.0
+
+    launch testpmd::
+        ./x86_64-native-linuxapp-gcc/app/testpmd -l 0-3 -n 4 -w 0000:81:00.0 -- -i --rxq=4 --txq=4
+
+1. basic test
+
+    1) validate a rule::
+        testpmd> flow validate 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+
+        Verify the commend can validete::
+            Flow rule validated
+
+    2) create a rule::
+        testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        send packets not match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    3) list the rule::
+        testpmd> flow list 0
+
+        Verify there are one rule.
+
+    4) destory the rule::
+        testpmd> flow destroy 0 rule 0
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    5) list the rule::
+        testpmd> flow list 0
+
+        Verify there are no rule.
+
+    6) validate a rule::
+        testpmd> flow validate 0 ingress pattern eth src is 99:99:99:99:99:99 / ipv4 / end actions mark id 1 / rss / end
+
+        Verify the commend can validete::
+            Flow rule validated
+
+    7) create a rule::
+        testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 / ipv4 / end actions mark id 1 / rss / end
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        send packets not match rule 0::
+            sendp(Ether(src='88:88:88:88:88:88',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    8) list the rule::
+        testpmd> flow list 0
+
+        Verify there are one rule.
+
+    9) destory the rule::
+        testpmd> flow destroy 0 rule 0
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    10) list the rule::
+        testpmd> flow list 0
+
+        Verify there are no rule.
+
+    11) validate a rule::
+        testpmd> flow validate 0 ingress pattern eth src is 99:99:99:99:99:99 dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+
+        Verify the commend can validete::
+            Flow rule validated
+
+    12) create a rule::
+        testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        send packets not match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(src='88:88:88:88:88:88',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(src='88:88:88:88:88:88',dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    13) list the rule::
+        testpmd> flow list 0
+
+        Verify there are one rule.
+
+    14) destory the rule::
+        testpmd> flow destroy 0 rule 0
+
+        send packets match rule 0::
+            sendp(Ether(src='99:99:99:99:99:99',dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    15) list the rule::
+        testpmd> flow list 0
+
+        Verify there are no rule.
+
+2. complex test
+
+    1) create rules and destory the first::
+        create three rules::
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 22:22:22:22:22:22 / ipv4 / end actions mark id 2 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 33:33:33:33:33:33 / ipv4 / end actions mark id 3 / rss / end
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are three rules.
+
+        send packets::
+            sendp(Ether(dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='33:33:33:33:33:33')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        destory the first rule::
+            testpmd> flow destroy 0 rule 0
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are rule 1 and rule 2.
+
+        send packets match rule 0::
+            sendp(Ether(dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+        send packets match rule 1 and rule 2::
+            sendp(Ether(dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='33:33:33:33:33:33')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        flush rules::
+            testpmd> flow flush 0
+
+        send packets match rule 0, rule 1 and rule 2::
+            sendp(Ether(dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='33:33:33:33:33:33')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+    2) create rules and destory the second::
+        create three rules::
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 22:22:22:22:22:22 / ipv4 / end actions mark id 2 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 33:33:33:33:33:33 / ipv4 / end actions mark id 3 / rss / end
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are three rules.
+
+        destory the second rule::
+            testpmd> flow destroy 0 rule 1
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are rule 0 and rule 2.
+
+        send packets match rule 1::
+            sendp(Ether(dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+        send packets match rule 0 and rule 2::
+            sendp(Ether(dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='33:33:33:33:33:33')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+        flush rules::
+            testpmd> flow flush 0
+
+   3) create rules and destory the third::
+        create three rules::
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 22:22:22:22:22:22 / ipv4 / end actions mark id 2 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 33:33:33:33:33:33 / ipv4 / end actions mark id 3 / rss / end
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are three rules.
+
+        destory the second rule::
+            testpmd> flow destroy 0 rule 2
+
+        list the rules::
+            testpmd> flow list 0
+
+        Verify there are rule 0 and rule 1.
+
+        send packets match rule 2::
+            sendp(Ether(dst='33:33:33:33:33:33')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can not mark.
+
+        send packets match rule 0 and rule 1::
+            sendp(Ether(dst='11:11:11:11:11:11')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+            sendp(Ether(dst='22:22:22:22:22:22')/IP(src=RandIP(),dst='2.2.2.5')/"Hello!0",iface="enp129s0f1")
+
+        Verify all packets can rss and mark.
+
+3. negative test
+
+    1) ip in command::
+        creat rule::
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 dst is 1.1.1.1 / end actions mark id 2 / rss / end
+            Verify rule can not be created.
+
+    2) kinds rule conflict::
+        creat rule::
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 3 / rss / end
+            testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 / ipv4 / end actions mark id 1 / rss / end
+            Verify second rule can not be created.
+
+        flush rules::
+            testpmd> flow flush 0
+
+        creat rule::
+            testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 / ipv4 / end actions mark id 1 / rss / end
+            testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+        Verify second rule can not be created.
+
+        flush rules::
+            testpmd> flow flush 0
+
+        creat rule::
+            testpmd> flow create 0 ingress pattern eth src is 99:99:99:99:99:99 dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 1 / rss / end
+            testpmd> flow create 0 ingress pattern eth dst is 11:11:11:11:11:11 / ipv4 / end actions mark id 3 / rss / end
+        Verify second rule can not be created.
-- 
2.17.1


  reply	other threads:[~2020-03-31  7:22 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-31  7:08 [dts] [PATCH V1 0/2] add l2 mac addr fdir filter test Lunyuan Cui
2020-03-31  7:08 ` Lunyuan Cui [this message]
2020-03-31  7:08 ` [dts] [PATCH V1 2/2] tests/TestSuite_generic_flow_api: add l2 mac addr fdir filter test case Lunyuan Cui

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=20200331070847.17395-2-lunyuanx.cui@intel.com \
    --to=lunyuanx.cui@intel.com \
    --cc=dts@dpdk.org \
    /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).