* [dts] [PATCH] Modify tests/TestSuit_l3fwd.py
@ 2015-01-26 6:46 Xiaonan Zhang
2015-01-27 1:32 ` Liu, Yong
0 siblings, 1 reply; 2+ messages in thread
From: Xiaonan Zhang @ 2015-01-26 6:46 UTC (permalink / raw)
To: dts
From: "xiaonanx.zhang" <xiaonanx.zhang@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [dts] [PATCH] Modify tests/TestSuit_l3fwd.py
2015-01-26 6:46 [dts] [PATCH] Modify tests/TestSuit_l3fwd.py Xiaonan Zhang
@ 2015-01-27 1:32 ` Liu, Yong
0 siblings, 0 replies; 2+ messages in thread
From: Liu, Yong @ 2015-01-27 1:32 UTC (permalink / raw)
To: Zhang, XiaonanX, dts
Applied, thanks.
> -----Original Message-----
> From: dts [mailto:dts-bounces@dpdk.org] On Behalf Of Xiaonan Zhang
> Sent: Monday, January 26, 2015 2:47 PM
> To: dts@dpdk.org
> Subject: [dts] [PATCH] Modify tests/TestSuit_l3fwd.py
>
> From: "xiaonanx.zhang" <xiaonanx.zhang@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@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
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-01-27 1:32 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-26 6:46 [dts] [PATCH] Modify tests/TestSuit_l3fwd.py Xiaonan Zhang
2015-01-27 1:32 ` 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).