diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/main_dpdk.cpp | 2 | ||||
-rwxr-xr-x | src/platform_cfg.cpp | 5 | ||||
-rwxr-xr-x | src/platform_cfg.h | 1 | ||||
-rw-r--r-- | src/trex_defs.h | 2 |
4 files changed, 8 insertions, 2 deletions
diff --git a/src/main_dpdk.cpp b/src/main_dpdk.cpp index 9cc0e612..4e921954 100644 --- a/src/main_dpdk.cpp +++ b/src/main_dpdk.cpp @@ -122,7 +122,7 @@ static inline int get_is_rx_thread_enabled() { struct port_cfg_t; -#define MAX_DPDK_ARGS 40 +#define MAX_DPDK_ARGS 50 static CPlatformYamlInfo global_platform_cfg_info; static int global_dpdk_args_num ; static char * global_dpdk_args[MAX_DPDK_ARGS]; diff --git a/src/platform_cfg.cpp b/src/platform_cfg.cpp index 575c4c72..6aae450b 100755 --- a/src/platform_cfg.cpp +++ b/src/platform_cfg.cpp @@ -344,6 +344,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", + TREX_MAX_PORTS, (int) interfaces.size()); + exit(-1); + } for(unsigned i=0;i<interfaces.size();i++) { std::string fi; const YAML::Node & node = interfaces; diff --git a/src/platform_cfg.h b/src/platform_cfg.h index c839bd96..b921c9c7 100755 --- a/src/platform_cfg.h +++ b/src/platform_cfg.h @@ -28,6 +28,7 @@ limitations under the License. #include <vector> #include <string> #include "tw_cfg.h" +#include "trex_defs.h" #define CONST_NB_MBUF_2_10G (16380/2) diff --git a/src/trex_defs.h b/src/trex_defs.h index 8a4bf664..60a60df9 100644 --- a/src/trex_defs.h +++ b/src/trex_defs.h @@ -21,7 +21,7 @@ limitations under the License. #ifndef __TREX_DEFS_H__ #define __TREX_DEFS_H__ -#define TREX_MAX_PORTS 12 +#define TREX_MAX_PORTS 16 // maximum number of IP ID type flow stats we support #define MAX_FLOW_STATS 127 |