From: Ding Heng <hengx.ding@intel.com>
To: dts@dpdk.org
Cc: Ding Heng <hengx.ding@intel.com>
Subject: [dts] [PATCH] L3fwd: Enable RFC2544 for some 2 ports cases
Date: Mon, 14 Dec 2015 17:36:15 +0800 [thread overview]
Message-ID: <1450085775-1980-1-git-send-email-hengx.ding@intel.com> (raw)
Enable RFC2544 test for l3fwd 2 ports cases. In order to save time, only
1S/1C/1T and 1S/4C/1T cases will be enabled, the others' result will be set 0.
Signed-off-by: Ding Heng <hengx.ding@intel.com>
diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py
index 0e09256..ea4e3ca 100644
--- a/tests/TestSuite_l3fwd.py
+++ b/tests/TestSuite_l3fwd.py
@@ -521,7 +521,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator):
L3fwd main 2 ports.
"""
- header_row = ["Frame", "Ports", "S/C/T", "Mpps", "% linerate", "mode"]
+ header_row = ["Frame", "mode", "S/C/T", "Mpps", "% linerate", "LR_tx_pkts(2mins)", "LR_rx_pkts(2mins)", "LR_loss_pkts(2mins)", "% zero_loss_rate"]
self.l3fwd_test_results['header'] = header_row
dts.results_table_add_header(header_row)
self.l3fwd_test_results['data'] = []
@@ -533,7 +533,7 @@ class TestL3fwd(TestCase,IxiaPacketGenerator):
HEADER_SIZE['ip'] - HEADER_SIZE['eth']
for _port in range(2):
dmac = self.dut.get_mac_address(valports[_port])
- flows = ['Ether(dst=%s)/%s/("X"*%d)' % (dmac, flow, payload_size) for flow in self.flows()[_port *2:(_port +1)*2]]
+ flows = ['Ether(dst="%s")/%s/("X"*%d)' % (dmac, flow, payload_size) for flow in self.flows()[_port *2:(_port +1)*2]]
self.tester.scapy_append('wrpcap("dst%d.pcap", [%s])' %(valports[_port],string.join(flows,',')))
self.tester.scapy_execute()
@@ -605,13 +605,18 @@ class TestL3fwd(TestCase,IxiaPacketGenerator):
pps /= 1000000.0
linerate = self.wirespeed(self.nic, frame_size, 2)
pct = pps * 100 / linerate
+ if mode == "lpm" and (cores == "1S/1C/1T" or cores == "1S/4C/1T"):
+ zero_loss_rate, tx_pkts, rx_pkts = self.tester.run_rfc2544(tgenInput, delay=3)
+ loss_pkts = tx_pkts - rx_pkts
+ else:
+ zero_loss_rate=tx_pkts=rx_pkts=loss_pkts=0
index += 1
# Stop l3fwd
self.dut.send_expect("^C", "#")
- data_row = [frame_size, 2, cores, str(pps), str(pct), mode]
+ data_row = [frame_size, mode, cores, str(pps), str(pct), tx_pkts, rx_pkts, loss_pkts, zero_loss_rate]
dts.results_table_add_row(data_row)
self.l3fwd_test_results['data'].append(data_row)
--
1.9.3
next reply other threads:[~2015-12-14 9:38 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-12-14 9:36 Ding Heng [this message]
2015-12-17 12:22 ` 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=1450085775-1980-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).