From: zhaomeijuan <meijuanx.zhao@intel.com>
To: dts@dpdk.org
Cc: zhaomeijuan <meijuanx.zhao@intel.com>
Subject: [dts] [PATCH V2] tests/checksum offload: add send flow
Date: Tue, 2 Apr 2019 15:45:40 +0000 [thread overview]
Message-ID: <20190402154540.44494-1-meijuanx.zhao@intel.com> (raw)
add send packet flow
Signed-off-by: zhaomeijuan <meijuanx.zhao@intel.com>
---
tests/TestSuite_checksum_offload.py | 17 ++++++++++++-----
1 file changed, 12 insertions(+), 5 deletions(-)
diff --git a/tests/TestSuite_checksum_offload.py b/tests/TestSuite_checksum_offload.py
index 6541ba5..3933562 100644
--- a/tests/TestSuite_checksum_offload.py
+++ b/tests/TestSuite_checksum_offload.py
@@ -361,17 +361,21 @@ class TestChecksumOffload(TestCase):
Pps = dict()
Pct = dict()
dmac = self.dut.get_mac_address(self.dut_ports[0])
+ dmac1 = self.dut.get_mac_address(self.dut_ports[1])
result = [2, lcore, ptype, mode]
for size in size_list:
flow = flow_format % (dmac, size)
self.tester.scapy_append('wrpcap("test.pcap", [%s])' % flow)
self.tester.scapy_execute()
+ flow = flow_format % (dmac1, size)
+ self.tester.scapy_append('wrpcap("test1.pcap", [%s])' % flow)
+ self.tester.scapy_execute()
tgenInput = []
tgenInput.append(
(self.tester.get_local_port(self.dut_ports[0]), self.tester.get_local_port(self.dut_ports[1]), "test.pcap"))
tgenInput.append(
- (self.tester.get_local_port(self.dut_ports[1]), self.tester.get_local_port(self.dut_ports[0]), "test.pcap"))
+ (self.tester.get_local_port(self.dut_ports[1]), self.tester.get_local_port(self.dut_ports[0]), "test1.pcap"))
Bps[str(size)], Pps[
str(size)] = self.tester.traffic_generator_throughput(tgenInput)
self.verify(Pps[str(size)] > 0, "No traffic detected")
@@ -390,7 +394,7 @@ class TestChecksumOffload(TestCase):
"""
# Verify that enough ports are available
self.verify(len(self.dut_ports) >= 2, "Insufficient ports for testing")
-
+ self.dut.send_expect("quit", "#")
# sizes = [64, 128, 256, 512, 1024]
sizes = [64, 128]
pkts = {'IP/UDP': 'Ether(dst="%s", src="52:00:00:00:00:00")/IP()/UDP()/("X"*(%d-46))',
@@ -406,16 +410,19 @@ class TestChecksumOffload(TestCase):
portMask = utils.create_mask([self.dut_ports[0], self.dut_ports[1]])
for mode in ["sw", "hw"]:
self.logger.info("%s performance" % mode)
- rst.write_text(mode + " Performance" + '\r\n')
+ #rst.write_text(mode + " Performance" + '\r\n')
tblheader = ["Ports", "S/C/T", "Packet Type", "Mode"]
for size in sizes:
tblheader.append("%sB mpps" % str(size))
tblheader.append("%sB %% " % str(size))
self.result_table_create(tblheader)
+ #self.pmdout.start_testpmd(
+ # lcore, "--portmask=%s" % self.portMask, socket=self.ports_socket)
self.pmdout.start_testpmd(
- lcore, "--portmask=%s" % self.portMask, socket=self.ports_socket)
+ lcore, "--portmask=%s" % self.portMask + " --enable-rx-cksum " +
+ "--port-topology=loop", socket=self.ports_socket)
- self.dut.send_expect("set verbose 1", "testpmd> ")
+ #self.dut.send_expect("set verbose 1", "testpmd> ")
self.dut.send_expect("set fwd csum", "testpmd> ")
if mode == "hw":
self.checksum_enablehw(self.dut_ports[0])
--
2.17.1
next reply other threads:[~2019-04-02 8:43 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-04-02 15:45 zhaomeijuan [this message]
2019-04-03 18:05 ` 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=20190402154540.44494-1-meijuanx.zhao@intel.com \
--to=meijuanx.zhao@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).