From 3637cd3675a13f7081793c58038acde42c5f868f Mon Sep 17 00:00:00 2001 From: Yichen Wang Date: Tue, 3 Apr 2018 16:36:48 -0700 Subject: [PATCH] Add IPv6 support when iperf is used Change-Id: I95d1d105f8eb46ed5ba4a6b01ef51545b0198788 --- vmtp/iperf_tool.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/vmtp/iperf_tool.py b/vmtp/iperf_tool.py index dd168dd..d0fb7aa 100644 --- a/vmtp/iperf_tool.py +++ b/vmtp/iperf_tool.py @@ -40,8 +40,13 @@ class IperfTool(PerfTool): def get_server_launch_cmd(self): '''Return the command to launch the server side.''' # Need 1 server for tcp (port 5001) and 1 for udp (port 5001) - return [self.dest_path + ' -s >/dev/null &', - self.dest_path + ' -s -u >/dev/null &'] + if self.instance.config.ipv6_mode: + return [self.dest_path + ' -s -V >/dev/null &', + self.dest_path + ' -s -u -V >/dev/null &'] + else: + return [self.dest_path + ' -s >/dev/null &', + self.dest_path + ' -s -u >/dev/null &'] + def run_client(self, target_ip, target_instance, mss=None, bandwidth=0, bidirectional=False): @@ -113,6 +118,9 @@ class IperfTool(PerfTool): if length: opts += " -l" + str(length) + if self.instance.config.ipv6_mode: + opts += " -V " + if udp: opts += " -u" # for UDP if the bandwidth is not provided we need to calculate