[dts] [PATCH] Modify tests/TestSuit_l3fwd.py
Xiaonan Zhang
xiaonanx.zhang at intel.com
Mon Jan 26 07:46:57 CET 2015
From: "xiaonanx.zhang" <xiaonanx.zhang at intel.com>
use ixia to config stream sourceIpAddrMode and ipProtocol
to make sure source addr random and ip ipProtocol is raw.
add ip function for get fortville better performance.
Signed-off-by: xiaonanx.zhang <xiaonanx.zhang at intel.com>
---
tests/TestSuite_l3fwd.py | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/tests/TestSuite_l3fwd.py b/tests/TestSuite_l3fwd.py
index 0e7df85..64f0f32 100644
--- a/tests/TestSuite_l3fwd.py
+++ b/tests/TestSuite_l3fwd.py
@@ -610,6 +610,21 @@ class TestL3fwd(TestCase):
self.plot_2_ports()
dts.results_table_print()
+ def ip(self, port, frag, src, proto, tos, dst, chksum, len, options, version, flags, ihl, ttl, id):
+ self.add_tcl_cmd("protocol config -name ip")
+ self.add_tcl_cmd('ip config -sourceIpAddr "%s"' % src)
+ self.add_tcl_cmd("ip config -sourceIpAddrMode ipRandom")
+ self.add_tcl_cmd('ip config -destIpAddr "%s"' % dst)
+ self.add_tcl_cmd("ip config -destIpAddrMode ipIdle")
+ self.add_tcl_cmd("ip config -ttl %d" % ttl)
+ self.add_tcl_cmd("ip config -totalLength %d" % len)
+ self.add_tcl_cmd("ip config -fragment %d" % frag)
+ self.add_tcl_cmd("ip config -ipProtocol ipV4ProtocolReserved255")
+ self.add_tcl_cmd("ip config -identifier %d" % id)
+ self.add_tcl_cmd("stream config -framesize %d" % (len + 18))
+ self.add_tcl_cmd("ip set %d %d %d" % (self.chasId, port['card'], port['port']))
+
+
def tear_down(self):
"""
Run after each test case.
--
1.9.3
More information about the dts
mailing list