diff options
author | Benoît Ganne <bganne@cisco.com> | 2021-03-04 14:31:03 +0100 |
---|---|---|
committer | Damjan Marion <dmarion@me.com> | 2021-05-01 11:42:37 +0000 |
commit | f89bbbe300dad7bc479db535e7822199f98aca30 (patch) | |
tree | 1163eeac010375a962fcda8c2e0c7a7046161bf1 /src/plugins/nat/lib | |
parent | c8983241b9d93d2c3b60b0705efbc3cdee54c534 (diff) |
vlib: refactor trajectory trace debug feature
trajectory trace has been broken for a while because we used to save the
buffer trajectory in a vector pointed to in opaque2. This does not work
well when opaque2 is copied (eg. because of a clone) as 2 buffers end up
sharing the same vector.
This dedicates a full cacheline in the buffer metadata instead when
trajectory is compiled in. No dynamic allocation, no sharing, no tears.
Type: refactor
Change-Id: I6a028ca1b48d38f393a36979e5e452c2dd48ad3f
Signed-off-by: Benoît Ganne <bganne@cisco.com>
Diffstat (limited to 'src/plugins/nat/lib')
-rw-r--r-- | src/plugins/nat/lib/ipfix_logging.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/src/plugins/nat/lib/ipfix_logging.c b/src/plugins/nat/lib/ipfix_logging.c index 2a5130e09d0..6e5e4b6c750 100644 --- a/src/plugins/nat/lib/ipfix_logging.c +++ b/src/plugins/nat/lib/ipfix_logging.c @@ -613,7 +613,6 @@ nat_ipfix_logging_nat44_ses (u32 thread_index, u8 nat_event, u32 src_ip, } b0 = sitd->nat44_session_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -714,7 +713,6 @@ nat_ipfix_logging_addr_exhausted (u32 thread_index, u32 pool_id, int do_flush) } b0 = sitd->addr_exhausted_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -800,7 +798,6 @@ nat_ipfix_logging_max_entries_per_usr (u32 thread_index, } b0 = sitd->max_entries_per_user_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -892,7 +889,6 @@ nat_ipfix_logging_max_ses (u32 thread_index, u32 limit, int do_flush) } b0 = sitd->max_sessions_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -981,7 +977,6 @@ nat_ipfix_logging_max_bib (u32 thread_index, u32 limit, int do_flush) } b0 = sitd->max_bibs_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -1071,7 +1066,6 @@ nat_ipfix_logging_nat64_bibe (u32 thread_index, u8 nat_event, } b0 = sitd->nat64_bib_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else @@ -1175,7 +1169,6 @@ nat_ipfix_logging_nat64_ses (u32 thread_index, u8 nat_event, } b0 = sitd->nat64_ses_buffer = vlib_get_buffer (vm, bi0); - VLIB_BUFFER_TRACE_TRAJECTORY_INIT (b0); offset = 0; } else |