On Mon, Jul 27, 2020 at 09:51:24AM +0200, Jan Tluka wrote:
Mon, Jul 27, 2020 at 09:19:12AM CEST, olichtne(a)redhat.com wrote:
>Two comments inline.
>
>On Fri, Jul 24, 2020 at 07:00:47PM +0200, Jan Tluka wrote:
>> diff --git a/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
b/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
>> new file mode 100644
>> index 00000000..46963dd2
>> --- /dev/null
>> +++ b/lnst/Recipes/ENRT/PerfTestMixins/SctpFirewallPerfTestMixin.py
>> @@ -0,0 +1,33 @@
>> +from lnst.Controller.RecipeResults import ResultLevel
>> +from lnst.Recipes.ENRT.PerfTestMixins import BasePerfTestTweakMixin
>> +from lnst.RecipeCommon.Perf.Measurements.BaseFlowMeasurement import
BaseFlowMeasurement
>> +
>> +class SctpFirewallPerfTestMixin(BasePerfTestTweakMixin):
>> +
>> + def _get_flow_measurement_from_config(self, perf_config):
>> + flow_measurements = [ m for m in perf_config.measurements if
isinstance(m, BaseFlowMeasurement) ]
>> + return flow_measurements[0]
>> +
>> + def apply_perf_test_tweak(self, perf_config):
>> + super().apply_perf_test_tweak(perf_config)
>> +
>> + flow_measurement = self._get_flow_measurement_from_config(perf_config)
>> + flow = flow_measurement.conf[0]
>
>I see you're using [0] here as well as in the previous method, it's
>probably ok for the current use case of the SCTP tests but what would
>happen if this was combined with a "multistream" sctp test? Is that
>still handled?
It depends if the multistream contains a mix of different protocols to
test at once. With the current implementation of ENRT recipes this is not
possible IMO.
If this comment is just about test of multiple streams of the same
protocol, I'm not sure if this work. I'll check that.
No problem, just checking the logic, if it makes sense then no need to
adjust anything...
-Ondrej