summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXavier Simonart <xavier.simonart@intel.com>2017-11-08 18:35:20 +0100
committerXavier Simonart <xavier.simonart@intel.com>2017-11-08 18:35:20 +0100
commit1541251d789dca4799d8589317b91376eae4bcf3 (patch)
tree8d7bcb1810f757b54e928087a340fe94b8cfade5
parentf608601d06f2da7dcb52f0a0da6caebd12412ad1 (diff)
Fix changing impair delay through command line
Change-Id: I7797241a1d384fa184bdf4d73b81babb21f7383d Signed-off-by: Xavier Simonart <xavier.simonart@intel.com>
-rw-r--r--VNFs/DPPD-PROX/handle_impair.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/VNFs/DPPD-PROX/handle_impair.c b/VNFs/DPPD-PROX/handle_impair.c
index 78c9e400..805dedfc 100644
--- a/VNFs/DPPD-PROX/handle_impair.c
+++ b/VNFs/DPPD-PROX/handle_impair.c
@@ -193,6 +193,7 @@ static int handle_bulk_random_drop(struct task_base *tbase, struct rte_mbuf **mb
struct task_impair *task = (struct task_impair *)tbase;
uint8_t out[MAX_PKT_BURST];
struct ether_hdr * hdr[MAX_PKT_BURST];
+ int ret = 0;
for (uint16_t i = 0; i < n_pkts; ++i) {
PREFETCH0(mbufs[i]);
}
@@ -210,8 +211,9 @@ static int handle_bulk_random_drop(struct task_base *tbase, struct rte_mbuf **mb
out[i] = rand_r(&task->seed) <= task->tresh? 0 : OUT_DISCARD;
}
}
- return task->base.tx_pkt(&task->base, mbufs, n_pkts, out);
+ ret = task->base.tx_pkt(&task->base, mbufs, n_pkts, out);
task_impair_update(tbase);
+ return ret;
}
static int handle_bulk_impair(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts)