X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=VNFs%2FDPPD-PROX%2Flconf.c;h=935bac5d3ad9cfcaca19c8404dc06f7cb3e3c893;hb=4805ad5dc114b24724b754443c2fc1e6957f6e3a;hp=399c8a7d8f824ac3ae423914cb5ce8353c44ab91;hpb=516aad7ecf88e968940d384a1f56dca4e42a279b;p=samplevnf.git diff --git a/VNFs/DPPD-PROX/lconf.c b/VNFs/DPPD-PROX/lconf.c index 399c8a7d..935bac5d 100644 --- a/VNFs/DPPD-PROX/lconf.c +++ b/VNFs/DPPD-PROX/lconf.c @@ -198,6 +198,15 @@ int lconf_do_flags(struct lcore_cfg *lconf) struct task_base *t; int ret = 0; + if ((lconf->msg.type == LCONF_MSG_TRACE) && (lconf->tasks_all[lconf->msg.task_id]->tx_pkt == tx_pkt_drop_all)) { + /* We are asked to dump packets through command dump. + * This usually means map RX and TX packets before printing them. + * However we do not transmit the packets in this case => use the DUMP_RX function. + * This will prevent seeing the received packets also printed as TX[255] (= dropped) + */ + lconf->msg.type = LCONF_MSG_DUMP_RX; + } + switch (lconf->msg.type) { case LCONF_MSG_STOP: msg_stop(lconf); @@ -307,10 +316,10 @@ int lconf_do_flags(struct lcore_cfg *lconf) t = lconf->tasks_all[task_id]; if (t->aux->tx_pkt_orig) { if (t->tx_pkt == tx_pkt_l3) { - t->tx_pkt = t->aux->tx_pkt_orig; + t->aux->tx_pkt_l2 = t->aux->tx_pkt_orig; t->aux->tx_pkt_orig = NULL; } else { - t->aux->tx_pkt_l2 = t->aux->tx_pkt_orig; + t->tx_pkt = t->aux->tx_pkt_orig; t->aux->tx_pkt_orig = NULL; } lconf->flags &= ~LCONF_FLAG_TX_DISTR_ACTIVE;