From 9fa316261d7d9e79bcff84fb84ab498b9e7d93f4 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Sat, 13 Jan 2018 21:28:14 +0100 Subject: Fix latency accuracy and dumping latencies to file - Also changed lat_info.tx_packet_index to uint64_t, so also did it for task_lat.prev_tx_packet_index and n_loss. - Adjusted format strings accordingly, and fixed some other formats. - Adjusted overflow increment to 2^32 (i.e. UINT32_MAX + 1). - Replaced hard-coded 64 with ACCURACY_BUFFER_SIZE (still hard-coded in handle_gen.c). Change-Id: Ia59f36e17c0797a2a958dbe3b2ac420263473524 Signed-off-by: Xavier Simonart Signed-off-by: Patrice Buriez --- VNFs/DPPD-PROX/commands.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'VNFs/DPPD-PROX/commands.c') diff --git a/VNFs/DPPD-PROX/commands.c b/VNFs/DPPD-PROX/commands.c index f4cc1b6e..9f0be145 100644 --- a/VNFs/DPPD-PROX/commands.c +++ b/VNFs/DPPD-PROX/commands.c @@ -84,9 +84,14 @@ static void warn_inactive_cores(uint32_t *cores, int count, const char *prefix) static inline int wait_command_handled(struct lcore_cfg *lconf) { uint64_t t1 = rte_rdtsc(), t2; + int max_time = 5; + + if (lconf->msg.type == LCONF_MSG_STOP) + max_time = 30; + while (lconf_is_req(lconf)) { t2 = rte_rdtsc(); - if (t2 - t1 > 5 * rte_get_tsc_hz()) { + if (t2 - t1 > max_time * rte_get_tsc_hz()) { // Failed to handle command ... for (uint8_t task_id = 0; task_id < lconf->n_tasks_all; ++task_id) { struct task_args *targs = &lconf->targs[task_id]; -- cgit 1.2.3-korg