From 0154665c6801b6adb7229fe405e2689875768def Mon Sep 17 00:00:00 2001 From: Trevor Tao Date: Wed, 20 Sep 2017 18:29:36 +0800 Subject: Enable IP_ROUTING for netperf UDP_STREAM test To avoid the following ERROR when netperf test between 2 different subnets: ERROR netperf: send_omni: send_data failed: Network is unreachable For detail, please see: https://serverfault.com/questions/802320/netperf-iptables-\ masquerade-network-unreachable Or: https://stackoverflow.com/questions/11981480/error-in-running-\ netperf-udp-stream-over-openvpn Change-Id: I62b202844861440deaf3bf0f65b41561bd87ae87 Signed-off-by: Trevor Tao --- yardstick/benchmark/scenarios/networking/netperf.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/yardstick/benchmark/scenarios/networking/netperf.py b/yardstick/benchmark/scenarios/networking/netperf.py index 08d5dd166..a8d9010ed 100755 --- a/yardstick/benchmark/scenarios/networking/netperf.py +++ b/yardstick/benchmark/scenarios/networking/netperf.py @@ -114,6 +114,10 @@ class Netperf(base.Scenario): cmd_args += " %s %s" % (option_pair[1], options[option_pair[0]]) + # Enable IP routing for UDP_STREAM test + if testname == "UDP_STREAM": + cmd_args += " -R 1" + cmd = "sudo bash netperf.sh %s" % (cmd_args) LOG.debug("Executing command: %s", cmd) status, stdout, stderr = self.client.execute(cmd) -- cgit 1.2.3-korg