4g: Pass max bitrate to iperf3
Otherwise bitrate 0 (unlimited) does weird stuff, like iperf3 hanging forever in DL. Change-Id: I631243cce132923d9024f8161cf96161c51cdae5
This commit is contained in:
parent
f4ab97fb4a
commit
d84a8387be
|
@ -20,8 +20,10 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=True)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_DL, ue.netns())
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_DL, ue.netns(), bitrate=max_rate)
|
||||
|
||||
print('waiting for UE to attach...')
|
||||
wait(ue.is_connected, None)
|
||||
|
@ -34,7 +36,6 @@ iperf3srv.stop()
|
|||
iperf3cli.print_results()
|
||||
iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=True)
|
||||
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='dl_brate', criterion='gt')
|
||||
print(res_str)
|
||||
test.set_report_stdout(res_str)
|
||||
|
|
|
@ -20,8 +20,10 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=False)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_UL, ue.netns())
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_UL, ue.netns(), bitrate=max_rate)
|
||||
|
||||
print('waiting for UE to attach...')
|
||||
wait(ue.is_connected, None)
|
||||
|
@ -34,7 +36,6 @@ iperf3srv.stop()
|
|||
iperf3cli.print_results()
|
||||
iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=False)
|
||||
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='ul_brate', criterion='gt')
|
||||
print(res_str)
|
||||
test.set_report_stdout(res_str)
|
||||
|
|
|
@ -219,7 +219,7 @@ class IPerf3Client(log.Origin):
|
|||
locally = not self._run_node or self._run_node.is_local()
|
||||
return locally
|
||||
|
||||
def prepare_test_proc(self, dir=None, netns=None, time_sec=None, proto=None):
|
||||
def prepare_test_proc(self, dir=None, netns=None, time_sec=None, proto=None, bitrate=0):
|
||||
values = config.get_defaults('iperf3cli')
|
||||
config.overlay(values, self.testenv.suite().config().get('iperf3cli', {}))
|
||||
|
||||
|
@ -247,11 +247,11 @@ class IPerf3Client(log.Origin):
|
|||
self.run_dir = util.Dir(self.testenv.test().get_run_dir().new_dir(self.name()))
|
||||
self.log_file = self.run_dir.new_file(IPerf3Client.LOGFILE)
|
||||
if self.runs_locally():
|
||||
return self.prepare_test_proc_locally(dir, netns, time_sec, proto == IPerf3Client.PROTO_UDP)
|
||||
return self.prepare_test_proc_locally(dir, netns, time_sec, proto == IPerf3Client.PROTO_UDP, bitrate)
|
||||
else:
|
||||
return self.prepare_test_proc_remotely(dir, netns, time_sec, proto == IPerf3Client.PROTO_UDP)
|
||||
return self.prepare_test_proc_remotely(dir, netns, time_sec, proto == IPerf3Client.PROTO_UDP, bitrate)
|
||||
|
||||
def prepare_test_proc_remotely(self, dir, netns, time_sec, use_udp):
|
||||
def prepare_test_proc_remotely(self, dir, netns, time_sec, use_udp, bitrate):
|
||||
self.rem_host = remote.RemoteHost(self.run_dir, self._run_node.ssh_user(), self._run_node.ssh_addr())
|
||||
|
||||
remote_prefix_dir = util.Dir(IPerf3Client.REMOTE_DIR)
|
||||
|
@ -270,7 +270,7 @@ class IPerf3Client(log.Origin):
|
|||
elif dir == IPerf3Client.DIR_BI:
|
||||
popen_args += ('--bidir',)
|
||||
if use_udp:
|
||||
popen_args += ('-u', '-b', '0')
|
||||
popen_args += ('-u', '-b', str(bitrate))
|
||||
|
||||
if netns:
|
||||
self.process = self.rem_host.RemoteNetNSProcess(self.name(), netns, popen_args, env={})
|
||||
|
|
|
@ -20,8 +20,10 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=True)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_DL, ue.netns())
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_DL, ue.netns(), bitrate=max_rate)
|
||||
|
||||
print('waiting for UE to attach...')
|
||||
wait(ue.is_connected, None)
|
||||
|
@ -34,7 +36,6 @@ iperf3srv.stop()
|
|||
iperf3cli.print_results()
|
||||
iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=True)
|
||||
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='dl_brate', criterion='gt')
|
||||
print(res_str)
|
||||
test.set_report_stdout(res_str)
|
||||
|
|
|
@ -20,8 +20,10 @@ print('ENB is connected to EPC')
|
|||
|
||||
ue.connect(enb)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=False)
|
||||
|
||||
iperf3srv.start()
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_UL, ue.netns())
|
||||
proc = iperf3cli.prepare_test_proc(iperf3cli.DIR_UL, ue.netns(), bitrate=max_rate)
|
||||
|
||||
print('waiting for UE to attach...')
|
||||
wait(ue.is_connected, None)
|
||||
|
@ -34,7 +36,6 @@ iperf3srv.stop()
|
|||
iperf3cli.print_results()
|
||||
iperf3srv.print_results(iperf3cli.proto() == iperf3cli.PROTO_UDP)
|
||||
|
||||
max_rate = enb.ue_max_rate(downlink=False)
|
||||
res_str = ue.verify_metric(max_rate * 0.8, operation='avg', metric='ul_brate', criterion='gt')
|
||||
print(res_str)
|
||||
test.set_report_stdout(res_str)
|
||||
|
|
Loading…
Reference in New Issue