From 1614130d60abfaa89a41ba8eed5f9bbf41d9a4f4 Mon Sep 17 00:00:00 2001 From: Xavier Simonart Date: Sun, 10 May 2020 21:04:08 +0200 Subject: Improve performance in l3 submode Two cases where performance has been improved - When using a gateway from a routing table (l3 submode), store the mac within the next hop table, to avoid a hash_lookup. This gives ~10% improvement. - Read tsc only once per bulk (of up to 64 packets). This gives ~10% improvement to swap, 4% to gen. In addition a small fix has been added, preventig "No route" Error to be written too aften. Change-Id: I8a7ab74a32f09c8ff47f751ee91e84afee1b2147 Signed-off-by: Xavier Simonart --- VNFs/DPPD-PROX/packet_utils.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'VNFs/DPPD-PROX/packet_utils.h') diff --git a/VNFs/DPPD-PROX/packet_utils.h b/VNFs/DPPD-PROX/packet_utils.h index 021528de..0a1ef9d8 100644 --- a/VNFs/DPPD-PROX/packet_utils.h +++ b/VNFs/DPPD-PROX/packet_utils.h @@ -69,7 +69,7 @@ struct l3_base { void task_init_l3(struct task_base *tbase, struct task_args *targ); void task_start_l3(struct task_base *tbase, struct task_args *targ); -int write_dst_mac(struct task_base *tbase, struct rte_mbuf *mbuf, uint32_t *ip_dst, uint64_t **time); +int write_dst_mac(struct task_base *tbase, struct rte_mbuf *mbuf, uint32_t *ip_dst, uint64_t **time, uint64_t tsc); void task_set_gateway_ip(struct task_base *tbase, uint32_t ip); void task_set_local_ip(struct task_base *tbase, uint32_t ip); void handle_ctrl_plane_pkts(struct task_base *tbase, struct rte_mbuf **mbufs, uint16_t n_pkts); -- cgit 1.2.3-korg