From 8bca011d7b95868bee9c965c5a6fafc031835a6b Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Thu, 20 Dec 2018 22:01:40 +0100 Subject: Do not add count of non dataplane packets to dropped count RX packets count = TX count + dropped (handled + discarded) count + non dataplane packets count. Hence non dataplane packets such as unexpected packets (e.g. dhcp request) should not b considerded as handled. Change-Id: I45cef19fed09bb4f86644d56d689a0959a9038db Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/handle_lat.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'VNFs') diff --git a/VNFs/DPPD-PROX/handle_lat.c b/VNFs/DPPD-PROX/handle_lat.c index a0e5fb42..8c7de8f1 100644 --- a/VNFs/DPPD-PROX/handle_lat.c +++ b/VNFs/DPPD-PROX/handle_lat.c @@ -505,6 +505,7 @@ static void task_lat_store_lat(struct task_lat *task, uint64_t rx_packet_index, static int handle_lat_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts) { struct task_lat *task = (struct task_lat *)tbase; + int rc; // If link is down, link_speed is 0 if (unlikely(task->link_speed == 0)) { @@ -662,7 +663,11 @@ static int handle_lat_bulk(struct task_base *tbase, struct rte_mbuf **mbufs, uin task->begin = tbase->aux->tsc_rx.before; task->last_pkts_tsc = tbase->aux->tsc_rx.after; - return task->base.tx_pkt(&task->base, mbufs, n_pkts, NULL); + rc = task->base.tx_pkt(&task->base, mbufs, n_pkts, NULL); + // non_dp_count should not be drop-handled, as there are all by definition considered as not handled + // RX = DISCARDED + HANDLED + NON_DP + (TX - TX_NON_DP) + TX_FAIL + TASK_STATS_ADD_DROP_HANDLED(&tbase->aux->stats, -non_dp_count); + return rc; } static void init_task_lat_latency_buffer(struct task_lat *task, uint32_t core_id) -- cgit 1.2.3-korg