* [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test.
@ 2015-11-04 6:05 Ding Heng
2015-11-04 7:06 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Ding Heng @ 2015-11-04 6:05 UTC (permalink / raw)
To: dts; +Cc: Ding Heng
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test.
2015-11-04 6:05 [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test Ding Heng
@ 2015-11-04 7:06 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2015-11-04 7:06 UTC (permalink / raw)
To: Ding Heng, dts
Hi Heng,
Your patch look good for me. But i failed to applied it in for patch
format issue. Could you check it and resend your patch? Thanks.
On 11/04/2015 02:05 PM, Ding Heng wrote:
> 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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-11-04 7:05 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-04 6:05 [dts] [PATCH] TestSuite_tso: Fix only one port could receive packet issue in performance test Ding Heng
2015-11-04 7:06 ` Liu, Yong
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).