X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fplugins%2Fnat%2Flib%2Fipfix_logging.c;h=2fb8912226da754350c5a33b62ae32aeda87def4;hb=4abc86639249f5c1ed2e0133dc336de549c96c40;hp=f66458572d31f6827fef0e145cc4afea8575789d;hpb=46d6864b9de6d722c4b6eb72d231918b251e267d;p=vpp.git diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c index f66458572d3..2fb8912226d 100644 --- a/src/plugins/nat/lib/ipfix_logging.c +++ b/src/plugins/nat/lib/ipfix_logging.c @@ -544,7 +544,7 @@ nat_ipfix_send (u32 thread_index, flow_report_main_t * frm, ipfix_set_header_t *s = 0; ip4_header_t *ip; udp_header_t *udp; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); tp = vlib_buffer_get_current (b0); ip = (ip4_header_t *) & tp->ip4; @@ -588,7 +588,7 @@ nat_ipfix_logging_nat44_ses (u32 thread_index, u8 nat_event, u32 src_ip, vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u8 proto; u16 template_id; @@ -692,7 +692,7 @@ nat_ipfix_logging_addr_exhausted (u32 thread_index, u32 pool_id, int do_flush) vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u8 nat_event = NAT_ADDRESSES_EXHAUTED; u16 template_id; @@ -777,7 +777,7 @@ nat_ipfix_logging_max_entries_per_usr (u32 thread_index, vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u8 nat_event = QUOTA_EXCEEDED; u32 quota_event = MAX_ENTRIES_PER_USER; @@ -868,7 +868,7 @@ nat_ipfix_logging_max_ses (u32 thread_index, u32 limit, int do_flush) vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u8 nat_event = QUOTA_EXCEEDED; u32 quota_event = MAX_SESSION_ENTRIES; @@ -956,7 +956,7 @@ nat_ipfix_logging_max_bib (u32 thread_index, u32 limit, int do_flush) vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u8 nat_event = QUOTA_EXCEEDED; u32 quota_event = MAX_BIB_ENTRIES; @@ -1047,7 +1047,7 @@ nat_ipfix_logging_nat64_bibe (u32 thread_index, u8 nat_event, vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u16 template_id; @@ -1151,7 +1151,7 @@ nat_ipfix_logging_nat64_ses (u32 thread_index, u8 nat_event, vlib_buffer_t *b0 = 0; u32 bi0 = ~0; u32 offset; - vlib_main_t *vm = vlib_mains[thread_index]; + vlib_main_t *vm = vlib_get_main (); u64 now; u16 template_id;