summaryrefslogtreecommitdiffstats
path: root/src/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins')
-rw-r--r--src/plugins/nat/nat44_classify.c17
-rw-r--r--src/plugins/nat/nat_inlines.h30
2 files changed, 0 insertions, 47 deletions
diff --git a/src/plugins/nat/nat44_classify.c b/src/plugins/nat/nat44_classify.c
index 54c52e3ee4b..a239c67c553 100644
--- a/src/plugins/nat/nat44_classify.c
+++ b/src/plugins/nat/nat44_classify.c
@@ -84,7 +84,6 @@ nat44_classify_node_fn_inline (vlib_main_t * vm,
nat44_classify_next_t next_index;
snat_main_t *sm = &snat_main;
snat_static_mapping_t *m;
- u32 *fragments_to_drop = 0;
u32 next_in2out = 0, next_out2in = 0;
from = vlib_frame_vector_args (frame);
@@ -174,11 +173,6 @@ nat44_classify_node_fn_inline (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- nat_send_all_to_node (vm, fragments_to_drop, node, 0,
- NAT44_CLASSIFY_NEXT_DROP);
-
- vec_free (fragments_to_drop);
-
vlib_node_increment_counter (vm, node->node_index,
NAT44_CLASSIFY_ERROR_NEXT_IN2OUT, next_in2out);
vlib_node_increment_counter (vm, node->node_index,
@@ -195,7 +189,6 @@ nat44_handoff_classify_node_fn_inline (vlib_main_t * vm,
nat44_classify_next_t next_index;
snat_main_t *sm = &snat_main;
snat_static_mapping_t *m;
- u32 *fragments_to_drop = 0;
u32 next_in2out = 0, next_out2in = 0;
from = vlib_frame_vector_args (frame);
@@ -285,10 +278,6 @@ nat44_handoff_classify_node_fn_inline (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- nat_send_all_to_node (vm, fragments_to_drop, node, 0, NAT_NEXT_DROP);
-
- vec_free (fragments_to_drop);
-
vlib_node_increment_counter (vm, node->node_index,
NAT44_CLASSIFY_ERROR_NEXT_IN2OUT, next_in2out);
vlib_node_increment_counter (vm, node->node_index,
@@ -307,7 +296,6 @@ nat44_ed_classify_node_fn_inline (vlib_main_t * vm,
snat_static_mapping_t *m;
u32 thread_index = vm->thread_index;
snat_main_per_thread_data_t *tsm = &sm->per_thread_data[thread_index];
- u32 *fragments_to_drop = 0;
u32 next_in2out = 0, next_out2in = 0;
from = vlib_frame_vector_args (frame);
@@ -422,11 +410,6 @@ nat44_ed_classify_node_fn_inline (vlib_main_t * vm,
vlib_put_next_frame (vm, node, next_index, n_left_to_next);
}
- nat_send_all_to_node (vm, fragments_to_drop, node, 0,
- NAT44_CLASSIFY_NEXT_DROP);
-
- vec_free (fragments_to_drop);
-
vlib_node_increment_counter (vm, node->node_index,
NAT44_CLASSIFY_ERROR_NEXT_IN2OUT, next_in2out);
vlib_node_increment_counter (vm, node->node_index,
diff --git a/src/plugins/nat/nat_inlines.h b/src/plugins/nat/nat_inlines.h
index 67411750c95..0254de34d49 100644
--- a/src/plugins/nat/nat_inlines.h
+++ b/src/plugins/nat/nat_inlines.h
@@ -259,36 +259,6 @@ maximum_sessions_exceeded (snat_main_t * sm, u32 thread_index)
}
always_inline void
-nat_send_all_to_node (vlib_main_t * vm, u32 * bi_vector,
- vlib_node_runtime_t * node, vlib_error_t * error,
- u32 next)
-{
- u32 n_left_from, *from, next_index, *to_next, n_left_to_next;
-
- from = bi_vector;
- n_left_from = vec_len (bi_vector);
- next_index = node->cached_next_index;
- while (n_left_from > 0)
- {
- vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
- while (n_left_from > 0 && n_left_to_next > 0)
- {
- u32 bi0 = to_next[0] = from[0];
- from += 1;
- n_left_from -= 1;
- to_next += 1;
- n_left_to_next -= 1;
- vlib_buffer_t *p0 = vlib_get_buffer (vm, bi0);
- if (error)
- p0->error = *error;
- vlib_validate_buffer_enqueue_x1 (vm, node, next_index, to_next,
- n_left_to_next, bi0, next);
- }
- vlib_put_next_frame (vm, node, next_index, n_left_to_next);
- }
-}
-
-always_inline void
user_session_increment (snat_main_t * sm, snat_user_t * u, u8 is_static)
{
if (u->nsessions + u->nstaticsessions < sm->max_translations_per_user)