From eafb5db63f20975076de8e35932f1ed306a2743e Mon Sep 17 00:00:00 2001 From: Klement Sekera Date: Mon, 15 Mar 2021 16:34:01 +0100 Subject: nat: fix HA multi-worker issues Use correct vlib_main() in various code parts. Fix tests. Type: fix Signed-off-by: Klement Sekera Change-Id: Ia379f3b686599532dedaafad2278c4097a3f03f3 --- src/plugins/nat/nat44-ei/nat44_ei_ha.h | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'src/plugins/nat/nat44-ei/nat44_ei_ha.h') diff --git a/src/plugins/nat/nat44-ei/nat44_ei_ha.h b/src/plugins/nat/nat44-ei/nat44_ei_ha.h index c466d4c9288..6fb749c99f1 100644 --- a/src/plugins/nat/nat44-ei/nat44_ei_ha.h +++ b/src/plugins/nat/nat44-ei/nat44_ei_ha.h @@ -62,7 +62,8 @@ void nat_ha_init (vlib_main_t * vm, u32 num_workers, u32 num_threads); * * @returns 0 on success, non-zero value otherwise. */ -int nat_ha_set_listener (ip4_address_t * addr, u16 port, u32 path_mtu); +int nat_ha_set_listener (vlib_main_t *vm, ip4_address_t *addr, u16 port, + u32 path_mtu); /** * @brief Get HA listener/local configuration @@ -79,7 +80,7 @@ void nat_ha_get_listener (ip4_address_t * addr, u16 * port, u32 * path_mtu); * * @returns 0 on success, non-zero value otherwise. */ -int nat_ha_set_failover (ip4_address_t * addr, u16 port, +int nat_ha_set_failover (vlib_main_t *vm, ip4_address_t *addr, u16 port, u32 session_refresh_interval); /** @@ -120,11 +121,11 @@ void nat_ha_sadd (ip4_address_t * in_addr, u16 in_port, * @param eh_port external host L4 port number * @param proto L4 protocol * @param fib_index fib index - * @param thread_index thread index + * @param session_thread_index index of thread where this session was stored */ -void nat_ha_sdel (ip4_address_t * out_addr, u16 out_port, - ip4_address_t * eh_addr, u16 eh_port, u8 proto, - u32 fib_index, u32 thread_index); +void nat_ha_sdel (ip4_address_t *out_addr, u16 out_port, + ip4_address_t *eh_addr, u16 eh_port, u8 proto, u32 fib_index, + u32 session_thread_index); /** * @brief Create session refresh HA event -- cgit 1.2.3-korg