summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
diff options
context:
space:
mode:
authorLuc Provoost <luc.provoost@intel.com>2020-05-11 05:06:17 -0400
committerLuc Provoost <luc.provoost@intel.com>2020-05-15 11:55:09 +0200
commit9d4e94ed8cbd2110cab0388181bad3223a1155ce (patch)
treef5c92fdccccdc54701ea21a2a4e7b6aa47bfe8cd /VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
parent4d932aced6931d756e07dbce6ab7cf04799ba5f4 (diff)
createrapid.py is now using heat templates yaml
yaml files have been added to the repo as an example. Please check the README explaining the output section reqs for this yaml file. There is also a new file (config_file): it also specifies which yaml files to use. multiple dataplane interfaces per VM can now be specified and will appear in the <STACK>.env file. An error in setting the packet size has been fixed (see set_udp_packet_size for packet size setting details) Change-Id: Ie89a4940521dac7dd3652acca477739abb9f5497 Signed-off-by: Luc Provoost <luc.provoost@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py')
-rw-r--r--VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
index 553907b0..2a5b51c4 100644
--- a/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
+++ b/VNFs/DPPD-PROX/helper-scripts/rapid/rapid_generator_machine.py
@@ -78,15 +78,15 @@ class RapidGeneratorMachine(RapidMachine):
speed_per_gen_core = speed / len(self.machine_params['gencores'])
self.socket.speed(speed_per_gen_core, self.machine_params['gencores'])
- def set_udp_packet_size(self, size):
+ def set_udp_packet_size(self, frame_size):
# We should check the gen.cfg to make sure we only send UDP packets
- # Frame size is PROX pkt size + 4 bytes CRC
- # PROX "pkt_size" i.e. 14-bytes L2 frame header + VLAN 4 bytes header + IP packet size
- self.socket.set_size(self.machine_params['gencores'], 0, size)
+ # Frame size = PROX pkt size + 4 bytes CRC
+ # The set_size function takes the PROX packet size as a parameter
+ self.socket.set_size(self.machine_params['gencores'], 0, frame_size - 4)
# 18 is the difference between the frame size and IP size = size of (MAC addresses, ethertype and FCS)
- self.socket.set_value(self.machine_params['gencores'], 0, 16, size-18, 2)
+ self.socket.set_value(self.machine_params['gencores'], 0, 16, frame_size-18, 2)
# 38 is the difference between the frame size and UDP size = 18 + size of IP header (=20)
- self.socket.set_value(self.machine_params['gencores'], 0, 38, size-38, 2)
+ self.socket.set_value(self.machine_params['gencores'], 0, 38, frame_size-38, 2)
def set_flows(self, number_of_flows):
source_port,destination_port = RandomPortBits.get_bitmap(number_of_flows)