test suite reviews and discussions
 help / color / mirror / Atom feed
From: "Tu, Lijuan" <lijuan.tu@intel.com>
To: "nareddy@marvell.com" <nareddy@marvell.com>,
	"dts@dpdk.org" <dts@dpdk.org>
Cc: "fmasood@marvell.com" <fmasood@marvell.com>,
	"avijay@marvell.com" <avijay@marvell.com>
Subject: Re: [dts] [PATCH] TestSuite_userspace_ethtool.py: Modified send packet	count to support vector mode
Date: Wed, 5 Jun 2019 05:39:51 +0000	[thread overview]
Message-ID: <8CE3E05A3F976642AAB0F4675D0AD20E0BAA1A0A@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <1559637483-4193-1-git-send-email-nareddy@marvell.com>

Applied, thanks

> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of
> nareddy@marvell.com
> Sent: Tuesday, June 4, 2019 4:38 PM
> To: dts@dpdk.org
> Cc: fmasood@marvell.com; avijay@marvell.com; Praneeth Reddy
> <nareddy@marvell.com>
> Subject: [dts] [PATCH] TestSuite_userspace_ethtool.py: Modified send packet
> count to support vector mode
> 
> From: Praneeth Reddy <nareddy@marvell.com>
> 
> In vector mode minimum of 4 packets are required to forward.
> Added packet count as 4 whenever sending a packet from scapy.
> 
> Signed-off-by: Praneeth Reddy <nareddy@marvell.com>
> ---
>  tests/TestSuite_userspace_ethtool.py | 34 +++++++++++++++++-----------------
>  1 file changed, 17 insertions(+), 17 deletions(-)
> 
> diff --git a/tests/TestSuite_userspace_ethtool.py
> b/tests/TestSuite_userspace_ethtool.py
> index f8428ea..6c19f75 100644
> --- a/tests/TestSuite_userspace_ethtool.py
> +++ b/tests/TestSuite_userspace_ethtool.py
> @@ -297,10 +297,10 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              tester_port = self.tester.get_local_port(port)
>              intf = self.tester.get_interface(tester_port)
>              ori_rx_pkts, ori_tx_pkts = self.strip_portstats(port)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              time.sleep(1)
>              rx_pkts, tx_pkts = self.strip_portstats(port)
> -            self.verify((rx_pkts == (ori_rx_pkts + 1)), "Failed to record Rx/Tx
> packets")
> +            self.verify((rx_pkts == (ori_rx_pkts + 4)), "Failed to
> + record Rx/Tx packets")
> 
>          self.dut.send_expect("quit", "# ")
>          # Check port link down verification result @@ -412,9 +412,9 @@ class
> TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
>              pkt = Packet()
>              tester_port = self.tester.get_local_port(port)
>              intf = self.tester.get_interface(tester_port)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              rx_pkts, tx_pkts = self.strip_portstats(index)
> -            self.verify(rx_pkts == ori_rx_pkts + 1, "Failed to forward after ring
> parameter changed")
> +            self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to forward
> + after ring parameter changed")
>              self.dut.send_expect("quit", "# ")
> 
>      def test_ethtool_vlan(self):
> @@ -444,15 +444,15 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              pkt.config_layer('vlan', {'vlan': vlan})
>              tester_port = self.tester.get_local_port(port)
>              intf = self.tester.get_interface(tester_port)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              rx_pkts, tx_pkts = self.strip_portstats(port)
> -            self.verify(rx_pkts == ori_rx_pkts + 1, "Failed to Rx vlan packet")
> -            self.verify(tx_pkts == ori_tx_pkts + 1, "Failed to Tx vlan packet")
> +            self.verify(rx_pkts == ori_rx_pkts + 4, "Failed to Rx vlan packet")
> +            self.verify(tx_pkts == ori_tx_pkts + 4, "Failed to Tx vlan
> + packet")
> 
>              # send incorrect vlan packet to port
>              wrong_vlan = (vlan + 1) % 4096
>              pkt.config_layer('vlan', {'vlan': wrong_vlan})
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              time.sleep(2)
>              rx_pkts_wrong, tx_pkts_wrong = self.strip_portstats(port)
>              self.verify(tx_pkts_wrong == rx_pkts, "Failed to filter Rx vlan packet")
> @@ -461,7 +461,7 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              self.dut.send_expect("vlan %d del %d" % (index, vlan), "EthApp>")
>              # send same packet and make sure not received
>              pkt.config_layer('vlan', {'vlan': vlan})
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              time.sleep(2)
>              rx_pkts_del, tx_pkts_del = self.strip_portstats(port)
>              self.verify(tx_pkts_del == rx_pkts, "Failed to remove Rx vlan filter")
> @@ -491,9 +491,9 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              intf = self.tester.get_interface(tester_port)
>              # send and sniff packet
>              inst = self.tester.tcpdump_sniff_packets(intf, timeout=5)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              pkts = self.tester.load_tcpdump_sniff_packets(inst)
> -            self.verify(len(pkts) == 1, "Packet not forwarded as expected")
> +            self.verify(len(pkts) == 4, "Packet not forwarded as
> + expected")
>              src_mac = pkts[0].strip_layer_element("layer2", "src")
>              self.verify(src_mac == valid_mac, "Forwarded packet not match
> default mac")
> 
> @@ -525,7 +525,7 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>              pkt = Packet()
>              tester_port = self.tester.get_local_port(port)
>              intf = self.tester.get_interface(tester_port)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              rx_pkts, tx_pkts = self.strip_portstats(index)
>              self.verify(rx_pkts == ori_rx_pkts, "Failed to stop port")
>              # restart port and check packet can normally forwarded @@ -534,10
> +534,10 @@ class TestUserspaceEthtool(TestCase, IxiaPacketGenerator):
>              # wait few time for port ready
>              rx_pkts, tx_pkts = self.strip_portstats(index)
>              time.sleep(2)
> -            pkt.send_pkt(tx_port=intf)
> +            pkt.send_pkt(tx_port=intf, count=4)
>              rx_pkts_open, tx_pkts_open = self.strip_portstats(index)
> -            self.verify(rx_pkts_open == rx_pkts + 1, "Failed to reopen port rx")
> -            self.verify(tx_pkts_open == tx_pkts + 1, "Failed to reopen port tx")
> +            self.verify(rx_pkts_open == rx_pkts + 4, "Failed to reopen port rx")
> +            self.verify(tx_pkts_open == tx_pkts + 4, "Failed to reopen
> + port tx")
> 
>          self.dut.send_expect("quit", "# ")
> 
> @@ -565,11 +565,11 @@ class TestUserspaceEthtool(TestCase,
> IxiaPacketGenerator):
>                  ori_rx_pkts, _ = self.strip_portstats(index)
>                  pkt_size = mtu + HEADER_SIZE['eth']
>                  pkt = Packet(pkt_len=pkt_size)
> -                pkt.send_pkt(tx_port=intf)
> +                pkt.send_pkt(tx_port=intf, count=4)
>                  rx_pkts, _ = self.strip_portstats(index)
>                  self.verify(rx_pkts == ori_rx_pkts + 1, "Packet match mtu not
> forwarded as expected")
>                  pkt = Packet(pkt_len=mtu + 1 + HEADER_SIZE['eth'])
> -                pkt.send_pkt(tx_port=intf)
> +                pkt.send_pkt(tx_port=intf, count=4)
>                  rx_pkts_over, _ = self.strip_portstats(index)
>                  self.verify(rx_pkts == rx_pkts_over, "Packet over mtu should not be
> forwarded")
> 
> --
> 1.8.3.1


      reply	other threads:[~2019-06-05  5:39 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-06-04  8:38 nareddy
2019-06-05  5:39 ` 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=8CE3E05A3F976642AAB0F4675D0AD20E0BAA1A0A@SHSMSX101.ccr.corp.intel.com \
    --to=lijuan.tu@intel.com \
    --cc=avijay@marvell.com \
    --cc=dts@dpdk.org \
    --cc=fmasood@marvell.com \
    --cc=nareddy@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).