29 #define MSEC_PER_SEC 1000 30 #define IP6_REASS_TIMEOUT_DEFAULT_MS 100 31 #define IP6_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS 10000 // 10 seconds default 32 #define IP6_REASS_MAX_REASSEMBLIES_DEFAULT 1024 33 #define IP6_REASS_HT_LOAD_FACTOR (0.75) 61 return vnb->
ip.reass.range_first - vnb->
ip.reass.fragment_first;
68 ASSERT (vnb->
ip.reass.range_first >= vnb->
ip.reass.fragment_first);
76 return clib_min (vnb->
ip.reass.range_last, vnb->
ip.reass.fragment_last) -
84 ASSERT (vnb->
ip.reass.range_last > vnb->
ip.reass.fragment_first);
217 s =
format (s,
"first bi: %u, data len: %u, ip/fragment[%u, %u]",
231 s =
format (s,
"\n%Uicmp-error - frag_len > 65535 %U",
236 s =
format (s,
"\n%Uicmp-error - frag_len mod 8 != 0 %U",
241 s =
format (s,
"\n%Uicmp-error - reassembly time exceeded",
254 u32 bi, ip6_reass_trace_operation_e action,
262 b->
flags &= ~VLIB_BUFFER_IS_TRACED;
279 printf (
"%.*s\n",
vec_len (s), s);
296 clib_bihash_add_del_48_8 (&rm->
hash, &kv, 0);
308 while (~0 != range_bi)
317 if (b->
flags & VLIB_BUFFER_NEXT_PRESENT)
320 b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
327 range_bi = range_vnb->
ip.reass.next_range_bi;
334 u32 * icmp_bi,
u32 ** vec_timeout)
350 if (b->
flags & VLIB_BUFFER_NEXT_PRESENT)
353 b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
361 ICMP6_time_exceeded_fragment_reassembly_time_exceeded,
383 if (!clib_bihash_search_48_8 (&rm->
hash, &kv, &value))
408 memset (reass, 0,
sizeof (*reass));
427 if (clib_bihash_add_del_48_8 (&rm->
hash, &kv, 1))
440 u32 * error0,
u32 ** vec_drop_compress,
bool is_feature)
444 *error0 = IP6_ERROR_NONE;
445 ip6_frag_hdr_t *frag_hdr;
448 u32 total_length = 0;
453 u32 tmp_bi = sub_chain_bi;
456 u32 trim_front =
vnet_buffer (tmp)->ip.reass.ip6_frag_hdr_offset +
463 ASSERT (0 == ip6_reass_buffer_get_data_offset (tmp));
480 vec_add1 (*vec_drop_compress, tmp_bi);
484 tmp->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
499 last_b->
flags |= VLIB_BUFFER_NEXT_PRESENT;
503 if (keep_data <= tmp->current_length)
517 vec_add1 (*vec_drop_compress, tmp_bi);
521 if (tmp->
flags & VLIB_BUFFER_NEXT_PRESENT)
535 while (~0 != sub_chain_bi);
538 last_b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
542 first_b->
flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
548 ip6_ext_header_t *prev_hdr;
550 IP_PROTOCOL_IPV6_FRAGMENTATION);
553 prev_hdr->next_hdr = frag_hdr->next_hdr;
559 ASSERT ((
u8 *) frag_hdr - (
u8 *) ip == ip6_frag_hdr_offset);
560 memmove (frag_hdr, (
u8 *) frag_hdr +
sizeof (*frag_hdr),
562 sizeof (ip6_frag_hdr_t));
582 if (b->
flags & VLIB_BUFFER_NEXT_PRESENT)
591 printf (
"%.*s\n",
vec_len (s), s);
639 if (~0 != prev_range_bi)
643 new_next_vnb->
ip.reass.next_range_bi = prev_vnb->
ip.reass.next_range_bi;
644 prev_vnb->
ip.reass.next_range_bi = new_next_bi;
650 new_next_vnb->
ip.reass.next_range_bi = reass->
first_bi;
662 u32 * error0, ip6_frag_hdr_t * frag_hdr,
663 u32 ** vec_drop_overlap,
u32 ** vec_drop_compress,
669 fvnb->
ip.reass.ip6_frag_hdr_offset =
673 ASSERT (fvnb->
ip.reass.ip6_frag_hdr_offset > 0 &&
675 u32 fragment_first = fvnb->
ip.reass.fragment_first =
677 u32 fragment_length =
679 (fvnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
680 u32 fragment_last = fvnb->
ip.reass.fragment_last =
681 fragment_first + fragment_length - 1;
684 u32 prev_range_bi = ~0;
685 fvnb->
ip.reass.range_first = fragment_first;
686 fvnb->
ip.reass.range_last = fragment_last;
687 fvnb->
ip.reass.next_range_bi = ~0;
707 fvnb->
ip.reass.estimated_mtu);
708 while (~0 != candidate_range_bi)
712 if (fragment_first > candidate_vnb->
ip.reass.range_last)
715 prev_range_bi = candidate_range_bi;
716 candidate_range_bi = candidate_vnb->
ip.reass.next_range_bi;
717 if (candidate_vnb->
ip.reass.range_last < fragment_last &&
718 ~0 == candidate_range_bi)
722 prev_range_bi, *bi0);
728 if (fragment_last < candidate_vnb->ip.reass.range_first)
735 else if (fragment_first == candidate_vnb->
ip.reass.range_first &&
736 fragment_last == candidate_vnb->
ip.reass.range_last)
751 *error0 = IP6_ERROR_REASS_OVERLAPPING_FRAGMENT;
766 vec_drop_compress, is_feature);
778 *error0 = IP6_ERROR_REASS_DUPLICATE_FRAGMENT;
786 ip6_frag_hdr_t * frag_hdr)
788 ip6_ext_header_t *tmp = (ip6_ext_header_t *) frag_hdr;
793 if (IP_PROTOCOL_IP6_NONXT == tmp->next_hdr)
796 ICMP6_parameter_problem_first_fragment_has_incomplete_header_chain,
798 b->
error = node->
errors[IP6_ERROR_REASS_MISSING_UPPER];
809 ip6_frag_hdr_t * frag_hdr)
814 u32 fragment_length =
816 (vnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
817 if (more_fragments && 0 != fragment_length % 8)
820 ICMP6_parameter_problem_erroneous_header_field,
831 ip6_frag_hdr_t * frag_hdr)
835 u32 fragment_length =
837 (vnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
838 if (fragment_first + fragment_length > 65535)
842 ICMP6_parameter_problem_erroneous_header_field,
843 (
u8 *) & frag_hdr->fragment_offset_and_more
856 u32 n_left_from, n_left_to_next, *to_next, next_index;
863 static u32 *vec_timeout =
NULL;
864 static u32 *vec_drop_overlap =
NULL;
865 static u32 *vec_drop_compress =
NULL;
866 while (n_left_from > 0 ||
vec_len (vec_timeout) > 0 ||
867 vec_len (vec_drop_overlap) > 0 ||
vec_len (vec_drop_compress) > 0)
871 while (
vec_len (vec_timeout) > 0 && n_left_to_next > 0)
886 while (
vec_len (vec_drop_overlap) > 0 && n_left_to_next > 0)
890 b->
error = node->
errors[IP6_ERROR_REASS_OVERLAPPING_FRAGMENT];
901 while (
vec_len (vec_drop_compress) > 0 && n_left_to_next > 0)
916 while (n_left_from > 0 && n_left_to_next > 0)
921 u32 error0 = IP6_ERROR_NONE;
928 ip6_frag_hdr_t *frag_hdr =
NULL;
929 ip6_ext_header_t *prev_hdr;
933 IP_PROTOCOL_IPV6_FRAGMENTATION);
958 (
u8 *) frag_hdr - (
u8 *) ip0;
966 k.
frag_id = frag_hdr->identification;
976 &error0, frag_hdr, &vec_drop_overlap,
977 &vec_drop_compress, is_feature);
982 error0 = IP6_ERROR_REASS_LIMIT_REACHED;
993 if (is_feature && IP6_ERROR_NONE == error0)
999 n_left_to_next, bi0, next0);
1005 to_next[0] = icmp_bi;
1007 n_left_to_next -= 1;
1009 n_left_to_next, icmp_bi,
1024 #define _(sym, string) string, 1039 .name =
"ip6-reassembly",
1040 .vector_size =
sizeof (
u32),
1042 .n_errors =
ARRAY_LEN (ip6_reassembly_error_strings),
1066 .name =
"ip6-reassembly-feature",
1067 .vector_size =
sizeof (
u32),
1069 .n_errors =
ARRAY_LEN (ip6_reassembly_error_strings),
1085 .arc_name =
"ip6-unicast",
1086 .node_name =
"ip6-reassembly-feature",
1101 for (i = 0; i < 31; i++)
1102 if ((1 << i) >= nbuckets)
1124 if (clib_bihash_add_del_48_8 (ctx->
new_hash, kv, 1))
1132 u32 expire_walk_interval_ms)
1142 u32 expire_walk_interval_ms)
1146 expire_walk_interval_ms);
1151 if (ip6_reass_main.
max_reass_n > 0 && new_nbuckets > old_nbuckets)
1153 clib_bihash_48_8_t new_hash;
1154 memset (&new_hash, 0,
sizeof (new_hash));
1158 clib_bihash_init_48_8 (&new_hash,
"ip6-reass", new_nbuckets,
1159 new_nbuckets * 1024);
1160 clib_bihash_foreach_key_value_pair_48_8 (&ip6_reass_main.
hash,
1164 clib_bihash_free_48_8 (&new_hash);
1169 clib_bihash_free_48_8 (&ip6_reass_main.
hash);
1171 sizeof (ip6_reass_main.
hash));
1179 u32 * expire_walk_interval_ms)
1215 clib_bihash_init_48_8 (&rm->
hash,
"ip6-reass", nbuckets, nbuckets * 1024);
1227 ip6_reass_node.index);
1239 uword event_type, *event_data = 0;
1263 int *pool_indexes_to_free =
NULL;
1265 uword thread_index = 0;
1269 for (thread_index = 0; thread_index < nthreads; ++thread_index)
1277 reass = pool_elt_at_index (rt->pool, index);
1278 if (now > reass->last_heard + rm->timeout)
1280 vec_add1 (pool_indexes_to_free, index);
1298 b->
flags &= ~VLIB_BUFFER_IS_TRACED;
1303 ASSERT (rt->buffers_n >= (after - before));
1304 rt->buffers_n -= (after - before);
1308 ASSERT (rt->buffers_n > 0);
1318 while (
vec_len (vec_timeout) > 0)
1323 int trace_frame = 0;
1324 while (
vec_len (vec_timeout) > 0 && n_left_to_next > 0)
1334 b->
flags &= ~VLIB_BUFFER_IS_TRACED;
1345 n_left_to_next -= 1;
1351 while (
vec_len (vec_icmp_bi) > 0)
1357 int trace_frame = 0;
1358 while (
vec_len (vec_icmp_bi) > 0 && n_left_to_next > 0)
1368 b->
flags &= ~VLIB_BUFFER_IS_TRACED;
1379 n_left_to_next -= 1;
1390 _vec_len (event_data) = 0;
1404 .name =
"ip6-reassembly-expire-walk",
1416 s =
format (s,
"xx_id: %u, src: %U, dst: %U, frag_id: %u, proto: %u",
1428 s =
format (s,
"ID: %lu, key: %U\n first_bi: %u, data_len: %u, " 1429 "last_packet_octet: %u, trace_op_counter: %u\n",
1439 s =
format (s,
" #%03u: range: [%u, %u], bi: %u, off: %d, len: %u, " 1440 "fragment[%u, %u]\n",
1441 counter, vnb->
ip.reass.range_first,
1442 vnb->
ip.reass.range_last, bi,
1445 vnb->
ip.reass.fragment_first, vnb->
ip.reass.fragment_last);
1446 if (b->
flags & VLIB_BUFFER_NEXT_PRESENT)
1467 bool details =
false;
1473 u32 sum_reass_n = 0;
1474 u64 sum_buffers_n = 0;
1478 for (thread_index = 0; thread_index < nthreads; ++thread_index)
1486 vlib_cli_output (vm,
"%U", format_ip6_reass, vm, reass);
1496 (
long unsigned) sum_reass_n);
1497 vlib_cli_output (vm,
"Maximum configured concurrent IP6 reassemblies per " 1498 "worker-thread: %lu\n", (
long unsigned) rm->
max_reass_n);
1500 (
long unsigned) sum_buffers_n);
1506 .path =
"show ip6-reassembly",
1507 .short_help =
"show ip6-reassembly [details]",
1516 sw_if_index, enable_disable, 0, 0);
#define IP6_REASS_TIMEOUT_DEFAULT_MS
static u32 ip6_reass_buffer_get_data_offset_no_check(vlib_buffer_t *b)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
static f64 vlib_process_wait_for_event_or_clock(vlib_main_t *vm, f64 dt)
Suspend a cooperative multi-tasking thread Waits for an event, or for the indicated number of seconds...
static uword ip6_reassembly(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
static ip6_reass_t * ip6_reass_find_or_create(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_reass_main_t *rm, ip6_reass_per_thread_t *rt, ip6_reass_key_t *k, u32 *icmp_bi, u32 **vec_timeout)
void ip6_register_protocol(u32 protocol, u32 node_index)
vnet_main_t * vnet_get_main(void)
#define pool_alloc(P, N)
Allocate N more free elements to pool (unspecified alignment).
#define IP6_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS
static void vlib_buffer_chain_compress(vlib_main_t *vm, vlib_buffer_t *first, u32 **discard_vector)
compress buffer chain in a way where the first buffer is at least VLIB_BUFFER_CHAIN_MIN_FIRST_DATA_SI...
static f64 vlib_time_now(vlib_main_t *vm)
static clib_error_t * ip6_reass_init_function(vlib_main_t *vm)
static vlib_node_registration_t ip6_reass_expire_node
(constructor) VLIB_REGISTER_NODE (ip6_reass_expire_node)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
ip6_reass_trace_operation_e action
static void * ip6_ext_next_header(ip6_ext_header_t *ext_hdr)
ip6_reass_per_thread_t * per_thread_data
vlib_error_t * errors
Vector of errors for this node.
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
static void ip6_reass_trace_details(vlib_main_t *vm, u32 bi, ip6_reass_range_trace_t *trace)
VLIB_NODE_FUNCTION_MULTIARCH(ip6_reass_node, ip6_reassembly)
#define vec_pop(V)
Returns last element of a vector and decrements its length.
static u16 ip6_reass_buffer_get_data_len(vlib_buffer_t *b)
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
#define IP6_REASS_HT_LOAD_FACTOR
u32 expire_walk_interval_ms
static u32 ip6_reass_get_nbuckets()
vlib_trace_header_t ** trace_buffer_pool
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
#define VLIB_INIT_FUNCTION(x)
static uword vlib_process_get_events(vlib_main_t *vm, uword **data_vector)
Return the first event type which has occurred and a vector of per-event data of that type...
static void ip6_reass_free(ip6_reass_main_t *rm, ip6_reass_per_thread_t *rt, ip6_reass_t *reass)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
vnet_api_error_t ip6_reass_set(u32 timeout_ms, u32 max_reassemblies, u32 expire_walk_interval_ms)
set ip6 reassembly configuration
static u8 * format_ip6_reass_range_trace(u8 *s, va_list *args)
#define vlib_call_init_function(vm, x)
struct vnet_buffer_opaque_t::@57::@59 ip
ip6_reass_main_t ip6_reass_main
void icmp6_error_set_vnet_buffer(vlib_buffer_t *b, u8 type, u8 code, u32 data)
static void clib_spinlock_init(clib_spinlock_t *p)
static char * ip6_reassembly_error_strings[]
#define ip6_frag_hdr_more(hdr)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
u16 current_length
Nbytes between current data and the end of this buffer.
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
#define pool_put(P, E)
Free an object E in pool P.
static bool ip6_reass_verify_packet_size_lt_64k(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
static u32 ip6_reass_buffer_get_data_offset(vlib_buffer_t *b)
static_always_inline void vnet_feature_next(u32 sw_if_index, u32 *next0, vlib_buffer_t *b0)
#define vlib_validate_buffer_enqueue_x1(vm, node, next_index, to_next, n_left_to_next, bi0, next0)
Finish enqueueing one buffer forward in the graph.
ip6_reass_range_trace_t trace_range
#define vlib_get_next_frame(vm, node, next_index, vectors, n_vectors_left)
Get pointer to next frame vector data by (vlib_node_runtime_t, next_index).
vlib_error_t error
Error code for buffers to be enqueued to error handler.
VNET_FEATURE_INIT(ip6_reassembly_feature, static)
static vlib_cli_command_t show_ip6_reassembly_cmd
(constructor) VLIB_CLI_COMMAND (show_ip6_reassembly_cmd)
#define VLIB_REGISTER_NODE(x,...)
clib_error_t * ip_main_init(vlib_main_t *vm)
static vlib_node_registration_t ip6_reass_node_feature
(constructor) VLIB_REGISTER_NODE (ip6_reass_node_feature)
#define vec_free(V)
Free vector's memory (no header).
#define clib_warning(format, args...)
#define clib_memcpy(a, b, c)
static void ip6_rehash_cb(clib_bihash_kv_48_8_t *kv, void *_ctx)
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define ip6_frag_hdr_offset_bytes(hdr)
void vlib_put_next_frame(vlib_main_t *vm, vlib_node_runtime_t *r, u32 next_index, u32 n_vectors_left)
Release pointer to next frame vector data.
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
static void ip6_reass_on_timeout(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_reass_main_t *rm, ip6_reass_t *reass, u32 *icmp_bi, u32 **vec_timeout)
static u8 ip6_ext_hdr(u8 nexthdr)
#define VLIB_CLI_COMMAND(x,...)
static bool ip6_reass_verify_fragment_multiple_8(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
#define ip6_frag_hdr_offset(hdr)
static u8 * format_ip6_reass_key(u8 *s, va_list *args)
u16 cached_next_index
Next frame index that vector arguments were last enqueued to last time this node ran.
static uword ip6_reassembly_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, bool is_feature)
static vlib_node_registration_t ip6_reass_node
(constructor) VLIB_REGISTER_NODE (ip6_reass_node)
static void ip6_reass_drop_all(vlib_main_t *vm, ip6_reass_main_t *rm, ip6_reass_t *reass, u32 **vec_drop_bi)
u32 next_buffer
Next buffer for this linked-list of buffers.
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
vlib_trace_main_t trace_main
static clib_error_t * show_ip6_reass(vlib_main_t *vm, unformat_input_t *input, CLIB_UNUSED(vlib_cli_command_t *lmd))
#define VNET_FEATURES(...)
static void ip6_reass_update(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_reass_main_t *rm, ip6_reass_per_thread_t *rt, ip6_reass_t *reass, u32 *bi0, u32 *next0, u32 *error0, ip6_frag_hdr_t *frag_hdr, u32 **vec_drop_overlap, u32 **vec_drop_compress, bool is_feature)
static void ip6_reass_insert_range_in_chain(vlib_main_t *vm, ip6_reass_main_t *rm, ip6_reass_per_thread_t *rt, ip6_reass_t *reass, u32 prev_range_bi, u32 new_next_bi)
static u8 * format_ip6_reass_trace(u8 *s, va_list *args)
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
static u8 * format_ip6_reass(u8 *s, va_list *args)
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
struct _vlib_node_registration vlib_node_registration_t
static u32 ip6_reass_get_buffer_chain_length(vlib_main_t *vm, vlib_buffer_t *b)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
static uword ip6_reass_walk_expired(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
static void ip6_reass_add_trace(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_reass_main_t *rm, ip6_reass_t *reass, u32 bi, ip6_reass_trace_operation_e action, u32 size_diff)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
ip6_reass_trace_operation_e
uword os_get_nthreads(void)
static_always_inline uword os_get_thread_index(void)
#define foreach_ip6_error
#define IP6_REASS_MAX_REASSEMBLIES_DEFAULT
static u16 ip6_reass_buffer_get_data_len_no_check(vlib_buffer_t *b)
vnet_api_error_t ip6_reass_get(u32 *timeout_ms, u32 *max_reassemblies, u32 *expire_walk_interval_ms)
get ip6 reassembly configuration
clib_bihash_48_8_t * new_hash
static u32 vlib_num_workers()
static uword ip6_reassembly_feature(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
#define vec_foreach(var, vec)
Vector iterator.
vnet_api_error_t ip6_reass_enable_disable(u32 sw_if_index, u8 enable_disable)
#define ip6_ext_header_find_t(i, p, m, t)
static void ip6_reass_set_params(u32 timeout_ms, u32 max_reassemblies, u32 expire_walk_interval_ms)
static void ip6_reass_finalize(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_reass_main_t *rm, ip6_reass_per_thread_t *rt, ip6_reass_t *reass, u32 *bi0, u32 *next0, u32 *error0, u32 **vec_drop_compress, bool is_feature)
u32 ip6_reass_expire_node_idx
static bool ip6_reass_verify_upper_layer_present(vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
#define pool_foreach_index(i, v, body)
Iterate pool by index.
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
u32 trace_index
Specifies index into trace buffer if VLIB_PACKET_IS_TRACED flag is set.
int vnet_feature_enable_disable(const char *arc_name, const char *node_name, u32 sw_if_index, int enable_disable, void *feature_config, u32 n_feature_config_bytes)
CLIB vectors are ubiquitous dynamically resized arrays with by user defined "headers".