Enable IP_ROUTING for netperf UDP_STREAM test 09/42509/1
authorTrevor Tao <trevor.tao@arm.com>
Wed, 20 Sep 2017 10:29:36 +0000 (18:29 +0800)
committerTrevor Tao <trevor.tao@arm.com>
Wed, 20 Sep 2017 10:32:05 +0000 (18:32 +0800)
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 <trevor.tao@arm.com>
yardstick/benchmark/scenarios/networking/netperf.py

index 08d5dd1..a8d9010 100755 (executable)
@@ -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)