summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorYaroslav Brustinov <ybrustin@cisco.com>2016-11-10 19:48:15 +0200
committerYaroslav Brustinov <ybrustin@cisco.com>2016-11-10 19:48:15 +0200
commit98dc1571776f4a8538e6ac72ce4e3fd4a2295026 (patch)
treefabef8a7fd3653e450433c196675346862d044dd /src
parente9b4c74dae5a79a6ad77f0f1328f90795e9cc421 (diff)
Add nicer error if -c is bigger than number of threads in platform config
Signed-off-by: Yaroslav Brustinov <ybrustin@cisco.com>
Diffstat (limited to 'src')
-rwxr-xr-xsrc/bp_sim.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/bp_sim.cpp b/src/bp_sim.cpp
index 734fd1b0..3373c363 100755
--- a/src/bp_sim.cpp
+++ b/src/bp_sim.cpp
@@ -238,6 +238,13 @@ bool CPlatformSocketInfoConfig::init(){
}
}
+ if (m_threads_per_dual_if > m_max_threads_per_dual_if) {
+ printf("ERROR: Maximum threads in platform section of config file is %d, unable to run with -c %d.\n",
+ m_max_threads_per_dual_if, m_threads_per_dual_if);
+ printf("Please increase the pool in config or use lower -c.\n");
+ exit(1);
+ }
+
int j;
for (j=0; j<m_threads_per_dual_if; j++) {