From a042fd8408a2993a18875a1b75f743af955e78e5 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Thu, 16 Apr 2020 16:09:14 +0200 Subject: Fix dump packets command dump packets (e.g. dump 1 0 1) was in some cases dumping more packets than expected. Proper count of packets is now dumped. Change-Id: I0974465d617eda00e77ee87148bf96991ecd3ed7 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/lconf.c | 3 +-- VNFs/DPPD-PROX/tx_pkt.c | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) (limited to 'VNFs/DPPD-PROX') diff --git a/VNFs/DPPD-PROX/lconf.c b/VNFs/DPPD-PROX/lconf.c index 23ae58eb..63e4763e 100644 --- a/VNFs/DPPD-PROX/lconf.c +++ b/VNFs/DPPD-PROX/lconf.c @@ -264,9 +264,8 @@ int lconf_do_flags(struct lcore_cfg *lconf) t = lconf->tasks_all[lconf->msg.task_id]; if (lconf->msg.val) { - t->aux->task_rt_dump.n_trace = lconf->msg.val; - if (task_base_get_original_rx_pkt_function(t) != rx_pkt_dummy) { + t->aux->task_rt_dump.n_trace = lconf->msg.val; task_base_add_rx_pkt_function(t, rx_pkt_trace); if (t->tx_pkt == tx_pkt_l3) { if (t->aux->tx_pkt_orig) diff --git a/VNFs/DPPD-PROX/tx_pkt.c b/VNFs/DPPD-PROX/tx_pkt.c index d494236c..e789d305 100644 --- a/VNFs/DPPD-PROX/tx_pkt.c +++ b/VNFs/DPPD-PROX/tx_pkt.c @@ -778,7 +778,7 @@ static inline void dump_pkts(struct task_base *tbase, struct rte_mbuf **mbufs, u for (uint32_t i = 0; i < n_trace; ++i) { plogdx_info(mbufs[i], "TX: "); } - tbase->aux->task_rt_dump.n_trace - n_trace; + tbase->aux->task_rt_dump.n_trace -= n_trace; } } -- cgit 1.2.3-korg