summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorXavier Simonart <simonartxavier@gmail.com>2021-12-20 12:59:07 +0000
committerXavier Simonart <simonartxavier@gmail.com>2021-12-20 12:59:07 +0000
commitb62cc323c97d429f5ea107845367de328012badd (patch)
tree15967817161d8db2b1bd6669a29e78b9e0c47738 /VNFs
parentdd3150931f364f614bc20436ffe3b9a74760e9ef (diff)
Add support for preventing rapid to change flows
By default, in flowsize and warmup tests, rapid will set the flows by changing some fields. However, rapid only support some types of flows. Using this patch, one can let PROX define the flows, and prevent rapid to do it. This is done by specifying number of flows to 0 in rapid configuration. Signed-off-by: Xavier Simonart <simonartxavier@gmail.com> Change-Id: I69c7e223aaf536ebcfe9fb52e8305d5625e79fa6
Diffstat (limited to 'VNFs')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py10
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py3
2 files changed, 8 insertions, 5 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
index 0ca7c71f..5eca1cb2 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_flowsizetest.py
@@ -116,8 +116,9 @@ class FlowSizeTest(RapidTest):
self.set_background_speed(self.background_machines, WARMUPSPEED)
self.gen_machine.set_udp_packet_size(imix)
self.set_background_size(self.background_machines, imix)
- _ = self.gen_machine.set_flows(FLOWSIZE)
- self.set_background_flows(self.background_machines, FLOWSIZE)
+ if FLOWSIZE:
+ _ = self.gen_machine.set_flows(FLOWSIZE)
+ self.set_background_flows(self.background_machines, FLOWSIZE)
self.gen_machine.start()
self.start_background_traffic(self.background_machines)
time.sleep(WARMUPTIME)
@@ -163,8 +164,9 @@ class FlowSizeTest(RapidTest):
self.gen_machine.reset_stats()
if self.sut_machine:
self.sut_machine.reset_stats()
- flow_number = self.gen_machine.set_flows(flow_number)
- self.set_background_flows(self.background_machines, flow_number)
+ if flow_number != 0:
+ flow_number = self.gen_machine.set_flows(flow_number)
+ self.set_background_flows(self.background_machines, flow_number)
end_data['speed'] = None
speed = self.get_start_speed_and_init(size)
while True:
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py
index bedf51ab..a86ce806 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_warmuptest.py
@@ -42,7 +42,8 @@ class WarmupTest(RapidTest):
self.gen_machine.set_generator_speed(WARMUPSPEED)
self.gen_machine.set_udp_packet_size(imix)
# gen_machine['socket'].set_value(gencores,0,56,1,1)
- _ = self.gen_machine.set_flows(FLOWSIZE)
+ if FLOWSIZE:
+ _ = self.gen_machine.set_flows(FLOWSIZE)
self.gen_machine.start()
time.sleep(WARMUPTIME)
self.gen_machine.stop()