diff options
author | 2019-06-12 17:17:26 +0200 | |
---|---|---|
committer | 2019-06-14 16:43:03 +0200 | |
commit | f7f4553772881fb4d49bd55d94c3fc3eaccc8403 (patch) | |
tree | 5b517633d77be006f05d7d124cd7ea92341cb5e0 | |
parent | 0d8616af8418480595a2c53e1dc7c3b809962a28 (diff) |
Simplify cores_task_are_valid()
by means of calling core_task_is_valid()
Change-Id: Ice64aabc84066633288ff43d4dc9af3f5b378e33
Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
-rw-r--r-- | VNFs/DPPD-PROX/cmd_parser.c | 13 |
1 files changed, 1 insertions, 12 deletions
diff --git a/VNFs/DPPD-PROX/cmd_parser.c b/VNFs/DPPD-PROX/cmd_parser.c index a1d101f8..927abc29 100644 --- a/VNFs/DPPD-PROX/cmd_parser.c +++ b/VNFs/DPPD-PROX/cmd_parser.c @@ -76,19 +76,8 @@ static int cores_task_are_valid(unsigned int *lcores, int task_id, unsigned int unsigned int lcore_id; for (unsigned int i = 0; i < nb_cores; i++) { lcore_id = lcores[i]; - if (lcore_id >= RTE_MAX_LCORE) { - plog_err("Invalid core id %u (lcore ID above %d)\n", lcore_id, RTE_MAX_LCORE); + if (core_task_is_valid(lcore_id, task_id) == 0) return 0; - } - else if (!prox_core_active(lcore_id, 0)) { - plog_err("Invalid core id %u (lcore is not active)\n", lcore_id); - return 0; - } - else if (task_id >= lcore_cfg[lcore_id].n_tasks_all) { - plog_err("Invalid task id (valid task IDs for core %u are below %u)\n", - lcore_id, lcore_cfg[lcore_id].n_tasks_all); - return 0; - } } return 1; } |