summaryrefslogtreecommitdiffstats
path: root/VNFs
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-10-30 16:46:31 +0100
committerXavier Simonart <xavier.simonart@intel.com>2020-11-10 11:35:10 +0100
commitce5b1f80d8ca7e29694f6540801ea9853fb7ddb6 (patch)
treeb63a98d83cc97e57b7f99b7e68e941ddf8e5d2a7 /VNFs
parent1bdca995e0a32dde93a7fcf72718f35cc0468df9 (diff)
Fix potential crash in parsing unusual commands
'reset values all' and 'reset randoms all' commands were potentially causing some crash. This has been fixed. Change-Id: Idc2c4f7c90db73e7fdf9e8ef76b00ba956a0d854 Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r--VNFs/DPPD-PROX/cmd_parser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/cmd_parser.c b/VNFs/DPPD-PROX/cmd_parser.c
index 00027c47..7d216ba8 100644
--- a/VNFs/DPPD-PROX/cmd_parser.c
+++ b/VNFs/DPPD-PROX/cmd_parser.c
@@ -709,7 +709,7 @@ static int parse_cmd_reset_randoms_all(const char *str, struct input *input)
unsigned task_id, lcore_id = -1;
while (prox_core_next(&lcore_id, 0) == 0) {
for (task_id = 0; task_id < lcore_cfg[lcore_id].n_tasks_all; task_id++) {
- if (!task_is_mode(lcore_id, task_id, "gen")) {
+ if (task_is_mode(lcore_id, task_id, "gen")) {
struct task_base *tbase = lcore_cfg[lcore_id].tasks_all[task_id];
uint32_t n_rands = task_gen_get_n_randoms(tbase);
@@ -730,7 +730,7 @@ static int parse_cmd_reset_values_all(const char *str, struct input *input)
unsigned task_id, lcore_id = -1;
while (prox_core_next(&lcore_id, 0) == 0) {
for (task_id = 0; task_id < lcore_cfg[lcore_id].n_tasks_all; task_id++) {
- if (!task_is_mode(lcore_id, task_id, "gen")) {
+ if (task_is_mode(lcore_id, task_id, "gen")) {
struct task_base *tbase = lcore_cfg[lcore_id].tasks_all[task_id];
plog_info("Resetting values on core %d task %d\n", lcore_id, task_id);