From 4be177d0ef2813a20651d1a54991d25f3a66a090 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Thu, 9 Nov 2017 15:57:11 +0100 Subject: Add support for nop mode with l3 submode The l3 submode was not supported in nop mode, as the nop mode uses some specific nop thread (and not generic). When L3 is specified, the nop mode must use the generic thread. In addition the l3 submode is implemented differently than other submodes. It is not supported through task_init structures (i.e. each task does not have to explicitely tell that it supports l3 submode). But this prevented to run both a nop with no submode and a nop with a l3 submode. Note that nop with l3 is usually not very useful - it handles arp (requests and response) but as nop, it does not swap IP addresses. So with a real switch, the packets transmitted will be received back... and l3 mode is usually mainly usefull when using a switch. However, there is at least one nop mode where l3 submode makes sense: when the nop does not transmit. In such cases, for instace used in conjunction with a gen l3, the nop receives all packets and forward the arp requests and responses to the master for handling. Change-Id: I992121db285ba25a11cbb494092a6afc6fe55a58 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/prox_args.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'VNFs/DPPD-PROX/prox_args.c') diff --git a/VNFs/DPPD-PROX/prox_args.c b/VNFs/DPPD-PROX/prox_args.c index fd8ea524..bbe27382 100644 --- a/VNFs/DPPD-PROX/prox_args.c +++ b/VNFs/DPPD-PROX/prox_args.c @@ -1252,8 +1252,10 @@ static int get_core_cfg(unsigned sindex, char *str, void *data) } 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"); + targ->flags |= TASK_ARG_L3; + strcpy(targ->sub_mode_str, "l3"); + } else { + strcpy(targ->sub_mode_str, targ->task_init->sub_mode_str); } return 0; } -- cgit 1.2.3-korg