diff options
author | Xavier Simonart <xavier.simonart@intel.com> | 2018-12-20 22:01:40 +0100 |
---|---|---|
committer | Xavier Simonart <xavier.simonart@intel.com> | 2018-12-20 22:01:40 +0100 |
commit | 8bca011d7b95868bee9c965c5a6fafc031835a6b (patch) | |
tree | 254e3869d7475c70ab89f4a9f085e4c73a7e9690 /VNFs | |
parent | ffc6be265ca04773fb4fff09648304d156612e1c (diff) |
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 <xavier.simonart@intel.com>
Diffstat (limited to 'VNFs')
-rw-r--r-- | VNFs/DPPD-PROX/handle_lat.c | 7 |
1 files changed, 6 insertions, 1 deletions
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) |