summaryrefslogtreecommitdiffstats
path: root/VNFs/DPPD-PROX/lconf.c
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2018-01-08 12:32:23 +0100
committerXavier Simonart <xavier.simonart@intel.com>2018-01-16 16:39:40 +0100
commit2fbaf3b39062ae832ced4b62f823e6191ac79995 (patch)
treebf3e4b5b122d810702ceba4f2fbdccd74028d518 /VNFs/DPPD-PROX/lconf.c
parentdeab1ee8197298bd7cf30d259a28206841d59383 (diff)
Fix dumping receive packets
There were two issues identified in dump receive packets - when the receive packets was going to be dropped (and not transmitted), it was also printed as TX[255]. - a potential crash when using the dump function with modes like lat which can receive more than MAX_RING_BURST. Those issues have been fixed. Change-Id: Ia2297539d64961a211389d68e3c9c6280472243c Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs/DPPD-PROX/lconf.c')
-rw-r--r--VNFs/DPPD-PROX/lconf.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/VNFs/DPPD-PROX/lconf.c b/VNFs/DPPD-PROX/lconf.c
index 682c106f..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);