summaryrefslogtreecommitdiffstats
path: root/src/plugins/nat/nat44-ed/nat44_ed.h
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-03-15 19:52:57 +0100
committerKlement Sekera <ksekera@cisco.com>2021-03-15 22:07:43 +0100
commit3a5bd85476311d4ad2b0cbbca3f98d53f13a3afb (patch)
tree2a17c25f10fe3227b12460f3bf82743856d18d47 /src/plugins/nat/nat44-ed/nat44_ed.h
parent7db75dd0d32d92674bbb7aa1b23341e8a349e05a (diff)
nat: get rid of worker selection callbacks
Make code easier to read and debug. Type: improvement Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: Ib52a4cdd3bcdcc475053aa32af3964c00859e1cd
Diffstat (limited to 'src/plugins/nat/nat44-ed/nat44_ed.h')
-rw-r--r--src/plugins/nat/nat44-ed/nat44_ed.h17
1 files changed, 5 insertions, 12 deletions
diff --git a/src/plugins/nat/nat44-ed/nat44_ed.h b/src/plugins/nat/nat44-ed/nat44_ed.h
index 66276285584..c9ae089210d 100644
--- a/src/plugins/nat/nat44-ed/nat44_ed.h
+++ b/src/plugins/nat/nat44-ed/nat44_ed.h
@@ -489,17 +489,12 @@ typedef struct
struct snat_main_s;
-/* Return worker thread index for given packet */
-typedef u32 (snat_get_worker_in2out_function_t) (vlib_buffer_t *b,
- ip4_header_t *ip,
- u32 rx_fib_index,
- u8 is_output);
-
-typedef u32 (snat_get_worker_out2in_function_t) (vlib_buffer_t * b,
- ip4_header_t * ip,
- u32 rx_fib_index,
- u8 is_output);
+u32 nat44_ed_get_in2out_worker_index (vlib_buffer_t *b, ip4_header_t *ip,
+ u32 rx_fib_index, u8 is_output);
+u32 nat44_ed_get_out2in_worker_index (vlib_buffer_t *b, ip4_header_t *ip,
+ u32 rx_fib_index, u8 is_output);
+/* Return worker thread index for given packet */
/* NAT address and port allocation function */
typedef int (nat_alloc_out_addr_and_port_function_t) (snat_address_t *
addresses,
@@ -517,8 +512,6 @@ typedef struct snat_main_s
u32 num_workers;
u32 first_worker_index;
u32 *workers;
- snat_get_worker_in2out_function_t *worker_in2out_cb;
- snat_get_worker_out2in_function_t *worker_out2in_cb;
u16 port_per_thread;
/* Per thread data */