summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/task_init.h
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2017-11-09 15:57:11 +0100
committerXavier Simonart <xavier.simonart@intel.com>2017-11-15 19:05:17 +0100
commit4be177d0ef2813a20651d1a54991d25f3a66a090 (patch)
treea010ecadbb2654562b7c247e0f81a8c46b02a564 /VNFs/DPPD-PROX/task_init.h
parentc5dfa2ba7c21dac5ff6895f6e0fa2dc1dcc50cc1 (diff)
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 <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/task_init.h')
-rw-r--r--VNFs/DPPD-PROX/task_init.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/VNFs/DPPD-PROX/task_init.h b/VNFs/DPPD-PROX/task_init.h
index 86a9521c..745a7425 100644
--- a/VNFs/DPPD-PROX/task_init.h
+++ b/VNFs/DPPD-PROX/task_init.h
@@ -46,6 +46,9 @@ struct lcore_cfg;
#define TASK_ARG_DO_NOT_SET_SRC_MAC 0x200
#define TASK_ARG_DO_NOT_SET_DST_MAC 0x400
#define TASK_ARG_HW_SRC_MAC 0x800
+#define TASK_ARG_L3 0x1000
+
+#define PROX_MODE_LEN 32
enum protocols {IPV4, ARP, IPV6};
@@ -63,8 +66,8 @@ struct task_args;
struct task_init {
enum task_mode mode;
- char mode_str[32];
- char sub_mode_str[32];
+ char mode_str[PROX_MODE_LEN];
+ char sub_mode_str[PROX_MODE_LEN];
void (*early_init)(struct task_args *targ);
void (*init)(struct task_base *tbase, struct task_args *targ);
int (*handle)(struct task_base *tbase, struct rte_mbuf **mbufs, const uint16_t n_pkts);
@@ -227,6 +230,7 @@ struct task_args {
struct rte_ring **ctrl_tx_rings;
int n_ctrl_rings;
struct task_base *tmaster;
+ char sub_mode_str[PROX_MODE_LEN];
};
/* Return the first port that is reachable through the task. If the