From: Christos Sfakianakis csfakian@redhat.com
Change 'perf_msg_size' param to ListParam and rename it to 'perf_msg_sizes' to cover more versatile test cases. Update the generate_flow_combinations method to take into account the new parameter type.
lnst.Recipes.ENRT.IpsecEspAeadRecipe: use 'perf_msg_sizes'
Use 'perf_msg_sizes' in place of 'perf_msg_size'.
lnst.Recipes.ENRT.IpsecEspAhCompRecipe: use 'perf_msg_sizes'
Use 'perf_msg_sizes' in place of 'perf_msg_size'.
Signed-off-by: Christos Sfakianakis csfakian@redhat.com --- lnst/Recipes/ENRT/BaseEnrtRecipe.py | 37 ++++++++++++----------- lnst/Recipes/ENRT/IpsecEspAeadRecipe.py | 33 ++++++++++---------- lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py | 33 ++++++++++---------- 3 files changed, 53 insertions(+), 50 deletions(-)
diff --git a/lnst/Recipes/ENRT/BaseEnrtRecipe.py b/lnst/Recipes/ENRT/BaseEnrtRecipe.py index c886d09..fe53fcf 100644 --- a/lnst/Recipes/ENRT/BaseEnrtRecipe.py +++ b/lnst/Recipes/ENRT/BaseEnrtRecipe.py @@ -1,7 +1,7 @@ import re
from lnst.Common.LnstError import LnstError -from lnst.Common.Parameters import Param, IntParam, StrParam, BoolParam +from lnst.Common.Parameters import Param, IntParam, StrParam, BoolParam, ListParam from lnst.Common.IpAddress import AF_INET, AF_INET6 from lnst.Common.ExecCmd import exec_cmd from lnst.Controller.Recipe import BaseRecipe, RecipeError @@ -93,7 +93,7 @@ class BaseEnrtRecipe(PingTestAndEvaluate, PerfRecipe): perf_duration = IntParam(default=60) perf_iterations = IntParam(default=5) perf_parallel_streams = IntParam(default=1) - perf_msg_size = IntParam(default=123) + perf_msg_sizes = ListParam(default=[123]) perf_reverse = BoolParam(default=False)
net_perf_tool = Param(default=IperfFlowMeasurement) @@ -287,22 +287,23 @@ class BaseEnrtRecipe(PingTestAndEvaluate, PerfRecipe): ('gso', 'on') in offload_items)): continue
- flow = PerfFlow( - type = perf_test, - generator = client_netns, - generator_bind = client_bind, - receiver = server_netns, - receiver_bind = server_bind, - msg_size = self.params.perf_msg_size, - duration = self.params.perf_duration, - parallel_streams = self.params.perf_parallel_streams, - cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None - ) - yield [flow] - - if self.params.perf_reverse: - reverse_flow = self._create_reverse_flow(flow) - yield [reverse_flow] + for size in self.params.perf_msg_sizes: + flow = PerfFlow( + type = perf_test, + generator = client_netns, + generator_bind = client_bind, + receiver = server_netns, + receiver_bind = server_bind, + msg_size = size, + duration = self.params.perf_duration, + parallel_streams = self.params.perf_parallel_streams, + cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None + ) + yield [flow] + + if self.params.perf_reverse: + reverse_flow = self._create_reverse_flow(flow) + yield [reverse_flow]
@property def cpu_perf_evaluators(self): diff --git a/lnst/Recipes/ENRT/IpsecEspAeadRecipe.py b/lnst/Recipes/ENRT/IpsecEspAeadRecipe.py index 18afbdb..c78b130 100644 --- a/lnst/Recipes/ENRT/IpsecEspAeadRecipe.py +++ b/lnst/Recipes/ENRT/IpsecEspAeadRecipe.py @@ -110,22 +110,23 @@ class IpsecEspAeadRecipe(BaseEnrtRecipe, PacketAssertTestAndEvaluate): ('gso', 'on') in offload_items)): continue
- flow = PerfFlow( - type = perf_test, - generator = ns1, - generator_bind = ip1, - receiver = ns2, - receiver_bind = ip2, - msg_size = self.params.perf_msg_size, - duration = self.params.perf_duration, - parallel_streams = self.params.perf_parallel_streams, - cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None - ) - yield [flow] - - if "perf_reverse" in self.params and self.params.perf_reverse: - reverse_flow = self._create_reverse_flow(flow) - yield [reverse_flow] + for size in self.params.perf_msg_sizes: + flow = PerfFlow( + type = perf_test, + generator = ns1, + generator_bind = ip1, + receiver = ns2, + receiver_bind = ip2, + msg_size = size, + duration = self.params.perf_duration, + parallel_streams = self.params.perf_parallel_streams, + cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None + ) + yield [flow] + + if "perf_reverse" in self.params and self.params.perf_reverse: + reverse_flow = self._create_reverse_flow(flow) + yield [reverse_flow]
def ping_test(self, ping_config): m1, m2 = ping_config[0].client, ping_config[0].destination diff --git a/lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py b/lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py index 92a568d..70a52cd 100644 --- a/lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py +++ b/lnst/Recipes/ENRT/IpsecEspAhCompRecipe.py @@ -114,22 +114,23 @@ class IpsecEspAhCompRecipe(BaseEnrtRecipe, PacketAssertTestAndEvaluate): ('gso', 'on') in offload_items)): continue
- flow = PerfFlow( - type = perf_test, - generator = ns1, - generator_bind = ip1, - receiver = ns2, - receiver_bind = ip2, - msg_size = self.params.perf_msg_size, - duration = self.params.perf_duration, - parallel_streams = self.params.perf_parallel_streams, - cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None - ) - yield [flow] - - if "perf_reverse" in self.params and self.params.perf_reverse: - reverse_flow = self._create_reverse_flow(flow) - yield [reverse_flow] + for size in self.params.perf_msg_sizes: + flow = PerfFlow( + type = perf_test, + generator = ns1, + generator_bind = ip1, + receiver = ns2, + receiver_bind = ip2, + msg_size = size, + duration = self.params.perf_duration, + parallel_streams = self.params.perf_parallel_streams, + cpupin = self.params.perf_tool_cpu if "perf_tool_cpu" in self.params else None + ) + yield [flow] + + if "perf_reverse" in self.params and self.params.perf_reverse: + reverse_flow = self._create_reverse_flow(flow) + yield [reverse_flow]
def ping_test(self, ping_config): m1, m2 = ping_config[0].client, ping_config[0].destination