From c063c331f0a17de493a8046f198404ccb922c777 Mon Sep 17 00:00:00 2001 From: Jakub Rozek Date: Sat, 13 Jan 2024 14:36:52 +0100 Subject: [PATCH] BaseFlowMeasurementGenerator: Do not use client port in mptcp We are binding the client port to be consistent in multi-flow scenarios. However, our mptcp scenario opens 2 additional ports and not one. Only the first one binds to the specified client port, the second one is random. This would be fine, but there's a bug where mptcp doesn't close ports immediately (RHEL-21492). This raises an "Address already in use" error when the client attempts to bind the client port. We don't bind the client port to mitigate this issue, but also because, as specified before, it doesn't matter whether it's bound or not. --- .../MeasurementGenerators/BaseFlowMeasurementGenerator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lnst/Recipes/ENRT/MeasurementGenerators/BaseFlowMeasurementGenerator.py b/lnst/Recipes/ENRT/MeasurementGenerators/BaseFlowMeasurementGenerator.py index 20a788564..7a4c51b00 100644 --- a/lnst/Recipes/ENRT/MeasurementGenerators/BaseFlowMeasurementGenerator.py +++ b/lnst/Recipes/ENRT/MeasurementGenerators/BaseFlowMeasurementGenerator.py @@ -147,16 +147,16 @@ def _create_perf_flows( for endpoint_pair in endpoint_pairs: client, server = endpoint_pair for i in range(self.params.perf_parallel_processes): - port = next(port_iter) + server_port = client_port = next(port_iter) flows.append( self._create_perf_flow( perf_test, client.device, client.address, - port, + client_port if perf_test != "mptcp_stream" else None, server.device, server.address, - port, + server_port, msg_size, self.generator_cpupin(i), self.receiver_cpupin(i),