|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
29 #define MSEC_PER_SEC 1000
30 #define IP6_FULL_REASS_TIMEOUT_DEFAULT_MS 100
31 #define IP6_FULL_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS 10000 // 10 seconds default
32 #define IP6_FULL_REASS_MAX_REASSEMBLIES_DEFAULT 1024
33 #define IP6_FULL_REASS_MAX_REASSEMBLY_LENGTH_DEFAULT 3
34 #define IP6_FULL_REASS_HT_LOAD_FACTOR (0.75)
87 return vnb->
ip.reass.range_first - vnb->
ip.reass.fragment_first;
94 return clib_min (vnb->
ip.reass.range_last, vnb->
ip.reass.fragment_last) -
95 (vnb->
ip.reass.fragment_first +
173 #ifndef CLIB_MARCH_VARIANT
229 trace->range_first = vnb->
ip.reass.range_first;
230 trace->range_last = vnb->
ip.reass.range_last;
233 trace->range_bi = bi;
242 format (s,
"range: [%u, %u], off %d, len %u, bi %u",
trace->range_first,
271 s =
format (s,
"first bi: %u, data len: %u, ip/fragment[%u, %u]",
286 s =
format (s,
"\n%Uicmp-error - frag_len > 65535 %U",
291 s =
format (s,
"\n%Uicmp-error - frag_len mod 8 != 0 %U",
296 s =
format (s,
"\n%Uicmp-error - reassembly time exceeded",
315 ip6_frag_hdr_t * ip6_frag_header,
321 bool is_after_handoff =
false;
326 b->
flags &= ~VLIB_BUFFER_IS_TRACED;
331 is_after_handoff =
true;
370 printf (
"%.*s\n",
vec_len (s), s);
396 clib_bihash_add_del_48_8 (&rm->
hash, &kv, 0);
408 while (~0 != range_bi)
417 if (
b->
flags & VLIB_BUFFER_NEXT_PRESENT)
420 b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
427 range_bi = range_vnb->
ip.reass.next_range_bi;
441 while (
vec_len (to_free) > 0 && n_left_to_next > 0)
483 if (
b->
flags & VLIB_BUFFER_NEXT_PRESENT)
486 b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
494 ICMP6_time_exceeded_fragment_reassembly_time_exceeded,
516 if (!clib_bihash_search_48_8 (&rm->
hash, &kv->
kv, &kv->
kv))
572 int rv = clib_bihash_add_del_48_8 (&rm->
hash, &kv->
kv, 2);
590 u32 * error0,
bool is_custom_app)
593 *error0 = IP6_ERROR_NONE;
594 ip6_frag_hdr_t *frag_hdr;
597 u32 total_length = 0;
600 u32 *vec_drop_compress = NULL;
604 u32 tmp_bi = sub_chain_bi;
607 if (!(vnb->
ip.reass.range_first >= vnb->
ip.reass.fragment_first) &&
608 !(vnb->
ip.reass.range_last > vnb->
ip.reass.fragment_first))
611 goto free_buffers_and_return;
625 goto free_buffers_and_return;
634 goto free_buffers_and_return;
644 if (trim_front >
tmp->current_length)
647 vec_add1 (vec_drop_compress, tmp_bi);
648 trim_front -=
tmp->current_length;
649 if (!(
tmp->flags & VLIB_BUFFER_NEXT_PRESENT))
652 goto free_buffers_and_return;
654 tmp->flags &= ~VLIB_BUFFER_NEXT_PRESENT;
655 tmp_bi =
tmp->next_buffer;
669 last_b->
flags |= VLIB_BUFFER_NEXT_PRESENT;
673 if (keep_data <= tmp->current_length)
675 tmp->current_length = keep_data;
680 keep_data -=
tmp->current_length;
681 if (!(
tmp->flags & VLIB_BUFFER_NEXT_PRESENT))
684 goto free_buffers_and_return;
687 total_length +=
tmp->current_length;
691 vec_add1 (vec_drop_compress, tmp_bi);
695 goto free_buffers_and_return;
699 if (
tmp->flags & VLIB_BUFFER_NEXT_PRESENT)
701 tmp_bi =
tmp->next_buffer;
713 while (~0 != sub_chain_bi);
718 goto free_buffers_and_return;
720 last_b->
flags &= ~VLIB_BUFFER_NEXT_PRESENT;
722 if (total_length < first_b->current_length)
725 goto free_buffers_and_return;
728 first_b->
flags |= VLIB_BUFFER_TOTAL_LENGTH_VALID;
734 ip6_ext_header_t *prev_hdr;
740 prev_hdr->next_hdr = frag_hdr->next_hdr;
744 ip->protocol = frag_hdr->next_hdr;
749 goto free_buffers_and_return;
751 memmove (frag_hdr, (
u8 *) frag_hdr +
sizeof (*frag_hdr),
753 sizeof (ip6_frag_hdr_t));
761 goto free_buffers_and_return;
763 first_b->
flags &= ~VLIB_BUFFER_EXT_HDR_VALID;
779 if (
b->
flags & VLIB_BUFFER_NEXT_PRESENT)
788 printf (
"%.*s\n",
vec_len (s), s);
806 free_buffers_and_return:
817 u32 prev_range_bi,
u32 new_next_bi)
822 if (~0 != prev_range_bi)
826 new_next_vnb->
ip.reass.next_range_bi = prev_vnb->
ip.reass.next_range_bi;
827 prev_vnb->
ip.reass.next_range_bi = new_next_bi;
833 new_next_vnb->
ip.reass.next_range_bi = reass->
first_bi;
845 u32 * error0, ip6_frag_hdr_t * frag_hdr,
846 bool is_custom_app,
u32 * handoff_thread_idx)
857 fvnb->
ip.reass.ip6_frag_hdr_offset =
861 fvnb->
ip.reass.ip6_frag_hdr_offset == 0 ||
867 u32 fragment_first = fvnb->
ip.reass.fragment_first =
869 u32 fragment_length =
871 (fvnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
872 u32 fragment_last = fvnb->
ip.reass.fragment_last =
873 fragment_first + fragment_length - 1;
876 u32 prev_range_bi = ~0;
877 fvnb->
ip.reass.range_first = fragment_first;
878 fvnb->
ip.reass.range_last = fragment_last;
879 fvnb->
ip.reass.next_range_bi = ~0;
892 goto check_if_done_maybe;
896 fvnb->
ip.reass.estimated_mtu);
897 while (~0 != candidate_range_bi)
901 if (fragment_first > candidate_vnb->
ip.reass.range_last)
904 prev_range_bi = candidate_range_bi;
905 candidate_range_bi = candidate_vnb->
ip.reass.next_range_bi;
906 if (candidate_vnb->
ip.reass.range_last < fragment_last &&
907 ~0 == candidate_range_bi)
911 prev_range_bi, *bi0);
917 if (fragment_last < candidate_vnb->
ip.reass.range_first)
921 prev_range_bi, *bi0);
924 else if (fragment_first == candidate_vnb->
ip.reass.range_first &&
925 fragment_last == candidate_vnb->
ip.reass.range_last)
940 *error0 = IP6_ERROR_REASS_OVERLAPPING_FRAGMENT;
983 *error0 = IP6_ERROR_REASS_DUPLICATE_FRAGMENT;
992 ip6_frag_hdr_t * frag_hdr)
994 ip6_ext_header_t *
tmp = (ip6_ext_header_t *) frag_hdr;
999 if (IP_PROTOCOL_IP6_NONXT ==
tmp->next_hdr)
1002 ICMP6_parameter_problem_first_fragment_has_incomplete_header_chain,
1004 b->
error =
node->errors[IP6_ERROR_REASS_MISSING_UPPER];
1015 ip6_frag_hdr_t * frag_hdr)
1020 u32 fragment_length =
1022 (vnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
1023 if (more_fragments && 0 != fragment_length % 8)
1026 ICMP6_parameter_problem_erroneous_header_field,
1027 (
u8 *) &
ip->payload_length - (
u8 *)
ip);
1037 ip6_frag_hdr_t * frag_hdr)
1041 u32 fragment_length =
1043 (vnb->
ip.reass.ip6_frag_hdr_offset +
sizeof (*frag_hdr));
1044 if (fragment_first + fragment_length > 65535)
1048 ICMP6_parameter_problem_erroneous_header_field,
1049 (
u8 *) & frag_hdr->fragment_offset_and_more
1079 u32 error0 = IP6_ERROR_NONE;
1086 ip6_frag_hdr_t *frag_hdr = NULL;
1087 ip6_ext_header_t *prev_hdr;
1092 IP_PROTOCOL_IPV6_FRAGMENTATION,
1102 (
u8 *) frag_hdr - (
u8 *) ip0;
1108 (
node, b0, frag_hdr))
1132 (
u64) frag_hdr->identification;
1142 if (0 == fragment_first)
1155 u32 handoff_thread_idx;
1157 (
vm,
node, rm,
rt, reass, &bi0, &next0, &error0,
1158 frag_hdr, is_custom_app, &handoff_thread_idx))
1171 IP6_ERROR_REASS_FRAGMENT_CHAIN_TOO_LONG,
1179 IP6_ERROR_REASS_NO_BUF, 1);
1186 IP6_ERROR_REASS_INTERNAL_ERROR,
1203 next0 = fvnb->
ip.reass.error_next_index;
1205 error0 = IP6_ERROR_REASS_LIMIT_REACHED;
1213 n_left_to_next -= 1;
1217 if (IP6_ERROR_NONE != error0)
1229 reass.owner_thread_index);
1232 else if (is_feature && IP6_ERROR_NONE == error0)
1237 n_left_to_next, bi0, next0);
1243 to_next[0] = icmp_bi;
1245 n_left_to_next -= 1;
1247 n_left_to_next, icmp_bi,
1259 return frame->n_vectors;
1263 #define _(sym, string) string,
1278 .name =
"ip6-full-reassembly",
1279 .vector_size =
sizeof (
u32),
1304 .name =
"ip6-full-reassembly-feature",
1305 .vector_size =
sizeof (
u32),
1322 .arc_name =
"ip6-unicast",
1323 .node_name =
"ip6-full-reassembly-feature",
1325 "ipsec6-input-feature"),
1330 #ifndef CLIB_MARCH_VARIANT
1340 for (
i = 0;
i < 31;
i++)
1341 if ((1 <<
i) >= nbuckets)
1354 #ifndef CLIB_MARCH_VARIANT
1365 if (clib_bihash_add_del_48_8 (
ctx->new_hash, kv, 1))
1369 return (BIHASH_WALK_CONTINUE);
1374 u32 max_reassembly_length,
1375 u32 expire_walk_interval_ms)
1386 u32 max_reassembly_length,
u32 expire_walk_interval_ms)
1390 max_reassembly_length, expire_walk_interval_ms);
1397 clib_bihash_48_8_t new_hash;
1401 ctx.new_hash = &new_hash;
1402 clib_bihash_init_48_8 (&new_hash,
"ip6-full-reass", new_nbuckets,
1403 new_nbuckets * 1024);
1408 clib_bihash_free_48_8 (&new_hash);
1424 u32 * max_reassembly_length,
1425 u32 * expire_walk_interval_ms)
1462 clib_bihash_init_48_8 (&rm->
hash,
"ip6-full-reass", nbuckets,
1493 uword event_type, *event_data = 0;
1516 int *pool_indexes_to_free = NULL;
1521 u32 *vec_icmp_bi = NULL;
1555 while (
vec_len (vec_icmp_bi) > 0)
1561 int trace_frame = 0;
1562 while (
vec_len (vec_icmp_bi) > 0 && n_left_to_next > 0)
1568 b->
error =
node->errors[IP6_ERROR_REASS_TIMEOUT];
1572 n_left_to_next -= 1;
1582 _vec_len (event_data) = 0;
1594 .name =
"ip6-full-reassembly-expire-walk",
1606 s =
format (s,
"xx_id: %u, src: %U, dst: %U, frag_id: %u, proto: %u",
1608 &
key->dst, clib_net_to_host_u16 (
key->frag_id),
key->proto);
1618 s =
format (s,
"ID: %lu, key: %U\n first_bi: %u, data_len: %u, "
1619 "last_packet_octet: %u, trace_op_counter: %u\n",
1629 s =
format (s,
" #%03u: range: [%u, %u], bi: %u, off: %d, len: %u, "
1630 "fragment[%u, %u]\n",
1631 counter, vnb->
ip.reass.range_first,
1632 vnb->
ip.reass.range_last, bi,
1635 vnb->
ip.reass.fragment_first, vnb->
ip.reass.fragment_last);
1636 if (
b->
flags & VLIB_BUFFER_NEXT_PRESENT)
1657 bool details =
false;
1663 u32 sum_reass_n = 0;
1664 u64 sum_buffers_n = 0;
1680 sum_reass_n +=
rt->reass_n;
1685 (
long unsigned) sum_reass_n);
1687 "Maximum configured concurrent full IP6 reassemblies per worker-thread: %lu\n",
1690 "Maximum configured amount of fragments "
1691 "per full IP6 reassembly: %lu\n",
1694 "Maximum configured full IP6 reassembly timeout: %lums\n",
1697 "Maximum configured full IP6 reassembly expire walk interval: %lums\n",
1700 (
long unsigned) sum_buffers_n);
1706 .path =
"show ip6-full-reassembly",
1707 .short_help =
"show ip6-full-reassembly [details]",
1712 #ifndef CLIB_MARCH_VARIANT
1717 "ip6-full-reassembly-feature",
1722 #define foreach_ip6_full_reassembly_handoff_error \
1723 _(CONGESTION_DROP, "congestion drop")
1728 #define _(sym,str) IP6_FULL_REASSEMBLY_HANDOFF_ERROR_##sym,
1735 #define _(sym,string) string,
1754 format (s,
"ip6-full-reassembly-handoff: next-worker %d",
1777 ti = thread_indices;
1787 && (
b[0]->
flags & VLIB_BUFFER_IS_TRACED)))
1799 thread_indices,
frame->n_vectors, 1);
1803 IP6_FULL_REASSEMBLY_HANDOFF_ERROR_CONGESTION_DROP,
1804 frame->n_vectors - n_enq);
1805 return frame->n_vectors;
1818 .name =
"ip6-full-reassembly-handoff",
1819 .vector_size =
sizeof (
u32),
1841 .name =
"ip6-full-reass-feature-hoff",
1842 .vector_size =
sizeof (
u32),
1855 #ifndef CLIB_MARCH_VARIANT
1867 "ip6-full-reassembly-feature",
1877 "ip6-full-reassembly-feature",
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
static void clib_spinlock_init(clib_spinlock_t *p)
static void ip6_full_reass_add_trace(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_t *reass, u32 bi, ip6_frag_hdr_t *ip6_frag_header, ip6_full_reass_trace_operation_e action, u32 thread_id_to)
u32 next_buffer
Next buffer for this linked-list of buffers.
static void ip6_full_reass_free_ctx(ip6_full_reass_per_thread_t *rt, ip6_full_reass_t *reass)
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
#define ip6_frag_hdr_more(hdr)
static u32 vlib_num_workers()
static vlib_cli_command_t trace
(constructor) VLIB_CLI_COMMAND (trace)
u32 memory_owner_thread_index
static uword ip6_full_reassembly_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, bool is_feature, bool is_custom_app)
static clib_error_t * show_ip6_full_reass(vlib_main_t *vm, unformat_input_t *input, CLIB_UNUSED(vlib_cli_command_t *lmd))
u32 expire_walk_interval_ms
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
@ IP6_EVENT_CONFIG_CHANGED
static_always_inline u32 vlib_buffer_enqueue_to_thread(vlib_main_t *vm, vlib_node_runtime_t *node, u32 frame_queue_index, u32 *buffer_indices, u16 *thread_indices, u32 n_packets, int drop_on_congestion)
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
vlib_node_registration_t ip6_full_reass_expire_node
(constructor) VLIB_REGISTER_NODE (ip6_full_reass_expire_node)
ip6_full_reass_per_thread_t * per_thread_data
static char * ip6_full_reassembly_error_strings[]
void icmp6_error_set_vnet_buffer(vlib_buffer_t *b, u8 type, u8 code, u32 data)
#define clib_memcpy(d, s, n)
u32 fq_index
Worker handoff.
static uword ip6_full_reassembly_handoff_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, bool is_feature)
nat44_ei_hairpin_src_next_t next_index
static void ip6_full_reass_trace_details(vlib_main_t *vm, u32 bi, ip6_full_reass_range_trace_t *trace)
VNET_FEATURE_INIT(ip6_full_reassembly_feature, static)
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
vlib_get_buffers(vm, from, b, n_left_from)
static bool ip6_full_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)
vlib_main_t vlib_node_runtime_t * node
#define IP6_FULL_REASS_TIMEOUT_DEFAULT_MS
#define vlib_call_init_function(vm, x)
#define pool_put(P, E)
Free an object E in pool P.
ip6_full_reass_main_t ip6_full_reass_main
u32 * feature_use_refcount_per_intf
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
static u32 ip6_full_reass_buffer_get_data_offset(vlib_buffer_t *b)
@ IP6_FULL_REASS_RC_TOO_MANY_FRAGMENTS
static int ip6_rehash_cb(clib_bihash_kv_48_8_t *kv, void *_ctx)
static void ip6_full_reass_set_params(u32 timeout_ms, u32 max_reassemblies, u32 max_reassembly_length, u32 expire_walk_interval_ms)
static u32 vlib_buffer_get_trace_thread(vlib_buffer_t *b)
Extract the thread id from a trace handle.
static clib_error_t * ip6_full_reass_init_function(vlib_main_t *vm)
vlib_frame_t * vlib_get_frame_to_node(vlib_main_t *vm, u32 to_node_index)
clib_bihash_48_8_t * new_hash
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
@ IP6_FULL_REASSEMBLY_NEXT_HANDOFF
#define IP6_FULL_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS
u32 vlib_frame_queue_main_init(u32 node_index, u32 frame_queue_nelts)
@ IP6_FULL_REASSEMBLY_NEXT_DROP
struct vnet_buffer_opaque_t::@157::@159 ip
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
#define vec_elt(v, i)
Get vector value at index i.
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,...
void vlib_put_frame_to_node(vlib_main_t *vm, u32 to_node_index, vlib_frame_t *f)
vnet_api_error_t ip6_full_reass_enable_disable(u32 sw_if_index, u8 enable_disable)
static u32 ip6_full_reass_get_nbuckets()
#define pool_foreach(VAR, POOL)
Iterate through pool.
static u16 ip6_full_reass_buffer_get_data_len(vlib_buffer_t *b)
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
static vlib_cli_command_t show_ip6_full_reassembly_cmd
(constructor) VLIB_CLI_COMMAND (show_ip6_full_reassembly_cmd)
@ IP6_FULL_REASSEMBLY_N_NEXT
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
vlib_error_t error
Error code for buffers to be enqueued to error handler.
#define VLIB_NODE_FN(node)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
#define VLIB_NODE_FLAG_TRACE
static uword ip6_full_reass_walk_expired(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *f)
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
int ip6_full_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
static u8 * format_ip6_full_reass_range_trace(u8 *s, va_list *args)
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
static void * ip6_ext_header_find(vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip6_header, u8 header_type, ip6_ext_header_t **prev_ext_header)
__clib_export void clib_bihash_copied(void *dst, void *src)
@ IP6_FULL_REASS_RC_INTERNAL_ERROR
u32 memory_owner_thread_index
vlib_node_registration_t ip6_full_reassembly_feature_handoff_node
(constructor) VLIB_REGISTER_NODE (ip6_full_reassembly_feature_handoff_node)
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
vlib_node_registration_t ip6_full_reass_node
(constructor) VLIB_REGISTER_NODE (ip6_full_reass_node)
sll srl srl sll sra u16x4 i
static u8 * format_ip6_full_reass(u8 *s, va_list *args)
#define ip6_frag_hdr_offset(hdr)
vlib_node_registration_t ip6_full_reassembly_handoff_node
(constructor) VLIB_REGISTER_NODE (ip6_full_reassembly_handoff_node)
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
u32 * fib_index_by_sw_if_index
#define VLIB_CLI_COMMAND(x,...)
static u32 vlib_buffer_chain_linearize(vlib_main_t *vm, vlib_buffer_t *b)
clib_error_t * ip_main_init(vlib_main_t *vm)
#define vec_pop(V)
Returns last element of a vector and decrements its length.
struct _vlib_node_registration vlib_node_registration_t
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
u16 current_length
Nbytes between current data and the end of this buffer.
static ip6_full_reass_t * ip6_full_reass_find_or_create(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_per_thread_t *rt, ip6_full_reass_kv_t *kv, u32 *icmp_bi, u8 *do_handoff)
vnet_api_error_t ip6_full_reass_set(u32 timeout_ms, u32 max_reassemblies, u32 max_reassembly_length, u32 expire_walk_interval_ms)
set ip6 reassembly configuration
vnet_api_error_t ip6_full_reass_get(u32 *timeout_ms, u32 *max_reassemblies, u32 *max_reassembly_length, u32 *expire_walk_interval_ms)
get ip6 reassembly configuration
static u8 * format_ip6_full_reass_trace(u8 *s, va_list *args)
#define vec_free(V)
Free vector's memory (no header).
#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.
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
u32 ip6_full_reass_expire_node_idx
@ IP6_FULL_REASSEMBLY_NEXT_ICMP_ERROR
#define pool_foreach_index(i, v)
ip6_full_reass_trace_operation_e action
vlib_trace_header_t ** trace_buffer_pool
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...
description fragment has unexpected format
static void ip6_full_reass_free(ip6_full_reass_main_t *rm, ip6_full_reass_per_thread_t *rt, ip6_full_reass_t *reass)
vlib_put_next_frame(vm, node, next_index, 0)
static ip6_full_reass_rc_t ip6_full_reass_finalize(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_per_thread_t *rt, ip6_full_reass_t *reass, u32 *bi0, u32 *next0, u32 *error0, bool is_custom_app)
static u8 ip6_ext_hdr(u8 nexthdr)
#define VLIB_INIT_FUNCTION(x)
static bool ip6_full_reass_verify_fragment_multiple_8(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
static u8 * format_ip6_full_reass_key(u8 *s, va_list *args)
#define vec_foreach(var, vec)
Vector iterator.
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
ip6_full_reass_range_trace_t trace_range
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)
#define ip6_frag_hdr_offset_bytes(hdr)
#define foreach_ip6_full_reassembly_handoff_error
static void ip6_full_reass_insert_range_in_chain(vlib_main_t *vm, ip6_full_reass_main_t *rm, ip6_full_reass_per_thread_t *rt, ip6_full_reass_t *reass, u32 prev_range_bi, u32 new_next_bi)
@ IP6_FULL_REASSEMBLY_HANDOFF_N_ERROR
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
static bool ip6_full_reass_verify_upper_layer_present(vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
#define VNET_FEATURES(...)
static void ip6_full_reass_drop_all(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_t *reass)
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
vnet_interface_output_runtime_t * rt
ip6_full_reass_trace_operation_e
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
#define IP6_FULL_REASS_MAX_REASSEMBLIES_DEFAULT
#define IP6_FULL_REASS_HT_LOAD_FACTOR
@ IP6_FULL_REASS_RC_NO_BUF
#define clib_warning(format, args...)
static char * ip6_full_reassembly_handoff_error_strings[]
#define pool_alloc(P, N)
Allocate N more free elements to pool (unspecified alignment).
static ip6_full_reass_rc_t ip6_full_reass_update(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_per_thread_t *rt, ip6_full_reass_t *reass, u32 *bi0, u32 *next0, u32 *error0, ip6_frag_hdr_t *frag_hdr, bool is_custom_app, u32 *handoff_thread_idx)
void ip6_register_protocol(u32 protocol, u32 node_index)
@ ICMP_ERROR_FL_NOT_MULT_8
ip6_full_reassembly_handoff_error_t
static f64 vlib_time_now(vlib_main_t *vm)
ip6_frag_hdr_t ip6_frag_header
vlib_node_registration_t ip6_full_reass_node_feature
(constructor) VLIB_REGISTER_NODE (ip6_full_reass_node_feature)
vlib_trace_main_t trace_main
static void * ip6_ext_next_header(ip6_ext_header_t *ext_hdr)
@ IP6_FULL_REASSEMBLY_NEXT_INPUT
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
vl_api_mac_event_action_t action
u32 total_length_not_including_first_buffer
Only valid for first buffer in chain.
vl_api_interface_index_t sw_if_index
#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).
#define IP6_FULL_REASS_MAX_REASSEMBLY_LENGTH_DEFAULT
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
static void ip6_full_reass_on_timeout(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_full_reass_main_t *rm, ip6_full_reass_t *reass, u32 *icmp_bi)
@ IP6_FULL_REASS_RC_HANDOFF
#define foreach_ip6_error
static u8 * format_ip6_full_reassembly_handoff_trace(u8 *s, va_list *args)
VLIB buffer representation.
#define VLIB_REGISTER_NODE(x,...)