diff options
author | 2017-10-25 20:30:34 +0200 | |
---|---|---|
committer | 2017-10-25 20:30:34 +0200 | |
commit | f6abc2e6a02557e82ad0d1e5440653bb8884ecc8 (patch) | |
tree | ae36de03e9553cd55300771271576369c7484f9e /VNFs/DPPD-PROX/prox_args.c | |
parent | 504e70cbb19a3e65b1704ee085cd079d26cf16f8 (diff) |
Merge changes from PROX-v041
Change-Id: Ie6d4e7ce22c27967117a446626f5923643397812
Signed-off-by: Patrice Buriez <patrice.buriez@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/prox_args.c')
-rw-r--r-- | VNFs/DPPD-PROX/prox_args.c | 28 |
1 files changed, 23 insertions, 5 deletions
diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index 2703c228..fd8ea524 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -1063,6 +1063,15 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) set_errf("Master core can only have one task\n"); return -1; } + // Initialize number of tasks to 1 for master, even if no task specified + lconf->n_tasks_all = 1; + lconf->active_task = 0; + lconf->targs[lconf->active_task].task = 0; + struct task_init* task_init = to_task_init(mode, ""); + if (task_init) { + targ->mode = task_init->mode; + } + targ->task_init = task_init; return 0; } @@ -1231,8 +1240,20 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) targ->task_init = to_task_init(mode_str, sub_mode_str); if (!targ->task_init) { - set_errf("sub mode %s not supported for mode %s", sub_mode_str, mode_str); - return -1; + if (strcmp(sub_mode_str, "l3") != 0) { + set_errf("sub mode %s not supported for mode %s", sub_mode_str, mode_str); + return -1; + } + targ->task_init = to_task_init(mode_str, ""); + if (!targ->task_init) { + set_errf("sub mode %s not supported for mode %s", sub_mode_str, mode_str); + return -1; + } + } + if (strcmp(sub_mode_str, "l3") == 0) { + prox_cfg.flags |= DSF_CTRL_PLANE_ENABLED; + targ->task_init->flag_features |= TASK_FEATURE_L3; + strcpy(targ->task_init->sub_mode_str, "l3"); } return 0; } @@ -1282,9 +1303,6 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) if (STR_EQ(str, "gateway ipv4")) { /* Gateway IP address used when generating */ return parse_ip(&targ->gateway_ipv4, pkey); } - if (STR_EQ(str, "number of ip")) { /* Gateway IP address used when generating */ - return parse_int(&targ->number_gen_ip, pkey); - } if (STR_EQ(str, "local ipv4")) { /* source IP address to be used for packets */ return parse_ip(&targ->local_ipv4, pkey); } |