diff options
-rwxr-xr-x | scripts/dpdk_setup_ports.py | 4 | ||||
-rwxr-xr-x | src/platform_cfg.cpp | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/scripts/dpdk_setup_ports.py b/scripts/dpdk_setup_ports.py index 9ad1a826..fd2361eb 100755 --- a/scripts/dpdk_setup_ports.py +++ b/scripts/dpdk_setup_ports.py @@ -403,13 +403,13 @@ Other network devices stream.close(); cfg_dict = self.m_cfg_dict[0] if 'version' not in cfg_dict: - raise DpdkSetup("Configuration file %s is old, should include version field\n" % fcfg ) + raise DpdkSetup("Configuration file %s is old, it should include version field\n" % fcfg ) if int(cfg_dict['version'])<2 : raise DpdkSetup("Configuration file %s is old, expected version 2, got: %s\n" % (fcfg, cfg_dict['version'])) if 'interfaces' not in self.m_cfg_dict[0]: - raise DpdkSetup("Configuration file %s is old, should include interfaces field even number of elemets" % fcfg) + raise DpdkSetup("Configuration file %s is old, it should include interfaces field with even number of elements" % fcfg) if_list=self.m_cfg_dict[0]['interfaces'] l=len(if_list); diff --git a/src/platform_cfg.cpp b/src/platform_cfg.cpp index 6aae450b..92b4e7e9 100755 --- a/src/platform_cfg.cpp +++ b/src/platform_cfg.cpp @@ -345,10 +345,11 @@ void operator >> (const YAML::Node& node, CPlatformYamlInfo & plat_info) { /* must have interfaces */ const YAML::Node& interfaces = node["interfaces"]; if ( interfaces.size() > TREX_MAX_PORTS ) { - printf("ERROR: Maximal number of interfaces is: %d, and you have specified: %d.\n", + printf("ERROR: Maximal number of interfaces is: %d, you have specified: %d.\n", TREX_MAX_PORTS, (int) interfaces.size()); exit(-1); } + for(unsigned i=0;i<interfaces.size();i++) { std::string fi; const YAML::Node & node = interfaces; |