From 93248789fb892c3a0f37ec790293344efd860081 Mon Sep 17 00:00:00 2001 From: Jon Loeliger Date: Tue, 14 May 2019 15:02:39 -0500 Subject: Remove unused function nat44_ha_resync() and error IN_PROGRESS. The unused function nat44_ha_resync() was the only function that used the error message VNET_API_ERROR_IN_PROGRESS. The error was the only error code that was positive, and didn't really play well with the other error codes. Change-Id: I7d03c2ee915094b635f6efdca7427f71e4d19f2b Signed-off-by: Jon Loeliger --- src/plugins/nat/nat_ha.c | 38 -------------------------------------- src/vnet/api_errno.h | 1 - 2 files changed, 39 deletions(-) (limited to 'src') diff --git a/src/plugins/nat/nat_ha.c b/src/plugins/nat/nat_ha.c index a7eaf6ec5d0..e81e916e389 100644 --- a/src/plugins/nat/nat_ha.c +++ b/src/plugins/nat/nat_ha.c @@ -821,44 +821,6 @@ nat_ha_get_resync_status (u8 * in_resync, u32 * resync_ack_missed) *resync_ack_missed = ha->resync_ack_missed; } -int -nat44_ha_resync (u32 client_index, u32 pid, - nat_ha_resync_event_cb_t event_callback) -{ - nat_ha_main_t *ha = &nat_ha_main; - snat_main_t *sm = &snat_main; - snat_session_t *ses; - snat_main_per_thread_data_t *tsm; - - if (ha->in_resync) - return VNET_API_ERROR_IN_PROGRESS; - - ha->in_resync = 1; - ha->resync_ack_count = 0; - ha->resync_ack_missed = 0; - ha->event_callback = event_callback; - ha->client_index = client_index; - ha->pid = pid; - - /* *INDENT-OFF* */ - vec_foreach (tsm, sm->per_thread_data) - { - pool_foreach (ses, tsm->sessions, ({ - nat_ha_sadd (&ses->in2out.addr, ses->in2out.port, - &ses->out2in.addr, ses->out2in.port, - &ses->ext_host_addr, ses->ext_host_port, - &ses->ext_host_nat_addr, ses->ext_host_nat_port, - ses->in2out.protocol, ses->in2out.fib_index, - ses->flags, 0, 1); - })); - } - /* *INDENT-ON* */ - - nat_ha_flush (1); - - return 0; -} - typedef struct { ip4_address_t addr; diff --git a/src/vnet/api_errno.h b/src/vnet/api_errno.h index c4cb3c9dda7..e59f3cb1325 100644 --- a/src/vnet/api_errno.h +++ b/src/vnet/api_errno.h @@ -55,7 +55,6 @@ _(ADDRESS_LENGTH_MISMATCH, -59, "Address length mismatch") \ _(ADDRESS_NOT_FOUND_FOR_INTERFACE, -60, "Address not found for interface") \ _(ADDRESS_NOT_DELETABLE, -61, "Address not deletable") \ _(IP6_NOT_ENABLED, -62, "ip6 not enabled") \ -_(IN_PROGRESS, 10, "Operation in progress") \ _(NO_SUCH_NODE, -63, "No such graph node") \ _(NO_SUCH_NODE2, -64, "No such graph node #2") \ _(NO_SUCH_TABLE, -65, "No such table") \ -- cgit 1.2.3-korg