Add IPv6 support when iperf is used
Change-Id: I95d1d105f8eb46ed5ba4a6b01ef51545b0198788
This commit is contained in:
parent
5c2a5187c2
commit
3637cd3675
@ -40,8 +40,13 @@ class IperfTool(PerfTool):
|
|||||||
def get_server_launch_cmd(self):
|
def get_server_launch_cmd(self):
|
||||||
'''Return the command to launch the server side.'''
|
'''Return the command to launch the server side.'''
|
||||||
# Need 1 server for tcp (port 5001) and 1 for udp (port 5001)
|
# Need 1 server for tcp (port 5001) and 1 for udp (port 5001)
|
||||||
return [self.dest_path + ' -s >/dev/null &',
|
if self.instance.config.ipv6_mode:
|
||||||
self.dest_path + ' -s -u >/dev/null &']
|
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,
|
def run_client(self, target_ip, target_instance,
|
||||||
mss=None, bandwidth=0, bidirectional=False):
|
mss=None, bandwidth=0, bidirectional=False):
|
||||||
@ -113,6 +118,9 @@ class IperfTool(PerfTool):
|
|||||||
if length:
|
if length:
|
||||||
opts += " -l" + str(length)
|
opts += " -l" + str(length)
|
||||||
|
|
||||||
|
if self.instance.config.ipv6_mode:
|
||||||
|
opts += " -V "
|
||||||
|
|
||||||
if udp:
|
if udp:
|
||||||
opts += " -u"
|
opts += " -u"
|
||||||
# for UDP if the bandwidth is not provided we need to calculate
|
# for UDP if the bandwidth is not provided we need to calculate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user