test suite reviews and discussions
 help / color / mirror / Atom feed
From: Churchill Khangar <churchill.khangar@intel.com>
To: dts@dpdk.org
Cc: venkata.suresh.kumar.p@intel.com, churchill.khangar@intel.com,
	yogesh.jangra@intel.com
Subject: [dts] [PATCH 2/2] tests/pipeline: add new P4 scenario tests
Date: Mon, 17 May 2021 04:14:38 -0400	[thread overview]
Message-ID: <1621239278-48078-3-git-send-email-churchill.khangar@intel.com> (raw)
In-Reply-To: <1621239278-48078-1-git-send-email-churchill.khangar@intel.com>

This patch has the changes to add new tests for covering
more P4 scenarios which involves processing of packets with
IP, VLAN and multiple tables in the P4 pipeline.

Signed-off-by: Churchill Khangar <churchill.khangar@intel.com>
Tested-by: Venkata Suresh Kumar P <venkata.suresh.kumar.p@intel.com>
---
 tests/TestSuite_pipeline.py | 55 ++++++++++++++++++++++++++++++++++++++++++---
 1 file changed, 52 insertions(+), 3 deletions(-)

diff --git a/tests/TestSuite_pipeline.py b/tests/TestSuite_pipeline.py
index d1f4d50..72079fc 100644
--- a/tests/TestSuite_pipeline.py
+++ b/tests/TestSuite_pipeline.py
@@ -4464,11 +4464,11 @@ class TestPipeline(TestCase):
         self.send_and_sniff_pkts(0, 1, in_pcap, out_pcap, "udp")
         self.dut.send_expect("^C", "# ", 20)
 
-    def test_tencent_001(self):
+    def test_u100_001(self):
 
-        cli_file = '/tmp/pipeline/tencent_001/tencent_001.cli'
+        cli_file = '/tmp/pipeline/u100_001/u100_001.cli'
         self.run_dpdk_app(cli_file)
-        base_dir = 'pipeline/tencent_001/pcap_files/'
+        base_dir = 'pipeline/u100_001/pcap_files/'
 
         # TCP Packets
         in_pcap = ['in_1.txt']
@@ -4505,6 +4505,55 @@ class TestPipeline(TestCase):
         self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
         self.dut.send_expect("^C", "# ", 20)
 
+    def test_u100_002(self):
+
+        cli_file = '/tmp/pipeline/u100_002/u100_002.cli'
+        self.run_dpdk_app(cli_file)
+        base_dir = 'pipeline/u100_002/pcap_files/'
+
+        # TCP Packets
+        in_pcap = ['in_1.txt']
+        in_pcap = [base_dir + s for s in in_pcap]
+        out_pcap = ['out_11.txt', 'out_12.txt', 'out_13.txt', 'out_14.txt']
+        out_pcap = [base_dir + s for s in out_pcap]
+        filters = ["tcp", "vlan 16", "vlan 16", "tcp"]
+        tx_port = [0]
+        rx_port = [0, 1, 2, 3]
+        self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
+
+        # UDP Packets
+        in_pcap = ['in_2.txt']
+        in_pcap = [base_dir + s for s in in_pcap]
+        out_pcap = ['out_21.txt', 'out_22.txt', 'out_23.txt', 'out_24.txt']
+        out_pcap = [base_dir + s for s in out_pcap]
+        filters = ["udp port 200", "vlan 16", "vlan 16", "udp port 200"]
+        self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
+
+        # ICMP Packets
+        in_pcap = ['in_3.txt']
+        in_pcap = [base_dir + s for s in in_pcap]
+        out_pcap = ['out_31.txt', 'out_32.txt', 'out_33.txt', 'out_34.txt']
+        out_pcap = [base_dir + s for s in out_pcap]
+        filters = ["icmp", "vlan 16", "vlan 16", "icmp"]
+        self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
+
+        # IGMP Packets
+        in_pcap = ['in_4.txt']
+        in_pcap = [base_dir + s for s in in_pcap]
+        out_pcap = ['out_41.txt', 'out_42.txt', 'out_43.txt', 'out_44.txt']
+        out_pcap = [base_dir + s for s in out_pcap]
+        filters = ["igmp", "vlan 16", "vlan 16", "igmp"] * 4
+        self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
+
+        # IPv6 Packets
+        in_pcap = ['in_5.txt']
+        in_pcap = [base_dir + s for s in in_pcap]
+        out_pcap = ['out_51.txt', 'out_52.txt', 'out_53.txt', 'out_54.txt']
+        out_pcap = [base_dir + s for s in out_pcap]
+        filters = ["tcp"] * 4
+        self.send_and_sniff_multiple(tx_port, rx_port, in_pcap, out_pcap, filters)
+        self.dut.send_expect("^C", "# ", 20)
+
     def tear_down(self):
         """
         Run after each test case.
-- 
1.8.3.1


  parent reply	other threads:[~2021-05-17  8:19 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-17  8:14 [dts] [PATCH 0/2] " Churchill Khangar
2021-05-17  8:14 ` [dts] [PATCH 1/2] dep: add pipeline new test scenarios dependencies Churchill Khangar
2021-05-17  8:14 ` Churchill Khangar [this message]
2021-05-26  8:24 ` [dts] [PATCH 0/2] add new P4 scenario tests 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=1621239278-48078-3-git-send-email-churchill.khangar@intel.com \
    --to=churchill.khangar@intel.com \
    --cc=dts@dpdk.org \
    --cc=venkata.suresh.kumar.p@intel.com \
    --cc=yogesh.jangra@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).