[dts] [PATCH] Modify tests/TestSuit_l3fwd.py

Liu, Yong yong.liu at intel.com
Tue Jan 27 02:32:18 CET 2015


Applied, thanks.

> -----Original Message-----
> From: dts [mailto:dts-bounces at dpdk.org] On Behalf Of Xiaonan Zhang
> Sent: Monday, January 26, 2015 2:47 PM
> To: dts at dpdk.org
> Subject: [dts] [PATCH] Modify tests/TestSuit_l3fwd.py
> 
> 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