test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "pvukkisala@marvell.com" <pvukkisala@marvell.com>,
	"dts@dpdk.org" <dts@dpdk.org>
Cc: "avijay@marvell.com" <avijay@marvell.com>,
	"fmasood@marvell.com" <fmasood@marvell.com>
Subject: Re: [dts] [PATCH] pmd: Add test case packet checking in scalar mode for	marvell device
Date: Wed, 4 Sep 2019 05:16:52 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BB1BF3D@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1566888508-5477-1-git-send-email-pvukkisala@marvell.com>

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> pvukkisala@marvell.com
> Sent: Tuesday, August 27, 2019 2:48 PM
> To: dts@dpdk.org
> Cc: avijay@marvell.com; fmasood@marvell.com; Phanendra Vukkisala
> <pvukkisala@marvell.com>
> Subject: [dts] [PATCH] pmd: Add test case packet checking in scalar mode for
> marvell device
> 
> From: Phanendra Vukkisala <pvukkisala@marvell.com>
> 
> Updated testplan, test script and support list.
> 
> Signed-off-by: Phanendra Vukkisala <pvukkisala@marvell.com>
> ---
>  conf/test_case_supportlist.json |   16 +++++++++++++++
>  test_plans/pmd_test_plan.rst    |   15 ++++++++++++++
>  tests/TestSuite_pmd.py          |   41 ++++++++++++++++++++++++++++++++----
> ---
>  3 files changed, 65 insertions(+), 7 deletions(-)
> 
> diff --git a/conf/test_case_supportlist.json b/conf/test_case_supportlist.json
> index f547b32..9c39f33 100644
> --- a/conf/test_case_supportlist.json
> +++ b/conf/test_case_supportlist.json
> @@ -1612,5 +1612,21 @@
>              "Bug ID": "",
>              "Comments": "This case currently support for niantic "
>          }
> +    ],
> +    "packet_checking_scalar_mode": [
> +        {
> +            "OS": [
> +                "ALL"
> +            ],
> +            "NIC": [
> +                "cavium_a064",
> +                "cavium_a063"
> +            ],
> +            "Target": [
> +                "ALL"
> +            ],
> +            "Bug ID": "",
> +            "Comments": "This case currently support for cavium_a063 and
> cavium_a064 "
> +        }
>      ]
>  }
> diff --git a/test_plans/pmd_test_plan.rst b/test_plans/pmd_test_plan.rst
> index a077cfa..f84fa55 100644
> --- a/test_plans/pmd_test_plan.rst
> +++ b/test_plans/pmd_test_plan.rst
> @@ -92,6 +92,21 @@ Test Case: Packet Checking
>     which will be forwarded by the DUT. The test checks if the packets are
> correctly forwarded and
>     if both RX and TX packet sizes match by `show port all stats`
> 
> +Test Case: Packet Checking in scalar mode
> +=========================================
> +
> +The linuxapp is started with the following parameters:
> +
> +::
> +  -c 0x6 -n 4 -w <devid>,scalar_enable=1  -- -i --portmask=<portmask>
> +
> +
> +This test is applicable for Marvell devices. The tester sends 1 packet
> +at a time with different sizes (64, 65, 128, 256, 512, 1024, 1280 and
> +1518 bytes), using scapy, which will be forwarded by the DUT. The test
> +checks if the packets are correctly forwarded and if both RX and TX packet
> sizes match.
> +
> +
>  Test Case: Descriptors Checking
>  ===============================
> 
> diff --git a/tests/TestSuite_pmd.py b/tests/TestSuite_pmd.py index
> dc9078f..46141d6 100644
> --- a/tests/TestSuite_pmd.py
> +++ b/tests/TestSuite_pmd.py
> @@ -386,6 +386,29 @@ class TestPmd(TestCase):
>          self.dut.send_expect("quit", "# ", 30)
>          sleep(5)
> 
> +    def test_packet_checking_scalar_mode(self):
> +        """
> +        Packet forwarding checking test
> +        """
> +
> +        self.dut.kill_all()
> +
> +        port_mask = utils.create_mask([self.dut_ports[0],
> + self.dut_ports[1]])
> +
> +        eal_opts = ""
> +        for port in self.dut_ports:
> +            eal_opts += "-w %s,scalar_enable=1
> + "%(self.dut.get_port_pci(self.dut_ports[port]))
> +
> +
> +        self.pmdout.start_testpmd("1S/2C/1T", "--portmask=%s" % port_mask,
> eal_param = eal_opts, socket=self.ports_socket)
> +        self.dut.send_expect("start", "testpmd> ")
> +        for size in self.frame_sizes:
> +            self.send_packet(size, scalar_test=True)
> +
> +        self.dut.send_expect("stop", "testpmd> ")
> +        self.dut.send_expect("quit", "# ", 30)
> +        sleep(5)
> +
>      def stop_and_get_l4csum_errors(self):
>          """
>          Stop forwarding and get Bad-l4csum number from stop statistic @@ -
> 406,7 +429,7 @@ class TestPmd(TestCase):
>          stats = self.pmdout.get_pmd_stats(portid)
>          return stats
> 
> -    def send_packet(self, frame_size, checksum_test=False):
> +    def send_packet(self, frame_size, checksum_test=False, scalar_test=False):
>          """
>          Send 1 packet to portid
>          """
> @@ -428,10 +451,14 @@ class TestPmd(TestCase):
>          if checksum_test:
>              checksum = 'chksum=0x1'
> 
> +        if scalar_test:
> +            pkt_count = 1
> +        else:
> +            pkt_count = 4
>          self.tester.scapy_foreground()
>          self.tester.scapy_append('nutmac="%s"' % mac)
> -        self.tester.scapy_append('sendp([Ether(dst=nutmac,
> src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)],
> iface="%s", count=4)' % (
> -            load_size, checksum, padding, interface))
> +        self.tester.scapy_append('sendp([Ether(dst=nutmac,
> src="52:00:00:00:00:00")/IP(len=%s)/UDP(%s)/Raw(load="\x50"*%s)],
> iface="%s", count=%s)' % (
> +            load_size, checksum, padding, interface, pkt_count))
> 
>          out = self.tester.scapy_execute()
>          time.sleep(.5)
> @@ -452,11 +479,11 @@ class TestPmd(TestCase):
>          self.verify(self.pmdout.check_tx_bytes(p0tx_pkts, p1rx_pkts),
>                      "packet pass assert error, %d RX packets, %d TX packets" %
> (p1rx_pkts, p0tx_pkts))
> 
> -        self.verify(p1rx_bytes == (frame_size - 4)*4,
> -                    "packet pass assert error, expected %d RX bytes, actual %d" %
> ((frame_size - 4)*4, p1rx_bytes))
> +        self.verify(p1rx_bytes == (frame_size - 4)*pkt_count,
> +                    "packet pass assert error, expected %d RX bytes,
> + actual %d" % ((frame_size - 4)*pkt_count, p1rx_bytes))
> 
> -        self.verify(self.pmdout.check_tx_bytes(p0tx_bytes, (frame_size - 4)*4),
> -                    "packet pass assert error, expected %d TX bytes, actual %d" %
> ((frame_size - 4)*4, p0tx_bytes))
> +        self.verify(self.pmdout.check_tx_bytes(p0tx_bytes, (frame_size -
> 4)*pkt_count),
> +                    "packet pass assert error, expected %d TX bytes,
> + actual %d" % ((frame_size - 4)*pkt_count, p0tx_bytes))
> 
>          return out
> 
> --
> 1.7.9.5


      reply	other threads:[~2019-09-04  5:16 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-27  6:48 pvukkisala
2019-09-04  5:16 ` Tu, Lijuan [this message]

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=8CE3E05A3F976642AAB0F4675D0AD20E0BB1BF3D@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=avijay@marvell.com \
    --cc=dts@dpdk.org \
    --cc=fmasood@marvell.com \
    --cc=pvukkisala@marvell.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).