summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2020-04-16 16:09:14 +0200
committerXavier Simonart <xavier.simonart@intel.com>2020-04-24 14:40:32 +0000
commita042fd8408a2993a18875a1b75f743af955e78e5 (patch)
tree743fd745fc393fa1b2a988c50b8765a30a747fff
parentb4274493514c4467dbc6812afff30bcfe43407a5 (diff)
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 <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/lconf.c3
-rw-r--r--VNFs/DPPD-PROX/tx_pkt.c2
2 files changed, 2 insertions, 3 deletions
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;
}
}