test suite reviews and discussions
 help / color / mirror / Atom feed
From: Ding Heng <hengx.ding@intel.com>
To: dts@dpdk.org
Cc: Ding Heng <hengx.ding@intel.com>
Subject: [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test.
Date: Wed,  4 Nov 2015 14:05:47 +0800	[thread overview]
Message-ID: <1446617147-7401-1-git-send-email-hengx.ding@intel.com> (raw)

Configure different flows for different port.

Signed-off-by: Ding Heng <hengx.ding@intel.com>

diff --git a/tests/TestSuite_tso.py b/tests/TestSuite_tso.py
index 392157f..5bd8592 100644
--- a/tests/TestSuite_tso.py
+++ b/tests/TestSuite_tso.py
@@ -306,14 +306,7 @@ class TestTSO(TestCase):
 
         # prepare traffic generator input
         tgen_input = []
-        tgen_input.append((self.tester.get_local_port(self.dut_ports[0]),
-                           self.tester.get_local_port(self.dut_ports[1]),
-                           "test.pcap"))
-        tgen_input.append((self.tester.get_local_port(self.dut_ports[1]),
-                           self.tester.get_local_port(self.dut_ports[0]),
-                           "test.pcap"))
 
-        mac = self.dut.get_mac_address(self.dut_ports[0])
         # run testpmd for each core config
         for test_cycle in self.test_cycles:
             core_config = test_cycle['cores']
@@ -331,8 +324,7 @@ class TestTSO(TestCase):
             dts.report(info, annex=True)
             dts.report(command_line + "\n\n", frame=True, annex=True)
 
-            self.dut.send_expect(cmd, "testpmd> ", 120)
-            self.dut.send_expect("set verbose 1", "testpmd> ", 120)
+            self.dut.send_expect(command_line, "testpmd> ", 120)
             self.dut.send_expect("csum set ip hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set udp hw %d" % self.dut_ports[0], "testpmd> ", 120)
             self.dut.send_expect("csum set tcp hw %d" % self.dut_ports[0], "testpmd> ", 120)
@@ -354,7 +346,11 @@ class TestTSO(TestCase):
                 # create pcap file
                 self.logger.info("Running with frame size %d " % frame_size)
                 payload_size = frame_size - self.headers_size
-                self.tester.scapy_append('wrpcap("test.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (mac, payload_size))
+		for _port in range(2):
+			mac = self.dut.get_mac_address(self.dut_ports[_port])
+                	self.tester.scapy_append('wrpcap("dst%d.pcap", [Ether(dst="%s",src="52:00:00:00:00:01")/IP(src="192.168.1.1",dst="192.168.1.2")/TCP(sport=1021,dport=1021)/("X"*%d)])' % (_port, mac, payload_size))
+        		tgen_input.append((self.tester.get_local_port(self.dut_ports[_port]),
+                           self.tester.get_local_port(self.dut_ports[1-_port]), "dst%d.pcap") % _port)
                 self.tester.scapy_execute()
 
                 # run traffic generator
-- 
1.9.3

             reply	other threads:[~2015-11-04  6:05 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-04  6:05 Ding Heng [this message]
2015-11-04  7:06 ` Liu, Yong

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=1446617147-7401-1-git-send-email-hengx.ding@intel.com \
    --to=hengx.ding@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).