From 4cc2ddf79eed6fdc30c668c64fc961da09703631 Mon Sep 17 00:00:00 2001 From: Michael Pedersen Date: Thu, 22 Feb 2018 13:20:40 -0700 Subject: Fix for bug with external chain and no arp The validation of MAC addresses was placed incorrectly Change-Id: I9a0e1f06699eadd0dff091078c132c5664aeea56 Signed-off-by: Michael Pedersen --- nfvbench/nfvbench.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/nfvbench/nfvbench.py b/nfvbench/nfvbench.py index 7d2e037..f17b51c 100644 --- a/nfvbench/nfvbench.py +++ b/nfvbench/nfvbench.py @@ -164,6 +164,14 @@ class NFVBench(object): self.config.duration_sec = float(self.config.duration_sec) self.config.interval_sec = float(self.config.interval_sec) + # Get traffic generator profile config + if not self.config.generator_profile: + self.config.generator_profile = self.config.traffic_generator.default_profile + + generator_factory = TrafficGeneratorFactory(self.config) + self.config.generator_config = \ + generator_factory.get_generator_config(self.config.generator_profile) + # Check length of mac_addrs_left/right for serivce_chain EXT with no_arp if self.config.service_chain == ChainType.EXT and self.config.no_arp: if not (self.config.generator_config.mac_addrs_left is None and @@ -183,14 +191,6 @@ class NFVBench(object): b=len(self.config.generator_config.mac_addrs_right), c=self.config.service_chain_count)) - # Get traffic generator profile config - if not self.config.generator_profile: - self.config.generator_profile = self.config.traffic_generator.default_profile - - generator_factory = TrafficGeneratorFactory(self.config) - self.config.generator_config = \ - generator_factory.get_generator_config(self.config.generator_profile) - if not any(self.config.generator_config.pcis): raise Exception("PCI addresses configuration for selected traffic generator profile " "({tg_profile}) are missing. Please specify them in configuration file." -- cgit 1.2.3-korg