Tue, Mar 05, 2019 at 05:09:11PM CET, csfakian(a)redhat.com wrote:
From: Christos Sfakianakis <csfakian(a)redhat.com>
Add checks related to UDP/SCTP that are present in the old recipes.
In particular, skip ('gro', 'off') offload setting with UDP perf
tests. Also, allow only 'gso' option to be set to 'off' with SCTP.
Finally, make sure SCTP will go out through the test interfaces
only.
Signed-off-by: Christos Sfakianakis <csfakian(a)redhat.com>
---
lnst/Recipes/ENRT/BaseEnrtRecipe.py | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
index ba4ff41..d97902a 100644
--- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py
+++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py
@@ -132,6 +132,12 @@ class BaseEnrtRecipe(PingTestAndEvaluate, PerfRecipe):
client_netns = client_nic.netns
server_netns = server_nic.netns
+ if 'sctp_stream' in self.params.perf_tests:
+ client_netns.run("iptables -I OUTPUT ! -o %s -p sctp -j DROP" %
+ client_nic.name)
+ server_netns.run("iptables -I OUTPUT ! -o %s -p sctp -j DROP" %
+ server_nic.name)
+
ethtool_offload_string = ""
for name, value in sub_config.offload_settings.items():
ethtool_offload_string += " %s %s" % (name, value)
@@ -147,6 +153,12 @@ class BaseEnrtRecipe(PingTestAndEvaluate, PerfRecipe):
client_netns = client_nic.netns
server_netns = server_nic.netns
+ if 'sctp_stream' in self.params.perf_tests:
+ client_netns.run("iptables -D OUTPUT ! -o %s -p sctp -j DROP" %
+ client_nic.name)
+ server_netns.run("iptables -D OUTPUT ! -o %s -p sctp -j DROP" %
+ server_nic.name)
+
ethtool_offload_string = ""
for name, value in sub_config.offload_settings.items():
ethtool_offload_string += " %s %s" % (name, "on")
@@ -207,6 +219,13 @@ class BaseEnrtRecipe(PingTestAndEvaluate, PerfRecipe):
server_bind = server_nic.ips_filter(family=family)[0]
for perf_test in self.params.perf_tests:
+ offload_pairs = sub_config.offload_settings.items()
+ if ((perf_test == 'udp_stream' and ('gro', 'off')
in offload_pairs)
I believe that you have reverted the second condition compared to
the original code (master branch). There it is:
if nperf_protocols.find("udp") > -1 and ("gro",
"off") not in setting:
For UDP we don't care about any combination where gro is turned off as
it does not have any impact.
>+ or
>+ (perf_test == 'sctp_stream' and not list(val[0] for val
in
>+ offload_pairs if val[1] == 'off') in [[],
['gso']])):
>+ continue
>+
> flow = PerfFlow(
> type = perf_test,
> generator = client_netns,
>--
>2.17.1
>_______________________________________________
>LNST-developers mailing list -- lnst-developers(a)lists.fedorahosted.org
>To unsubscribe send an email to lnst-developers-leave(a)lists.fedorahosted.org
>Fedora Code of Conduct:
https://getfedora.org/code-of-conduct.html
>List Guidelines:
https://fedoraproject.org/wiki/Mailing_list_guidelines
>List Archives:
https://lists.fedorahosted.org/archives/list/lnst-developers@lists.fedora...