Code Review
/
vpp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
NAT: VPP-1537 IPFIX per worker processing
[vpp.git]
/
src
/
plugins
/
nat
/
in2out.c
diff --git
a/src/plugins/nat/in2out.c
b/src/plugins/nat/in2out.c
index
15dae65
..
abb9160
100755
(executable)
--- a/
src/plugins/nat/in2out.c
+++ b/
src/plugins/nat/in2out.c
@@
-217,7
+217,8
@@
nat44_i2o_is_idle_session_cb (clib_bihash_kv_8_8_t * kv, void *arg)
if (clib_bihash_add_del_8_8 (&tsm->out2in, &s_kv, 0))
nat_log_warn ("out2in key del failed");
if (clib_bihash_add_del_8_8 (&tsm->out2in, &s_kv, 0))
nat_log_warn ("out2in key del failed");
- snat_ipfix_logging_nat44_ses_delete (s->in2out.addr.as_u32,
+ snat_ipfix_logging_nat44_ses_delete (ctx->thread_index,
+ s->in2out.addr.as_u32,
s->out2in.addr.as_u32,
s->in2out.protocol,
s->in2out.port,
s->out2in.addr.as_u32,
s->in2out.protocol,
s->in2out.port,
@@
-269,7
+270,7
@@
slow_path (snat_main_t * sm, vlib_buffer_t * b0,
if (PREDICT_FALSE (maximum_sessions_exceeded (sm, thread_index)))
{
b0->error = node->errors[SNAT_IN2OUT_ERROR_MAX_SESSIONS_EXCEEDED];
if (PREDICT_FALSE (maximum_sessions_exceeded (sm, thread_index)))
{
b0->error = node->errors[SNAT_IN2OUT_ERROR_MAX_SESSIONS_EXCEEDED];
- nat_ipfix_logging_max_sessions (sm->max_translations);
+ nat_ipfix_logging_max_sessions (
thread_index,
sm->max_translations);
nat_log_notice ("maximum sessions exceeded");
return SNAT_IN2OUT_NEXT_DROP;
}
nat_log_notice ("maximum sessions exceeded");
return SNAT_IN2OUT_NEXT_DROP;
}
@@
-373,7
+374,8
@@
slow_path (snat_main_t * sm, vlib_buffer_t * b0,
nat_log_notice ("out2in key add failed");
/* log NAT event */
nat_log_notice ("out2in key add failed");
/* log NAT event */
- snat_ipfix_logging_nat44_ses_create (s->in2out.addr.as_u32,
+ snat_ipfix_logging_nat44_ses_create (thread_index,
+ s->in2out.addr.as_u32,
s->out2in.addr.as_u32,
s->in2out.protocol,
s->in2out.port,
s->out2in.addr.as_u32,
s->in2out.protocol,
s->in2out.port,
@@
-1844,7
+1846,7
@@
nat44_in2out_reass_node_fn (vlib_main_t * vm,
if (PREDICT_FALSE (reass0->sess_index == (u32) ~ 0))
{
if (nat_ip4_reass_add_fragment
if (PREDICT_FALSE (reass0->sess_index == (u32) ~ 0))
{
if (nat_ip4_reass_add_fragment
- (reass0, bi0, &fragments_to_drop))
+ (
thread_index,
reass0, bi0, &fragments_to_drop))
{
b0->error = node->errors[SNAT_IN2OUT_ERROR_MAX_FRAG];
nat_log_notice
{
b0->error = node->errors[SNAT_IN2OUT_ERROR_MAX_FRAG];
nat_log_notice