From bc752e432ff3e252f6e1a3f0372c9532f14909cd Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 11 May 2020 08:58:05 +0000 Subject: nat: perf improvement - replace branchy code Use a lookup table instead. Type: improvement Signed-off-by: Klement Sekera Change-Id: Ia8461099828bb8824bf016201f135e6b69c444d1 --- src/plugins/nat/nat64.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/plugins/nat/nat64.h') diff --git a/src/plugins/nat/nat64.h b/src/plugins/nat/nat64.h index f13334447b0..7121638b570 100644 --- a/src/plugins/nat/nat64.h +++ b/src/plugins/nat/nat64.h @@ -226,7 +226,7 @@ int nat64_add_del_static_bib_entry (ip6_address_t * in_addr, * * @returns 0 on success, non-zero value otherwise. */ -int nat64_alloc_out_addr_and_port (u32 fib_index, snat_protocol_t proto, +int nat64_alloc_out_addr_and_port (u32 fib_index, nat_protocol_t proto, ip4_address_t * addr, u16 * port, u32 thread_index); -- cgit 1.2.3-korg