- }
- if ((targ->nb_txrings != 0) || (targ->nb_txports != 0)) {
- if (targ->task_init->flag_features & TASK_FEATURE_L3)
- task_init_l3(tbase, targ);
+ if (targ->nb_txports != 0) {
+ tbase->aux->tx_pkt_l2 = tbase->tx_pkt;
+ tbase->aux->tx_ctrlplane_pkt = targ->nb_txrings ? tx_ctrlplane_sw : tx_ctrlplane_hw;
+ if (targ->flags & TASK_ARG_L3) {
+ tbase->tx_pkt = tx_pkt_l3;
+ task_init_l3(tbase, targ);
+ } else if (targ->flags & TASK_ARG_NDP) {
+ tbase->tx_pkt = tx_pkt_ndp;
+ task_init_l3(tbase, targ);
+ }
+ // Make sure control plane packets such as arp are not dropped
+ }