test suite reviews and discussions
 help / color / mirror / Atom feed
* [dts] [PATCH] L3fwd: Enable RFC2544 for some 2 ports cases
@ 2015-12-14  9:36 Ding Heng
  2015-12-17 12:22 ` Liu, Yong
  0 siblings, 1 reply; 2+ messages in thread
From: Ding Heng @ 2015-12-14  9:36 UTC (permalink / raw)
  To: dts; +Cc: Ding Heng

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

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-12-17 12:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-14  9:36 [dts] [PATCH] L3fwd: Enable RFC2544 for some 2 ports cases Ding Heng
2015-12-17 12:22 ` 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).