diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2017-11-09 15:57:11 +0100 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2017-11-15 19:05:17 +0100 |
commit | 4be177d0ef2813a20651d1a54991d25f3a66a090 (patch) | |
tree | a010ecadbb2654562b7c247e0f81a8c46b02a564 /VNFs/DPPD-PROX/task_init.c | |
parent | c5dfa2ba7c21dac5ff6895f6e0fa2dc1dcc50cc1 (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.c')
-rw-r--r-- | VNFs/DPPD-PROX/task_init.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/VNFs/DPPD-PROX/task_init.c b/VNFs/DPPD-PROX/task_init.c index 3af0db2a..2bc83f39 100644 --- a/VNFs/DPPD-PROX/task_init.c +++ b/VNFs/DPPD-PROX/task_init.c @@ -174,7 +174,7 @@ static size_t init_rx_tx_rings_ports(struct task_args *targ, struct task_base *t } else { if (targ->nb_rxports == 1) { - if (targ->task_init->flag_features & TASK_FEATURE_L3) + if (targ->flags & TASK_ARG_L3) tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw1_multi_l3 : rx_pkt_hw1_l3; else tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw1_multi : rx_pkt_hw1; @@ -183,7 +183,7 @@ static size_t init_rx_tx_rings_ports(struct task_args *targ, struct task_base *t } else { PROX_ASSERT((targ->nb_rxports != 0) || (targ->task_init->flag_features & TASK_FEATURE_NO_RX)); - if (targ->task_init->flag_features & TASK_FEATURE_L3) + if (targ->flags & TASK_ARG_L3) tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw_multi_l3 : rx_pkt_hw_l3; else tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw_multi : rx_pkt_hw; @@ -196,7 +196,7 @@ static size_t init_rx_tx_rings_ports(struct task_args *targ, struct task_base *t } if (rte_is_power_of_2(targ->nb_rxports)) { - if (targ->task_init->flag_features & TASK_FEATURE_L3) + if (targ->flags & TASK_ARG_L3) tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw_pow2_multi_l3 : rx_pkt_hw_pow2_l3; else tbase->rx_pkt = (targ->task_init->flag_features & TASK_FEATURE_MULTI_RX)? rx_pkt_hw_pow2_multi : rx_pkt_hw_pow2; @@ -351,7 +351,7 @@ struct task_base *init_task_struct(struct task_args *targ) tbase->aux = (struct task_base_aux *)(((uint8_t *)tbase) + offset); if ((targ->nb_txrings != 0) || (targ->nb_txports != 0)) { - if (targ->task_init->flag_features & TASK_FEATURE_L3) { + if (targ->flags & TASK_ARG_L3) { tbase->aux->tx_pkt_l2 = tbase->tx_pkt; tbase->tx_pkt = tx_pkt_l3; } @@ -369,12 +369,12 @@ struct task_base *init_task_struct(struct task_args *targ) tbase->handle_bulk = t->handle; - if (targ->task_init->flag_features & TASK_FEATURE_L3) { + if (targ->flags & TASK_ARG_L3) { plog_info("\tTask configured in L3 mode\n"); tbase->l3.ctrl_plane_ring = targ->ctrl_plane_ring; } if ((targ->nb_txrings != 0) || (targ->nb_txports != 0)) { - if (targ->task_init->flag_features & TASK_FEATURE_L3) + if (targ->flags & TASK_ARG_L3) task_init_l3(tbase, targ); } |