This option set UDP datagram size for netperf test on client. If this option is not explicitly specified, default value from netperf is used.
The option accepts integer value describing datagram size, it should be also concatenated with G/M/K/g/m/k.
In this commit I also added this option to regression_test: simple_netperf test.
---
recipes/regression_tests/phase1/simple_netperf.py | 10 ++++++++--
test_modules/Netperf.py | 11 +++++++++++
2 files changed, 19 insertions(+), 2 deletions(-)
diff --git a/recipes/regression_tests/phase1/simple_netperf.py b/recipes/regression_tests/phase1/simple_netperf.py
index fe9d96b..d68d10c 100644
--- a/recipes/regression_tests/phase1/simple_netperf.py
+++ b/recipes/regression_tests/phase1/simple_netperf.py
@@ -43,6 +43,7 @@ nperf_mode = ctl.get_alias("nperf_mode")
nperf_num_parallel = int(ctl.get_alias("nperf_num_parallel"))
nperf_debug = ctl.get_alias("nperf_debug")
nperf_max_dev = ctl.get_alias("nperf_max_dev")
+nperf_udp_size = ctl.get_alias("nperf_udp_size")
pr_user_comment = ctl.get_alias("perfrepo_comment")
pr_comment = generate_perfrepo_comment([m1, m2], pr_user_comment)
@@ -107,7 +108,8 @@ netperf_cli_udp = ctl.get_module("Netperf",
"runs" : nperf_max_runs,
"netperf_opts" : p_opts,
"debug" : nperf_debug,
- "max_deviation" : nperf_max_dev
+ "max_deviation" : nperf_max_dev,
+ "udp_size" : nperf_udp_size
})
netperf_cli_udp6 = ctl.get_module("Netperf",
@@ -121,7 +123,8 @@ netperf_cli_udp6 = ctl.get_module("Netperf",
"runs" : nperf_max_runs,
"netperf_opts" : p_opts6,
"debug" : nperf_debug,
- "max_deviation" : nperf_max_dev
+ "max_deviation" : nperf_max_dev,
+ "udp_size" : nperf_udp_size
})
netperf_srv = ctl.get_module("Netperf",
@@ -198,6 +201,9 @@ for setting in offload_settings:
for offload in setting:
result_udp.set_parameter(offload[0], offload[1])
+ if nperf_udp_size is not None:
+ result_udp.set_parameter("nperf_udp_size", nperf_udp_size)
+
result_udp.add_tag(product_name)
if nperf_mode == "multi":
result_udp.add_tag("multithreaded")
diff --git a/test_modules/Netperf.py b/test_modules/Netperf.py
index d09bdfc..e6c68ad 100644
--- a/test_modules/Netperf.py
+++ b/test_modules/Netperf.py
@@ -39,6 +39,7 @@ class Netperf(TestGeneric):
self._cpu_util = self.get_opt("cpu_util")
self._num_parallel = int(self.get_opt("num_parallel", default=1))
self._runs = self.get_opt("runs", default=1)
+ self._udp_size = self.get_opt("udp_size")
self._debug = int_it(self.get_opt("debug", default=0))
self._threshold = self._parse_threshold(self.get_opt("threshold"))
@@ -141,6 +142,16 @@ class Netperf(TestGeneric):
else:
cmd += " -- %s" % self._testoptions
+ if self._udp_size is not None:
+ """
+ udp packets will have this size
+ """
+ if self._is_omni() or self._testoptions:
+ cmd += " -m %s" % self._udp_size
+ else:
+ cms += " -- -m %s" % self._udp_size
+
+
elif self._role == "server":
cmd = "netserver -D"
if self._bind is not None:
--
2.5.5
_______________________________________________
LNST-developers mailing list
lnst-developers@lists.fedorahosted.org
https://lists.fedorahosted.org/admin/lists/lnst-developers@lists.fedorahosted.org