FD.io VPP  v21.10.1-2-g0a485f517
Vector Packet Processing
ip6_sv_reass.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Cisco and/or its affiliates.
3  * Licensed under the Apache License, Version 2.0 (the "License");
4  * you may not use this file except in compliance with the License.
5  * You may obtain a copy of the License at:
6  *
7  * http://www.apache.org/licenses/LICENSE-2.0
8  *
9  * Unless required by applicable law or agreed to in writing, software
10  * distributed under the License is distributed on an "AS IS" BASIS,
11  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12  * See the License for the specific language governing permissions and
13  * limitations under the License.
14  */
15 
16 /**
17  * @file
18  * @brief IPv6 Shallow Virtual Reassembly.
19  *
20  * This file contains the source code for IPv6 Shallow Virtual reassembly.
21  */
22 
23 #include <vppinfra/vec.h>
24 #include <vnet/vnet.h>
25 #include <vnet/ip/ip.h>
26 #include <vnet/ip/ip6_to_ip4.h>
27 #include <vppinfra/bihash_48_8.h>
29 
30 #define MSEC_PER_SEC 1000
31 #define IP6_SV_REASS_TIMEOUT_DEFAULT_MS 100
32 #define IP6_SV_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS 10000 // 10 seconds default
33 #define IP6_SV_REASS_MAX_REASSEMBLIES_DEFAULT 1024
34 #define IP6_SV_REASS_MAX_REASSEMBLY_LENGTH_DEFAULT 3
35 #define IP6_SV_REASS_HT_LOAD_FACTOR (0.75)
36 
37 typedef enum
38 {
44 
45 typedef struct
46 {
47  union
48  {
49  struct
50  {
51  ip6_address_t src;
52  ip6_address_t dst;
55  u8 unused[7];
57  };
58  u64 as_u64[6];
59  };
61 
62 typedef union
63 {
64  struct
65  {
68  };
71 
72 typedef union
73 {
74  struct
75  {
78  };
81 
82 typedef struct
83 {
84  // hash table key
86  // time when last packet was received
88  // internal id of this reassembly
90  // trace operation counter
92  // buffer indexes of buffers in this reassembly in chronological order -
93  // including overlaps and duplicate fragments
95  // set to true when this reassembly is completed
97  // ip protocol
102  // l4 src port
104  // l4 dst port
106  // lru indexes
110 
111 typedef struct
112 {
117  // lru indexes
121 
122 typedef struct
123 {
124  // IPv6 config
128  // maximum number of fragments in one reassembly
130  // maximum number of reassemblies
132 
133  // IPv6 runtime
134  clib_bihash_48_8_t hash;
135 
136  // per-thread data
138 
139  // convenience
142 
143  // node index of ip6-drop node
147 
148  /** Worker handoff */
151 
152  // reference count for enabling/disabling feature - per interface
155 
157 
158 #ifndef CLIB_MARCH_VARIANT
160 #endif /* CLIB_MARCH_VARIANT */
161 
162 typedef enum
163 {
170 
171 typedef enum
172 {
178 
179 typedef struct
180 {
188 
189 static u8 *
190 format_ip6_sv_reass_trace (u8 * s, va_list * args)
191 {
192  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
193  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
194  ip6_sv_reass_trace_t *t = va_arg (*args, ip6_sv_reass_trace_t *);
195  if (REASS_PASSTHROUGH != t->action)
196  {
197  s = format (s, "reass id: %u, op id: %u ", t->reass_id, t->op_id);
198  }
199  switch (t->action)
200  {
202  s = format (s, "[cached]");
203  break;
204  case REASS_FINISH:
205  s =
206  format (s, "[finish, ip proto=%u, src_port=%u, dst_port=%u]",
207  t->ip_proto, clib_net_to_host_u16 (t->l4_src_port),
208  clib_net_to_host_u16 (t->l4_dst_port));
209  break;
211  s =
212  format (s, "[forward, ip proto=%u, src_port=%u, dst_port=%u]",
213  t->ip_proto, clib_net_to_host_u16 (t->l4_src_port),
214  clib_net_to_host_u16 (t->l4_dst_port));
215  break;
216  case REASS_PASSTHROUGH:
217  s = format (s, "[not-fragmented]");
218  break;
219  }
220  return s;
221 }
222 
223 static void
225  ip6_sv_reass_t * reass, u32 bi,
227  u32 ip_proto, u16 l4_src_port, u16 l4_dst_port)
228 {
232  {
233  // this buffer's trace is gone
234  b->flags &= ~VLIB_BUFFER_IS_TRACED;
235  return;
236  }
237  ip6_sv_reass_trace_t *t = vlib_add_trace (vm, node, b, sizeof (t[0]));
238  if (reass)
239  {
240  t->reass_id = reass->id;
241  t->op_id = reass->trace_op_counter;
242  ++reass->trace_op_counter;
243  }
244  t->action = action;
245  t->ip_proto = ip_proto;
246  t->l4_src_port = l4_src_port;
247  t->l4_dst_port = l4_dst_port;
248 #if 0
249  static u8 *s = NULL;
250  s = format (s, "%U", format_ip6_sv_reass_trace, NULL, NULL, t);
251  printf ("%.*s\n", vec_len (s), s);
252  fflush (stdout);
253  vec_reset_length (s);
254 #endif
255 }
256 
257 always_inline void
260 {
262  kv.key[0] = reass->key.as_u64[0];
263  kv.key[1] = reass->key.as_u64[1];
264  kv.key[2] = reass->key.as_u64[2];
265  kv.key[3] = reass->key.as_u64[3];
266  kv.key[4] = reass->key.as_u64[4];
267  kv.key[5] = reass->key.as_u64[5];
268  clib_bihash_add_del_48_8 (&rm->hash, &kv, 0);
270  vec_len (reass->cached_buffers));
271  vec_free (reass->cached_buffers);
272  reass->cached_buffers = NULL;
273  if (~0 != reass->lru_prev)
274  {
275  ip6_sv_reass_t *lru_prev =
276  pool_elt_at_index (rt->pool, reass->lru_prev);
277  lru_prev->lru_next = reass->lru_next;
278  }
279  if (~0 != reass->lru_next)
280  {
281  ip6_sv_reass_t *lru_next =
282  pool_elt_at_index (rt->pool, reass->lru_next);
283  lru_next->lru_prev = reass->lru_prev;
284  }
285  if (rt->lru_first == reass - rt->pool)
286  {
287  rt->lru_first = reass->lru_next;
288  }
289  if (rt->lru_last == reass - rt->pool)
290  {
291  rt->lru_last = reass->lru_prev;
292  }
293  pool_put (rt->pool, reass);
294  --rt->reass_n;
295 }
296 
297 always_inline void
299 {
300  reass->cached_buffers = NULL;
301  reass->is_complete = false;
302 }
303 
307  ip6_sv_reass_kv_t *kv, u8 *do_handoff)
308 {
309  ip6_sv_reass_t *reass = NULL;
310  f64 now = vlib_time_now (vm);
311 
312  if (!clib_bihash_search_48_8 (&rm->hash, &kv->kv, &kv->kv))
313  {
314  if (vm->thread_index != kv->v.thread_index)
315  {
316  *do_handoff = 1;
317  return NULL;
318  }
319  reass = pool_elt_at_index (rt->pool, kv->v.reass_index);
320 
321  if (now > reass->last_heard + rm->timeout)
322  {
323  ip6_sv_reass_free (vm, rm, rt, reass);
324  reass = NULL;
325  }
326  }
327 
328  if (reass)
329  {
330  reass->last_heard = now;
331  return reass;
332  }
333 
334  if (rt->reass_n >= rm->max_reass_n)
335  {
336  reass = pool_elt_at_index (rt->pool, rt->lru_first);
337  ip6_sv_reass_free (vm, rm, rt, reass);
338  }
339 
340  pool_get (rt->pool, reass);
341  clib_memset (reass, 0, sizeof (*reass));
342  reass->id = ((u64) vm->thread_index * 1000000000) + rt->id_counter;
343  ++rt->id_counter;
344  ip6_sv_reass_init (reass);
345  ++rt->reass_n;
346 
347  reass->lru_prev = reass->lru_next = ~0;
348 
349  if (~0 != rt->lru_last)
350  {
351  ip6_sv_reass_t *lru_last = pool_elt_at_index (rt->pool, rt->lru_last);
352  reass->lru_prev = rt->lru_last;
353  lru_last->lru_next = rt->lru_last = reass - rt->pool;
354  }
355 
356  if (~0 == rt->lru_first)
357  {
358  rt->lru_first = rt->lru_last = reass - rt->pool;
359  }
360 
361  reass->key.as_u64[0] = kv->kv.key[0];
362  reass->key.as_u64[1] = kv->kv.key[1];
363  reass->key.as_u64[2] = kv->kv.key[2];
364  reass->key.as_u64[3] = kv->kv.key[3];
365  reass->key.as_u64[4] = kv->kv.key[4];
366  reass->key.as_u64[5] = kv->kv.key[5];
367  kv->v.reass_index = (reass - rt->pool);
368  kv->v.thread_index = vm->thread_index;
369  reass->last_heard = now;
370 
371  if (clib_bihash_add_del_48_8 (&rm->hash, &kv->kv, 1))
372  {
373  ip6_sv_reass_free (vm, rm, rt, reass);
374  reass = NULL;
375  }
376 
377  return reass;
378 }
379 
382  ip6_sv_reass_main_t *rm, ip6_sv_reass_t *reass, u32 bi0,
383  ip6_frag_hdr_t *frag_hdr)
384 {
385  vlib_buffer_t *fb = vlib_get_buffer (vm, bi0);
386  vnet_buffer_opaque_t *fvnb = vnet_buffer (fb);
387  fvnb->ip.reass.ip6_frag_hdr_offset =
388  (u8 *) frag_hdr - (u8 *) vlib_buffer_get_current (fb);
390  if (fb->current_length < sizeof (*fip) ||
391  fvnb->ip.reass.ip6_frag_hdr_offset == 0 ||
392  fvnb->ip.reass.ip6_frag_hdr_offset >= fb->current_length)
393  {
395  }
396 
397  u32 fragment_first = fvnb->ip.reass.fragment_first =
398  ip6_frag_hdr_offset_bytes (frag_hdr);
399  u32 fragment_length =
401  (fvnb->ip.reass.ip6_frag_hdr_offset + sizeof (*frag_hdr));
402  u32 fragment_last = fvnb->ip.reass.fragment_last =
403  fragment_first + fragment_length - 1;
404  fvnb->ip.reass.range_first = fragment_first;
405  fvnb->ip.reass.range_last = fragment_last;
406  fvnb->ip.reass.next_range_bi = ~0;
407  if (0 == fragment_first)
408  {
409  if (!ip6_get_port
410  (vm, fb, fip, fb->current_length, &reass->ip_proto,
411  &reass->l4_src_port, &reass->l4_dst_port,
412  &reass->icmp_type_or_tcp_flags, &reass->tcp_ack_number,
413  &reass->tcp_seq_number))
415 
416  reass->is_complete = true;
417  vlib_buffer_t *b0 = vlib_get_buffer (vm, bi0);
418  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
419  {
421  reass->ip_proto, reass->l4_src_port,
422  reass->l4_dst_port);
423  }
424  }
425  vec_add1 (reass->cached_buffers, bi0);
426  if (!reass->is_complete)
427  {
428  if (PREDICT_FALSE (fb->flags & VLIB_BUFFER_IS_TRACED))
429  {
431  reass->ip_proto, reass->l4_src_port,
432  reass->l4_dst_port);
433  }
434  if (vec_len (reass->cached_buffers) > rm->max_reass_len)
435  {
437  }
438  }
439  return IP6_SV_REASS_RC_OK;
440 }
441 
442 always_inline bool
444  vlib_buffer_t * b,
445  ip6_frag_hdr_t * frag_hdr)
446 {
447  ip6_ext_header_t *tmp = (ip6_ext_header_t *) frag_hdr;
448  while (ip6_ext_hdr (tmp->next_hdr))
449  {
451  }
452  if (IP_PROTOCOL_IP6_NONXT == tmp->next_hdr)
453  {
454  icmp6_error_set_vnet_buffer (b, ICMP6_parameter_problem,
455  ICMP6_parameter_problem_first_fragment_has_incomplete_header_chain,
456  0);
457  b->error = node->errors[IP6_ERROR_REASS_MISSING_UPPER];
458 
459  return false;
460  }
461  return true;
462 }
463 
464 always_inline bool
466  vlib_buffer_t * b,
467  ip6_frag_hdr_t * frag_hdr)
468 {
471  int more_fragments = ip6_frag_hdr_more (frag_hdr);
472  u32 fragment_length =
474  (vnb->ip.reass.ip6_frag_hdr_offset + sizeof (*frag_hdr));
475  if (more_fragments && 0 != fragment_length % 8)
476  {
477  icmp6_error_set_vnet_buffer (b, ICMP6_parameter_problem,
478  ICMP6_parameter_problem_erroneous_header_field,
479  (u8 *) & ip->payload_length - (u8 *) ip);
480  return false;
481  }
482  return true;
483 }
484 
485 always_inline bool
487  vlib_buffer_t * b,
488  ip6_frag_hdr_t * frag_hdr)
489 {
491  u32 fragment_first = ip6_frag_hdr_offset_bytes (frag_hdr);
492  u32 fragment_length =
494  (vnb->ip.reass.ip6_frag_hdr_offset + sizeof (*frag_hdr));
495  if (fragment_first + fragment_length > 65535)
496  {
498  icmp6_error_set_vnet_buffer (b, ICMP6_parameter_problem,
499  ICMP6_parameter_problem_erroneous_header_field,
500  (u8 *) & frag_hdr->fragment_offset_and_more
501  - (u8 *) ip0);
502  return false;
503  }
504  return true;
505 }
506 
510  vlib_frame_t * frame, bool is_feature)
511 {
513  u32 n_left_from, n_left_to_next, *to_next, next_index;
516  clib_spinlock_lock (&rt->lock);
517 
518  n_left_from = frame->n_vectors;
519  next_index = node->cached_next_index;
520 
521  while (n_left_from > 0)
522  {
523  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
524 
525  while (n_left_from > 0 && n_left_to_next > 0)
526  {
527  u32 bi0;
528  vlib_buffer_t *b0;
530  u32 error0 = IP6_ERROR_NONE;
531 
532  bi0 = from[0];
533  b0 = vlib_get_buffer (vm, bi0);
534 
536  ip6_frag_hdr_t *frag_hdr = NULL;
537  ip6_ext_header_t *prev_hdr;
538  if (ip6_ext_hdr (ip0->protocol))
539  {
540  frag_hdr =
541  ip6_ext_header_find (vm, b0, ip0,
542  IP_PROTOCOL_IPV6_FRAGMENTATION,
543  &prev_hdr);
544  }
545  if (!frag_hdr)
546  {
547  // this is a regular packet - no fragmentation
548  if (!ip6_get_port
549  (vm, b0, ip0, b0->current_length,
550  &(vnet_buffer (b0)->ip.reass.ip_proto),
551  &(vnet_buffer (b0)->ip.reass.l4_src_port),
552  &(vnet_buffer (b0)->ip.reass.l4_dst_port),
553  &(vnet_buffer (b0)->ip.reass.icmp_type_or_tcp_flags),
554  &(vnet_buffer (b0)->ip.reass.tcp_ack_number),
555  &(vnet_buffer (b0)->ip.reass.tcp_seq_number)))
556  {
557  error0 = IP6_ERROR_REASS_UNSUPP_IP_PROTO;
558  b0->error = node->errors[error0];
560  goto packet_enqueue;
561  }
562  vnet_buffer (b0)->ip.reass.is_non_first_fragment = 0;
564  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
565  {
567  vm, node, NULL, bi0, REASS_PASSTHROUGH,
568  vnet_buffer (b0)->ip.reass.ip_proto,
569  vnet_buffer (b0)->ip.reass.l4_src_port,
570  vnet_buffer (b0)->ip.reass.l4_dst_port);
571  }
572  goto packet_enqueue;
573  }
574  vnet_buffer (b0)->ip.reass.ip6_frag_hdr_offset =
575  (u8 *) frag_hdr - (u8 *) ip0;
576  if (0 == ip6_frag_hdr_offset (frag_hdr))
577  {
578  // first fragment - verify upper-layer is present
580  (node, b0, frag_hdr))
581  {
583  goto packet_enqueue;
584  }
585  }
586  if (!ip6_sv_reass_verify_fragment_multiple_8 (vm, b0, frag_hdr) ||
588  {
590  goto packet_enqueue;
591  }
592 
594  u8 do_handoff = 0;
595 
596  kv.k.as_u64[0] = ip0->src_address.as_u64[0];
597  kv.k.as_u64[1] = ip0->src_address.as_u64[1];
598  kv.k.as_u64[2] = ip0->dst_address.as_u64[0];
599  kv.k.as_u64[3] = ip0->dst_address.as_u64[1];
600  kv.k.as_u64[4] =
602  vnet_buffer (b0)->sw_if_index[VLIB_RX])) << 32 |
603  (u64) frag_hdr->identification;
604  kv.k.as_u64[5] = ip0->protocol;
605 
606  ip6_sv_reass_t *reass =
607  ip6_sv_reass_find_or_create (vm, rm, rt, &kv, &do_handoff);
608 
609  if (PREDICT_FALSE (do_handoff))
610  {
612  vnet_buffer (b0)->ip.reass.owner_thread_index =
613  kv.v.thread_index;
614  goto packet_enqueue;
615  }
616 
617  if (!reass)
618  {
620  error0 = IP6_ERROR_REASS_LIMIT_REACHED;
621  b0->error = node->errors[error0];
622  goto packet_enqueue;
623  }
624 
625  if (reass->is_complete)
626  {
627  vnet_buffer (b0)->ip.reass.is_non_first_fragment =
628  ! !ip6_frag_hdr_offset (frag_hdr);
629  vnet_buffer (b0)->ip.reass.ip_proto = reass->ip_proto;
630  vnet_buffer (b0)->ip.reass.icmp_type_or_tcp_flags =
631  reass->icmp_type_or_tcp_flags;
632  vnet_buffer (b0)->ip.reass.tcp_ack_number =
633  reass->tcp_ack_number;
634  vnet_buffer (b0)->ip.reass.tcp_seq_number =
635  reass->tcp_seq_number;
636  vnet_buffer (b0)->ip.reass.l4_src_port = reass->l4_src_port;
637  vnet_buffer (b0)->ip.reass.l4_dst_port = reass->l4_dst_port;
639  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
640  {
642  vm, node, reass, bi0, REASS_FRAGMENT_FORWARD,
643  reass->ip_proto, reass->l4_src_port, reass->l4_dst_port);
644  }
645  goto packet_enqueue;
646  }
647 
648  switch (ip6_sv_reass_update (vm, node, rm, reass, bi0, frag_hdr))
649  {
650  case IP6_SV_REASS_RC_OK:
651  /* nothing to do here */
652  break;
654  vlib_node_increment_counter (vm, node->node_index,
655  IP6_ERROR_REASS_FRAGMENT_CHAIN_TOO_LONG,
656  1);
657  ip6_sv_reass_free (vm, rm, rt, reass);
658  goto next_packet;
659  break;
661  vlib_node_increment_counter (vm, node->node_index,
662  IP6_ERROR_REASS_UNSUPP_IP_PROTO,
663  1);
664  ip6_sv_reass_free (vm, rm, rt, reass);
665  goto next_packet;
666  break;
668  vlib_node_increment_counter (vm, node->node_index,
669  IP6_ERROR_REASS_INTERNAL_ERROR, 1);
670  ip6_sv_reass_free (vm, rm, rt, reass);
671  goto next_packet;
672  break;
673  }
674 
675  if (reass->is_complete)
676  {
677  u32 idx;
678  vec_foreach_index (idx, reass->cached_buffers)
679  {
680  u32 bi0 = vec_elt (reass->cached_buffers, idx);
681  if (0 == n_left_to_next)
682  {
684  n_left_to_next);
686  n_left_to_next);
687  }
688  to_next[0] = bi0;
689  to_next += 1;
690  n_left_to_next -= 1;
691  b0 = vlib_get_buffer (vm, bi0);
692  if (is_feature)
693  {
694  vnet_feature_next (&next0, b0);
695  }
696  frag_hdr =
698  vnet_buffer (b0)->ip.reass.ip6_frag_hdr_offset;
699  vnet_buffer (b0)->ip.reass.is_non_first_fragment =
700  ! !ip6_frag_hdr_offset (frag_hdr);
701  vnet_buffer (b0)->ip.reass.ip_proto = reass->ip_proto;
702  vnet_buffer (b0)->ip.reass.icmp_type_or_tcp_flags =
703  reass->icmp_type_or_tcp_flags;
704  vnet_buffer (b0)->ip.reass.tcp_ack_number =
705  reass->tcp_ack_number;
706  vnet_buffer (b0)->ip.reass.tcp_seq_number =
707  reass->tcp_seq_number;
708  vnet_buffer (b0)->ip.reass.l4_src_port = reass->l4_src_port;
709  vnet_buffer (b0)->ip.reass.l4_dst_port = reass->l4_dst_port;
710  if (PREDICT_FALSE (b0->flags & VLIB_BUFFER_IS_TRACED))
711  {
713  vm, node, reass, bi0, REASS_FRAGMENT_FORWARD,
714  reass->ip_proto, reass->l4_src_port, reass->l4_dst_port);
715  }
717  to_next, n_left_to_next, bi0,
718  next0);
719  }
720  _vec_len (reass->cached_buffers) = 0; // buffers are owned by frame now
721  }
722  goto next_packet;
723 
724  packet_enqueue:
725  to_next[0] = bi0;
726  to_next += 1;
727  n_left_to_next -= 1;
728  if (is_feature && IP6_ERROR_NONE == error0)
729  {
730  b0 = vlib_get_buffer (vm, bi0);
731  vnet_feature_next (&next0, b0);
732  }
734  n_left_to_next, bi0, next0);
735 
736  next_packet:
737  from += 1;
738  n_left_from -= 1;
739  }
740 
741  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
742  }
743 
744  clib_spinlock_unlock (&rt->lock);
745  return frame->n_vectors;
746 }
747 
749 #define _(sym, string) string,
751 #undef _
752 };
753 
757 {
758  return ip6_sv_reassembly_inline (vm, node, frame, false /* is_feature */ );
759 }
760 
761 /* *INDENT-OFF* */
763  .name = "ip6-sv-reassembly",
764  .vector_size = sizeof (u32),
765  .format_trace = format_ip6_sv_reass_trace,
767  .error_strings = ip6_sv_reassembly_error_strings,
768  .n_next_nodes = IP6_SV_REASSEMBLY_N_NEXT,
769  .next_nodes =
770  {
771  [IP6_SV_REASSEMBLY_NEXT_INPUT] = "ip6-input",
772  [IP6_SV_REASSEMBLY_NEXT_DROP] = "ip6-drop",
773  [IP6_SV_REASSEMBLY_NEXT_ICMP_ERROR] = "ip6-icmp-error",
774  [IP6_SV_REASSEMBLY_NEXT_HANDOFF] = "ip6-sv-reassembly-handoff",
775  },
776 };
777 /* *INDENT-ON* */
778 
782 {
783  return ip6_sv_reassembly_inline (vm, node, frame, true /* is_feature */ );
784 }
785 
786 /* *INDENT-OFF* */
788  .name = "ip6-sv-reassembly-feature",
789  .vector_size = sizeof (u32),
790  .format_trace = format_ip6_sv_reass_trace,
792  .error_strings = ip6_sv_reassembly_error_strings,
793  .n_next_nodes = IP6_SV_REASSEMBLY_N_NEXT,
794  .next_nodes =
795  {
796  [IP6_SV_REASSEMBLY_NEXT_INPUT] = "ip6-input",
797  [IP6_SV_REASSEMBLY_NEXT_DROP] = "ip6-drop",
798  [IP6_SV_REASSEMBLY_NEXT_ICMP_ERROR] = "ip6-icmp-error",
799  [IP6_SV_REASSEMBLY_NEXT_HANDOFF] = "ip6-sv-reass-feature-hoff",
800  },
801 };
802 /* *INDENT-ON* */
803 
804 /* *INDENT-OFF* */
805 VNET_FEATURE_INIT (ip6_sv_reassembly_feature) = {
806  .arc_name = "ip6-unicast",
807  .node_name = "ip6-sv-reassembly-feature",
808  .runs_before = VNET_FEATURES ("ip6-lookup"),
809  .runs_after = 0,
810 };
811 /* *INDENT-ON* */
812 
813 #ifndef CLIB_MARCH_VARIANT
814 static u32
816 {
818  u32 nbuckets;
819  u8 i;
820 
821  nbuckets = (u32) (rm->max_reass_n / IP6_SV_REASS_HT_LOAD_FACTOR);
822 
823  for (i = 0; i < 31; i++)
824  if ((1 << i) >= nbuckets)
825  break;
826  nbuckets = 1 << i;
827 
828  return nbuckets;
829 }
830 #endif /* CLIB_MARCH_VARIANT */
831 
832 typedef enum
833 {
836 
837 #ifndef CLIB_MARCH_VARIANT
838 typedef struct
839 {
840  int failure;
841  clib_bihash_48_8_t *new_hash;
843 
844 static int
846 {
847  ip6_rehash_cb_ctx *ctx = _ctx;
848  if (clib_bihash_add_del_48_8 (ctx->new_hash, kv, 1))
849  {
850  ctx->failure = 1;
851  }
852  return (BIHASH_WALK_CONTINUE);
853 }
854 
855 static void
856 ip6_sv_reass_set_params (u32 timeout_ms, u32 max_reassemblies,
857  u32 max_reassembly_length,
858  u32 expire_walk_interval_ms)
859 {
860  ip6_sv_reass_main.timeout_ms = timeout_ms;
861  ip6_sv_reass_main.timeout = (f64) timeout_ms / (f64) MSEC_PER_SEC;
862  ip6_sv_reass_main.max_reass_n = max_reassemblies;
863  ip6_sv_reass_main.max_reass_len = max_reassembly_length;
864  ip6_sv_reass_main.expire_walk_interval_ms = expire_walk_interval_ms;
865 }
866 
868 ip6_sv_reass_set (u32 timeout_ms, u32 max_reassemblies,
869  u32 max_reassembly_length, u32 expire_walk_interval_ms)
870 {
871  u32 old_nbuckets = ip6_sv_reass_get_nbuckets ();
872  ip6_sv_reass_set_params (timeout_ms, max_reassemblies,
873  max_reassembly_length, expire_walk_interval_ms);
877  u32 new_nbuckets = ip6_sv_reass_get_nbuckets ();
878  if (ip6_sv_reass_main.max_reass_n > 0 && new_nbuckets > old_nbuckets)
879  {
880  clib_bihash_48_8_t new_hash;
881  clib_memset (&new_hash, 0, sizeof (new_hash));
883  ctx.failure = 0;
884  ctx.new_hash = &new_hash;
885  clib_bihash_init_48_8 (&new_hash, "ip6-sv-reass", new_nbuckets,
886  new_nbuckets * 1024);
887  clib_bihash_foreach_key_value_pair_48_8 (&ip6_sv_reass_main.hash,
888  ip6_rehash_cb, &ctx);
889  if (ctx.failure)
890  {
891  clib_bihash_free_48_8 (&new_hash);
892  return -1;
893  }
894  else
895  {
896  clib_bihash_free_48_8 (&ip6_sv_reass_main.hash);
898  sizeof (ip6_sv_reass_main.hash));
900  }
901  }
902  return 0;
903 }
904 
906 ip6_sv_reass_get (u32 * timeout_ms, u32 * max_reassemblies,
907  u32 * max_reassembly_length, u32 * expire_walk_interval_ms)
908 {
909  *timeout_ms = ip6_sv_reass_main.timeout_ms;
910  *max_reassemblies = ip6_sv_reass_main.max_reass_n;
911  *max_reassembly_length = ip6_sv_reass_main.max_reass_len;
912  *expire_walk_interval_ms = ip6_sv_reass_main.expire_walk_interval_ms;
913  return 0;
914 }
915 
916 static clib_error_t *
918 {
920  clib_error_t *error = 0;
921  u32 nbuckets;
922  vlib_node_t *node;
923 
924  rm->vlib_main = vm;
925  rm->vnet_main = vnet_get_main ();
926 
930  {
931  clib_spinlock_init (&rt->lock);
932  pool_alloc (rt->pool, rm->max_reass_n);
933  rt->lru_first = rt->lru_last = ~0;
934  }
935 
936  node = vlib_get_node_by_name (vm, (u8 *) "ip6-sv-reassembly-expire-walk");
937  ASSERT (node);
938  rm->ip6_sv_reass_expire_node_idx = node->index;
939 
944 
945  nbuckets = ip6_sv_reass_get_nbuckets ();
946  clib_bihash_init_48_8 (&rm->hash, "ip6-sv-reass", nbuckets,
947  nbuckets * 1024);
948 
949  node = vlib_get_node_by_name (vm, (u8 *) "ip6-drop");
950  ASSERT (node);
951  rm->ip6_drop_idx = node->index;
952  node = vlib_get_node_by_name (vm, (u8 *) "ip6-icmp-error");
953  ASSERT (node);
954  rm->ip6_icmp_error_idx = node->index;
955 
957  return error;
958 
960  rm->fq_feature_index =
962 
964 
965  return error;
966 }
967 
969 #endif /* CLIB_MARCH_VARIANT */
970 
971 static uword
975 {
977  uword event_type, *event_data = 0;
978 
979  while (true)
980  {
983  / (f64) MSEC_PER_SEC);
984  event_type = vlib_process_get_events (vm, &event_data);
985 
986  switch (event_type)
987  {
988  case ~0:
989  /* no events => timeout */
990  /* fallthrough */
992  /* nothing to do here */
993  break;
994  default:
995  clib_warning ("BUG: event type 0x%wx", event_type);
996  break;
997  }
998  f64 now = vlib_time_now (vm);
999 
1000  ip6_sv_reass_t *reass;
1001  int *pool_indexes_to_free = NULL;
1002 
1003  uword thread_index = 0;
1004  int index;
1005  const uword nthreads = vlib_num_workers () + 1;
1006  for (thread_index = 0; thread_index < nthreads; ++thread_index)
1007  {
1009  clib_spinlock_lock (&rt->lock);
1010 
1011  vec_reset_length (pool_indexes_to_free);
1012  /* *INDENT-OFF* */
1013  pool_foreach_index (index, rt->pool) {
1014  reass = pool_elt_at_index (rt->pool, index);
1015  if (now > reass->last_heard + rm->timeout)
1016  {
1017  vec_add1 (pool_indexes_to_free, index);
1018  }
1019  }
1020  /* *INDENT-ON* */
1021  int *i;
1022  /* *INDENT-OFF* */
1023  vec_foreach (i, pool_indexes_to_free)
1024  {
1025  ip6_sv_reass_t *reass = pool_elt_at_index (rt->pool, i[0]);
1026  ip6_sv_reass_free (vm, rm, rt, reass);
1027  }
1028  /* *INDENT-ON* */
1029 
1030  clib_spinlock_unlock (&rt->lock);
1031  }
1032 
1033  vec_free (pool_indexes_to_free);
1034  if (event_data)
1035  {
1036  _vec_len (event_data) = 0;
1037  }
1038  }
1039 
1040  return 0;
1041 }
1042 
1043 /* *INDENT-OFF* */
1045  .function = ip6_sv_reass_walk_expired,
1046  .format_trace = format_ip6_sv_reass_trace,
1047  .type = VLIB_NODE_TYPE_PROCESS,
1048  .name = "ip6-sv-reassembly-expire-walk",
1049 
1051  .error_strings = ip6_sv_reassembly_error_strings,
1052 
1053 };
1054 /* *INDENT-ON* */
1055 
1056 static u8 *
1057 format_ip6_sv_reass_key (u8 * s, va_list * args)
1058 {
1059  ip6_sv_reass_key_t *key = va_arg (*args, ip6_sv_reass_key_t *);
1060  s = format (s, "xx_id: %u, src: %U, dst: %U, frag_id: %u, proto: %u",
1061  key->xx_id, format_ip6_address, &key->src, format_ip6_address,
1062  &key->dst, clib_net_to_host_u16 (key->frag_id), key->proto);
1063  return s;
1064 }
1065 
1066 static u8 *
1067 format_ip6_sv_reass (u8 * s, va_list * args)
1068 {
1069  vlib_main_t *vm = va_arg (*args, vlib_main_t *);
1070  ip6_sv_reass_t *reass = va_arg (*args, ip6_sv_reass_t *);
1071 
1072  s = format (s, "ID: %lu, key: %U, trace_op_counter: %u\n",
1073  reass->id, format_ip6_sv_reass_key, &reass->key,
1074  reass->trace_op_counter);
1075  vlib_buffer_t *b;
1076  u32 *bip;
1077  u32 counter = 0;
1078  vec_foreach (bip, reass->cached_buffers)
1079  {
1080  u32 bi = *bip;
1081  do
1082  {
1083  b = vlib_get_buffer (vm, bi);
1084  s = format (s, " #%03u: bi: %u\n", counter, bi);
1085  ++counter;
1086  bi = b->next_buffer;
1087  }
1088  while (b->flags & VLIB_BUFFER_NEXT_PRESENT);
1089  }
1090  return s;
1091 }
1092 
1093 static clib_error_t *
1096 {
1098 
1099  vlib_cli_output (vm, "---------------------");
1100  vlib_cli_output (vm, "IP6 reassembly status");
1101  vlib_cli_output (vm, "---------------------");
1102  bool details = false;
1103  if (unformat (input, "details"))
1104  {
1105  details = true;
1106  }
1107 
1108  u32 sum_reass_n = 0;
1109  u64 sum_buffers_n = 0;
1110  ip6_sv_reass_t *reass;
1112  const uword nthreads = vlib_num_workers () + 1;
1113  for (thread_index = 0; thread_index < nthreads; ++thread_index)
1114  {
1116  clib_spinlock_lock (&rt->lock);
1117  if (details)
1118  {
1119  /* *INDENT-OFF* */
1120  pool_foreach (reass, rt->pool) {
1121  vlib_cli_output (vm, "%U", format_ip6_sv_reass, vm, reass);
1122  }
1123  /* *INDENT-ON* */
1124  }
1125  sum_reass_n += rt->reass_n;
1126  clib_spinlock_unlock (&rt->lock);
1127  }
1128  vlib_cli_output (vm, "---------------------");
1129  vlib_cli_output (vm, "Current IP6 reassemblies count: %lu\n",
1130  (long unsigned) sum_reass_n);
1132  "Maximum configured concurrent shallow virtual IP6 reassemblies per worker-thread: %lu\n",
1133  (long unsigned) rm->max_reass_n);
1135  "Maximum configured amount of fragments per shallow "
1136  "virtual IP6 reassembly: %lu\n",
1137  (long unsigned) rm->max_reass_len);
1139  "Maximum configured shallow virtual IP6 reassembly timeout: %lums\n",
1140  (long unsigned) rm->timeout_ms);
1142  "Maximum configured shallow virtual IP6 reassembly expire walk interval: %lums\n",
1143  (long unsigned) rm->expire_walk_interval_ms);
1144  vlib_cli_output (vm, "Buffers in use: %lu\n",
1145  (long unsigned) sum_buffers_n);
1146  return 0;
1147 }
1148 
1149 /* *INDENT-OFF* */
1151  .path = "show ip6-sv-reassembly",
1152  .short_help = "show ip6-sv-reassembly [details]",
1153  .function = show_ip6_sv_reass,
1154 };
1155 /* *INDENT-ON* */
1156 
1157 #ifndef CLIB_MARCH_VARIANT
1160 {
1162  enable_disable);
1163 }
1164 #endif /* CLIB_MARCH_VARIANT */
1165 
1166 #define foreach_ip6_sv_reassembly_handoff_error \
1167 _(CONGESTION_DROP, "congestion drop")
1168 
1169 
1170 typedef enum
1171 {
1172 #define _(sym,str) IP6_SV_REASSEMBLY_HANDOFF_ERROR_##sym,
1174 #undef _
1177 
1179 #define _(sym,string) string,
1181 #undef _
1182 };
1183 
1184 typedef struct
1185 {
1188 
1189 static u8 *
1191 {
1192  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
1193  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
1195  va_arg (*args, ip6_sv_reassembly_handoff_trace_t *);
1196 
1197  s =
1198  format (s, "ip6-sv-reassembly-handoff: next-worker %d",
1199  t->next_worker_index);
1200 
1201  return s;
1202 }
1203 
1207  vlib_frame_t * frame, bool is_feature)
1208 {
1210 
1212  u32 n_enq, n_left_from, *from;
1213  u16 thread_indices[VLIB_FRAME_SIZE], *ti;
1214  u32 fq_index;
1215 
1217  n_left_from = frame->n_vectors;
1219 
1220  b = bufs;
1221  ti = thread_indices;
1222 
1223  fq_index = (is_feature) ? rm->fq_feature_index : rm->fq_index;
1224 
1225  while (n_left_from > 0)
1226  {
1227  ti[0] = vnet_buffer (b[0])->ip.reass.owner_thread_index;
1228 
1229  if (PREDICT_FALSE
1230  ((node->flags & VLIB_NODE_FLAG_TRACE)
1231  && (b[0]->flags & VLIB_BUFFER_IS_TRACED)))
1232  {
1234  vlib_add_trace (vm, node, b[0], sizeof (*t));
1235  t->next_worker_index = ti[0];
1236  }
1237 
1238  n_left_from -= 1;
1239  ti += 1;
1240  b += 1;
1241  }
1242  n_enq = vlib_buffer_enqueue_to_thread (vm, node, fq_index, from,
1243  thread_indices, frame->n_vectors, 1);
1244 
1245  if (n_enq < frame->n_vectors)
1246  vlib_node_increment_counter (vm, node->node_index,
1247  IP6_SV_REASSEMBLY_HANDOFF_ERROR_CONGESTION_DROP,
1248  frame->n_vectors - n_enq);
1249  return frame->n_vectors;
1250 }
1251 
1254  vlib_frame_t * frame)
1255 {
1257  false /* is_feature */ );
1258 }
1259 
1260 /* *INDENT-OFF* */
1262  .name = "ip6-sv-reassembly-handoff",
1263  .vector_size = sizeof (u32),
1265  .error_strings = ip6_sv_reassembly_handoff_error_strings,
1267 
1268  .n_next_nodes = 1,
1269 
1270  .next_nodes = {
1271  [0] = "error-drop",
1272  },
1273 };
1274 
1275 
1278 {
1279  return ip6_sv_reassembly_handoff_inline (vm, node, frame, true /* is_feature */ );
1280 }
1281 
1282 
1283 /* *INDENT-OFF* */
1285  .name = "ip6-sv-reass-feature-hoff",
1286  .vector_size = sizeof (u32),
1288  .error_strings = ip6_sv_reassembly_handoff_error_strings,
1290 
1291  .n_next_nodes = 1,
1292 
1293  .next_nodes = {
1294  [0] = "error-drop",
1295  },
1296 };
1297 /* *INDENT-ON* */
1298 
1299 #ifndef CLIB_MARCH_VARIANT
1300 int
1302 {
1305  if (is_enable)
1306  {
1308  {
1310  return vnet_feature_enable_disable ("ip6-unicast",
1311  "ip6-sv-reassembly-feature",
1312  sw_if_index, 1, 0, 0);
1313  }
1315  }
1316  else
1317  {
1320  return vnet_feature_enable_disable ("ip6-unicast",
1321  "ip6-sv-reassembly-feature",
1322  sw_if_index, 0, 0, 0);
1323  }
1324  return 0;
1325 }
1326 #endif
1327 
1328 /*
1329  * fd.io coding-style-patch-verification: ON
1330  *
1331  * Local Variables:
1332  * eval: (c-set-style "gnu")
1333  * End:
1334  */
vec_reset_length
#define vec_reset_length(v)
Reset vector length to zero NULL-pointer tolerant.
Definition: vec_bootstrap.h:194
REASS_PASSTHROUGH
@ REASS_PASSTHROUGH
Definition: ip6_sv_reass.c:176
clib_spinlock_init
static void clib_spinlock_init(clib_spinlock_t *p)
Definition: lock.h:65
tmp
u32 * tmp
Definition: interface_output.c:1096
vlib_buffer_t::next_buffer
u32 next_buffer
Next buffer for this linked-list of buffers.
Definition: buffer.h:149
ip6_sv_reass_per_thread_t::id_counter
u32 id_counter
Definition: ip6_sv_reass.c:115
vlib_buffer_free
static void vlib_buffer_free(vlib_main_t *vm, u32 *buffers, u32 n_buffers)
Free buffers Frees the entire buffer chain for each buffer.
Definition: buffer_funcs.h:979
ip6_sv_reass_kv_t
Definition: ip6_sv_reass.c:72
ip6_frag_hdr_more
#define ip6_frag_hdr_more(hdr)
Definition: ip6_packet.h:706
vlib_num_workers
static u32 vlib_num_workers()
Definition: threads.h:333
show_ip6_sv_reassembly_cmd
static vlib_cli_command_t show_ip6_sv_reassembly_cmd
(constructor) VLIB_CLI_COMMAND (show_ip6_sv_reassembly_cmd)
Definition: ip6_sv_reass.c:1150
while
while(n_left_from > 0)
Definition: nat44_ei_hairpinning.c:419
ip6_sv_reass_t::tcp_seq_number
u32 tcp_seq_number
Definition: ip6_sv_reass.c:101
thread_index
u32 thread_index
Definition: nat44_ei_hairpinning.c:495
bufs
vlib_buffer_t * bufs[VLIB_FRAME_SIZE]
Definition: nat44_ei_out2in.c:717
ip6_sv_reass_main_t::vlib_main
vlib_main_t * vlib_main
Definition: ip6_sv_reass.c:140
ip6_sv_reass_set
vnet_api_error_t ip6_sv_reass_set(u32 timeout_ms, u32 max_reassemblies, u32 max_reassembly_length, u32 expire_walk_interval_ms)
set ip6 reassembly configuration
Definition: ip6_sv_reass.c:868
ip6_sv_reass_main_t::fq_index
u32 fq_index
Worker handoff.
Definition: ip6_sv_reass.c:149
vlib_buffer_enqueue_to_thread
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)
Definition: buffer_node.h:383
frame
vlib_main_t vlib_node_runtime_t vlib_frame_t * frame
Definition: nat44_ei.c:3048
ip6_sv_reass_key_t::xx_id
u32 xx_id
Definition: ip6_sv_reass.c:53
icmp6_error_set_vnet_buffer
void icmp6_error_set_vnet_buffer(vlib_buffer_t *b, u8 type, u8 code, u32 data)
Definition: icmp6.c:451
ip_proto
ip_proto
Definition: ip_types.api:75
MSEC_PER_SEC
#define MSEC_PER_SEC
Definition: ip6_sv_reass.c:30
IP6_SV_REASS_TIMEOUT_DEFAULT_MS
#define IP6_SV_REASS_TIMEOUT_DEFAULT_MS
Definition: ip6_sv_reass.c:31
next_index
nat44_ei_hairpin_src_next_t next_index
Definition: nat44_ei_hairpinning.c:412
ip6_sv_reass_t::id
u64 id
Definition: ip6_sv_reass.c:89
ip6_sv_reass_main_t::expire_walk_interval_ms
u32 expire_walk_interval_ms
Definition: ip6_sv_reass.c:127
vlib_get_buffer
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:111
IP6_SV_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS
#define IP6_SV_REASS_EXPIRE_WALK_INTERVAL_DEFAULT_MS
Definition: ip6_sv_reass.c:32
f
vlib_frame_t * f
Definition: interface_output.c:1098
ip6_rehash_cb_ctx
Definition: ip6_full_reass.c:1339
ip6_sv_reass_trace_t::l4_src_port
u16 l4_src_port
Definition: ip6_sv_reass.c:185
format_ip6_sv_reass_trace
static u8 * format_ip6_sv_reass_trace(u8 *s, va_list *args)
Definition: ip6_sv_reass.c:190
pool_elt_at_index
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:549
ip6_sv_reass_t
Definition: ip6_sv_reass.c:82
ip6_sv_reass_trace_t::ip_proto
u8 ip_proto
Definition: ip6_sv_reass.c:184
ip6_sv_reass_main_t::fq_feature_index
u32 fq_feature_index
Definition: ip6_sv_reass.c:150
ip6_header_t::protocol
u8 protocol
Definition: ip6_packet.h:304
ip6_sv_reass_verify_upper_layer_present
static bool ip6_sv_reass_verify_upper_layer_present(vlib_node_runtime_t *node, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
Definition: ip6_sv_reass.c:443
vlib_get_buffers
vlib_get_buffers(vm, from, b, n_left_from)
ip6_sv_reass_key_t::dst
ip6_address_t dst
Definition: ip6_sv_reass.c:52
IP6_SV_REASS_RC_INTERNAL_ERROR
@ IP6_SV_REASS_RC_INTERNAL_ERROR
Definition: ip6_sv_reass.c:41
VLIB_FRAME_SIZE
#define VLIB_FRAME_SIZE
Definition: node.h:368
node
vlib_main_t vlib_node_runtime_t * node
Definition: nat44_ei.c:3047
ip6_sv_reass_verify_packet_size_lt_64k
static bool ip6_sv_reass_verify_packet_size_lt_64k(vlib_main_t *vm, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
Definition: ip6_sv_reass.c:486
ip6_sv_reass_kv_t::k
ip6_sv_reass_key_t k
Definition: ip6_sv_reass.c:76
ip6_sv_reass_t::trace_op_counter
u32 trace_op_counter
Definition: ip6_sv_reass.c:91
vlib_cli_command_t::path
char * path
Definition: cli.h:96
ip6_sv_reass_enable_disable
vnet_api_error_t ip6_sv_reass_enable_disable(u32 sw_if_index, u8 enable_disable)
Definition: ip6_sv_reass.c:1159
ip6_sv_reass_main_t::ip6_icmp_error_idx
u32 ip6_icmp_error_idx
Definition: ip6_sv_reass.c:145
ip6_sv_reass_update
static ip6_sv_reass_rc_t ip6_sv_reass_update(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_sv_reass_main_t *rm, ip6_sv_reass_t *reass, u32 bi0, ip6_frag_hdr_t *frag_hdr)
Definition: ip6_sv_reass.c:381
ip6_sv_reassembly_handoff_node
vlib_node_registration_t ip6_sv_reassembly_handoff_node
(constructor) VLIB_REGISTER_NODE (ip6_sv_reassembly_handoff_node)
Definition: ip6_sv_reass.c:1261
ip6_sv_reassembly_inline
static uword ip6_sv_reassembly_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, bool is_feature)
Definition: ip6_sv_reass.c:508
u16
unsigned short u16
Definition: types.h:57
ip6_sv_reass_t::key
ip6_sv_reass_key_t key
Definition: ip6_sv_reass.c:85
vlib_call_init_function
#define vlib_call_init_function(vm, x)
Definition: init.h:259
pool_put
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:305
vm
vlib_main_t * vm
X-connect all packets from the HOST to the PHY.
Definition: nat44_ei.c:3047
ip6_sv_reass_add_trace
static void ip6_sv_reass_add_trace(vlib_main_t *vm, vlib_node_runtime_t *node, ip6_sv_reass_t *reass, u32 bi, ip6_sv_reass_trace_operation_e action, u32 ip_proto, u16 l4_src_port, u16 l4_dst_port)
Definition: ip6_sv_reass.c:224
VLIB_RX
@ VLIB_RX
Definition: defs.h:46
ip6_sv_reass_get
vnet_api_error_t ip6_sv_reass_get(u32 *timeout_ms, u32 *max_reassemblies, u32 *max_reassembly_length, u32 *expire_walk_interval_ms)
get ip6 reassembly configuration
Definition: ip6_sv_reass.c:906
ip6_sv_reass_main_t::per_thread_data
ip6_sv_reass_per_thread_t * per_thread_data
Definition: ip6_sv_reass.c:137
ip6_sv_reassembly_handoff_inline
static uword ip6_sv_reassembly_handoff_inline(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, bool is_feature)
Definition: ip6_sv_reass.c:1205
ip6_sv_reass_enable_disable_with_refcnt
int ip6_sv_reass_enable_disable_with_refcnt(u32 sw_if_index, int is_enable)
Definition: ip6_sv_reass.c:1301
unformat_input_t
struct _unformat_input_t unformat_input_t
ip6_sv_reass_main
ip6_sv_reass_main_t ip6_sv_reass_main
Definition: ip6_sv_reass.c:159
ip6_sv_reass_node
vlib_node_registration_t ip6_sv_reass_node
(constructor) VLIB_REGISTER_NODE (ip6_sv_reass_node)
Definition: ip6_sv_reass.c:762
vlib_frame_t
Definition: node.h:372
vlib_process_signal_event
static void vlib_process_signal_event(vlib_main_t *vm, uword node_index, uword type_opaque, uword data)
Definition: node_funcs.h:1019
vlib_buffer_length_in_chain
static uword vlib_buffer_length_in_chain(vlib_main_t *vm, vlib_buffer_t *b)
Get length in bytes of the buffer chain.
Definition: buffer_funcs.h:433
clib_memcpy_fast
static_always_inline void * clib_memcpy_fast(void *restrict dst, const void *restrict src, size_t n)
Definition: string.h:92
IP6_SV_REASS_RC_OK
@ IP6_SV_REASS_RC_OK
Definition: ip6_sv_reass.c:39
ip6_sv_reass_t::l4_src_port
u16 l4_src_port
Definition: ip6_sv_reass.c:103
ip6_sv_reass_main_t::feature_use_refcount_per_intf
u32 * feature_use_refcount_per_intf
Definition: ip6_sv_reass.c:153
ip6_sv_reass_main_t::timeout_ms
u32 timeout_ms
Definition: ip6_sv_reass.c:125
error
Definition: cJSON.c:88
ip6_sv_reass_event_t
ip6_sv_reass_event_t
Definition: ip6_sv_reass.c:832
key
typedef key
Definition: ipsec_types.api:91
IP6_SV_REASS_MAX_REASSEMBLIES_DEFAULT
#define IP6_SV_REASS_MAX_REASSEMBLIES_DEFAULT
Definition: ip6_sv_reass.c:33
vlib_frame_queue_main_init
u32 vlib_frame_queue_main_init(u32 node_index, u32 frame_queue_nelts)
Definition: threads.c:1561
unformat
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
vnet_buffer_opaque_t::ip
struct vnet_buffer_opaque_t::@157::@159 ip
IP6_SV_REASS_MAX_REASSEMBLY_LENGTH_DEFAULT
#define IP6_SV_REASS_MAX_REASSEMBLY_LENGTH_DEFAULT
Definition: ip6_sv_reass.c:34
pool_is_free_index
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:302
vec_elt
#define vec_elt(v, i)
Get vector value at index i.
Definition: vec_bootstrap.h:210
ip6_sv_reass_expire_node
vlib_node_registration_t ip6_sv_reass_expire_node
(constructor) VLIB_REGISTER_NODE (ip6_sv_reass_expire_node)
Definition: ip6_sv_reass.c:1044
ip6_sv_reass_per_thread_t::pool
ip6_sv_reass_t * pool
Definition: ip6_sv_reass.c:113
format_ip6_sv_reassembly_handoff_trace
static u8 * format_ip6_sv_reassembly_handoff_trace(u8 *s, va_list *args)
Definition: ip6_sv_reass.c:1190
vlib_process_get_events
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,...
Definition: node_funcs.h:583
ti
u32 ti
Definition: interface_output.c:425
ip6_sv_reass_val_t::as_u64
u64 as_u64
Definition: ip6_sv_reass.c:69
pool_foreach
#define pool_foreach(VAR, POOL)
Iterate through pool.
Definition: pool.h:534
ip6_sv_reass_kv_t::kv
clib_bihash_kv_48_8_t kv
Definition: ip6_sv_reass.c:79
ip6_sv_reass_t::is_complete
bool is_complete
Definition: ip6_sv_reass.c:96
ip6_sv_reass_kv_t::v
ip6_sv_reass_val_t v
Definition: ip6_sv_reass.c:77
ip6_sv_reass_init
static void ip6_sv_reass_init(ip6_sv_reass_t *reass)
Definition: ip6_sv_reass.c:298
ip6_sv_reassembly_feature_handoff_node
vlib_node_registration_t ip6_sv_reassembly_feature_handoff_node
(constructor) VLIB_REGISTER_NODE (ip6_sv_reassembly_feature_handoff_node)
Definition: ip6_sv_reass.c:1284
ip6_sv_reass_walk_expired
static uword ip6_sv_reass_walk_expired(vlib_main_t *vm, CLIB_UNUSED(vlib_node_runtime_t *node), CLIB_UNUSED(vlib_frame_t *f))
Definition: ip6_sv_reass.c:972
vec_len
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
Definition: vec_bootstrap.h:142
vlib_buffer_t::error
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:145
IP6_SV_REASS_RC_UNSUPP_IP_PROTO
@ IP6_SV_REASS_RC_UNSUPP_IP_PROTO
Definition: ip6_sv_reass.c:42
ip6_sv_reass.h
IPv6 shallow virtual reassembly.
VLIB_NODE_FN
#define VLIB_NODE_FN(node)
Definition: node.h:202
vec_add1
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:606
CLIB_UNUSED
#define CLIB_UNUSED(x)
Definition: clib.h:90
vnet_buffer
#define vnet_buffer(b)
Definition: buffer.h:441
vnet_get_main
vnet_main_t * vnet_get_main(void)
Definition: pnat_test_stubs.h:56
VLIB_NODE_FLAG_TRACE
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:291
ip6_sv_reass_trace_t::op_id
u32 op_id
Definition: ip6_sv_reass.c:183
PREDICT_FALSE
#define PREDICT_FALSE(x)
Definition: clib.h:124
IP6_EVENT_CONFIG_CHANGED
@ IP6_EVENT_CONFIG_CHANGED
Definition: ip6_sv_reass.c:834
vnet_feature_next
static_always_inline void vnet_feature_next(u32 *next0, vlib_buffer_t *b0)
Definition: feature.h:322
ARRAY_LEN
#define ARRAY_LEN(x)
Definition: clib.h:70
vlib_frame_vector_args
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:301
clib_spinlock_lock
static_always_inline void clib_spinlock_lock(clib_spinlock_t *p)
Definition: lock.h:82
ip6_ext_header_find
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)
Definition: ip6_packet.h:575
clib_bihash_copied
__clib_export void clib_bihash_copied(void *dst, void *src)
Definition: bihash_all_vector.c:36
clib_spinlock_s
Definition: lock.h:51
ip6_sv_reass_get_nbuckets
static u32 ip6_sv_reass_get_nbuckets()
Definition: ip6_sv_reass.c:815
IP6_SV_REASS_RC_TOO_MANY_FRAGMENTS
@ IP6_SV_REASS_RC_TOO_MANY_FRAGMENTS
Definition: ip6_sv_reass.c:40
vec_foreach_index
#define vec_foreach_index(var, v)
Iterate over vector indices.
Definition: vec_bootstrap.h:220
ip6_sv_reass_per_thread_t::lru_first
u32 lru_first
Definition: ip6_sv_reass.c:118
uword
u64 uword
Definition: types.h:112
ip6_sv_reassembly_handoff_error_t
ip6_sv_reassembly_handoff_error_t
Definition: ip6_sv_reass.c:1170
vlib_main_t::thread_index
u32 thread_index
Definition: main.h:215
ip6_sv_reass_key_t::proto
u8 proto
Definition: ip6_sv_reass.c:56
vlib_node_increment_counter
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
Definition: node_funcs.h:1244
f64
double f64
Definition: types.h:142
ip6_header_t::dst_address
ip6_address_t dst_address
Definition: ip6_packet.h:310
ip6_sv_reass_per_thread_t
Definition: ip6_sv_reass.c:111
ip6_frag_hdr_offset
#define ip6_frag_hdr_offset(hdr)
Definition: ip6_packet.h:700
pool_get
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
Definition: pool.h:255
vec_validate
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment)
Definition: vec.h:523
ip6_main_t::fib_index_by_sw_if_index
u32 * fib_index_by_sw_if_index
Definition: ip6.h:127
VLIB_CLI_COMMAND
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:163
ip6_to_ip4.h
IPv6 to IPv4 translation.
ip6_sv_reass_t::l4_dst_port
u16 l4_dst_port
Definition: ip6_sv_reass.c:105
ip6_sv_reass_key_t::src
ip6_address_t src
Definition: ip6_sv_reass.c:51
foreach_ip6_sv_reassembly_handoff_error
#define foreach_ip6_sv_reassembly_handoff_error
Definition: ip6_sv_reass.c:1166
ip6_sv_reass_next_t
ip6_sv_reass_next_t
Definition: ip6_sv_reass.c:162
ip6_sv_reass_trace_t::action
ip6_sv_reass_trace_operation_e action
Definition: ip6_sv_reass.c:181
IP6_SV_REASSEMBLY_NEXT_ICMP_ERROR
@ IP6_SV_REASSEMBLY_NEXT_ICMP_ERROR
Definition: ip6_sv_reass.c:166
ip6_sv_reass_node_feature
vlib_node_registration_t ip6_sv_reass_node_feature
(constructor) VLIB_REGISTER_NODE (ip6_sv_reass_node_feature)
Definition: ip6_sv_reass.c:787
REASS_FINISH
@ REASS_FINISH
Definition: ip6_sv_reass.c:174
ip_main_init
clib_error_t * ip_main_init(vlib_main_t *vm)
Definition: ip_init.c:45
ip6_sv_reass_key_t::as_u64
u64 as_u64[6]
Definition: ip6_sv_reass.c:58
vlib_node_registration_t
struct _vlib_node_registration vlib_node_registration_t
vlib_cli_output
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:716
ip6_sv_reass_val_t::reass_index
u32 reass_index
Definition: ip6_sv_reass.c:66
REASS_FRAGMENT_CACHE
@ REASS_FRAGMENT_CACHE
Definition: ip6_sv_reass.c:173
vlib_buffer_t::current_length
u16 current_length
Nbytes between current data and the end of this buffer.
Definition: buffer.h:122
ip6_sv_reass_t::tcp_ack_number
u32 tcp_ack_number
Definition: ip6_sv_reass.c:100
format_ip6_sv_reass
static u8 * format_ip6_sv_reass(u8 *s, va_list *args)
Definition: ip6_sv_reass.c:1067
IP6_SV_REASSEMBLY_NEXT_DROP
@ IP6_SV_REASSEMBLY_NEXT_DROP
Definition: ip6_sv_reass.c:165
ip6_sv_reass_find_or_create
static ip6_sv_reass_t * ip6_sv_reass_find_or_create(vlib_main_t *vm, ip6_sv_reass_main_t *rm, ip6_sv_reass_per_thread_t *rt, ip6_sv_reass_kv_t *kv, u8 *do_handoff)
Definition: ip6_sv_reass.c:305
ip6_sv_reass_set_params
static void ip6_sv_reass_set_params(u32 timeout_ms, u32 max_reassemblies, u32 max_reassembly_length, u32 expire_walk_interval_ms)
Definition: ip6_sv_reass.c:856
ip6_main
ip6_main_t ip6_main
Definition: ip6_forward.c:2785
ip6_sv_reass_t::cached_buffers
u32 * cached_buffers
Definition: ip6_sv_reass.c:94
ip6_sv_reass_trace_operation_e
ip6_sv_reass_trace_operation_e
Definition: ip6_sv_reass.c:171
vnet_main_t
Definition: vnet.h:76
vec_free
#define vec_free(V)
Free vector's memory (no header).
Definition: vec.h:395
ip6_sv_reass_t::lru_prev
u32 lru_prev
Definition: ip6_sv_reass.c:107
vlib_validate_buffer_enqueue_x1
#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.
Definition: buffer_node.h:224
index
u32 index
Definition: flow_types.api:221
ip6_sv_reass_per_thread_t::reass_n
u32 reass_n
Definition: ip6_sv_reass.c:114
ip6_sv_reassembly_error_strings
static char * ip6_sv_reassembly_error_strings[]
Definition: ip6_sv_reass.c:748
always_inline
#define always_inline
Definition: rdma_mlx5dv.h:23
vlib_get_node_by_name
vlib_node_t * vlib_get_node_by_name(vlib_main_t *vm, u8 *name)
Definition: node.c:45
vnet_buffer_opaque_t
Definition: buffer.h:153
ip6_sv_reass_main_t
Definition: ip6_sv_reass.c:122
pool_foreach_index
#define pool_foreach_index(i, v)
Definition: pool.h:572
ip6_sv_reass_t::ip_proto
u8 ip_proto
Definition: ip6_sv_reass.c:98
ip6_sv_reass_free
static void ip6_sv_reass_free(vlib_main_t *vm, ip6_sv_reass_main_t *rm, ip6_sv_reass_per_thread_t *rt, ip6_sv_reass_t *reass)
Definition: ip6_sv_reass.c:258
u64
unsigned long u64
Definition: types.h:89
vlib_trace_main_t::trace_buffer_pool
vlib_trace_header_t ** trace_buffer_pool
Definition: trace.h:86
vlib_process_wait_for_event_or_clock
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...
Definition: node_funcs.h:755
format
description fragment has unexpected format
Definition: map.api:433
ASSERT
#define ASSERT(truth)
Definition: error_bootstrap.h:69
ip6_sv_reass_t::lru_next
u32 lru_next
Definition: ip6_sv_reass.c:108
vlib_put_next_frame
vlib_put_next_frame(vm, node, next_index, 0)
ip6_sv_reass_per_thread_t::lock
clib_spinlock_t lock
Definition: ip6_sv_reass.c:116
ip.h
ip6_ext_hdr
static u8 ip6_ext_hdr(u8 nexthdr)
Definition: ip6_packet.h:524
u32
unsigned int u32
Definition: types.h:88
VLIB_INIT_FUNCTION
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:172
ip6_sv_reass_key_t::frag_id
u32 frag_id
Definition: ip6_sv_reass.c:54
REASS_FRAGMENT_FORWARD
@ REASS_FRAGMENT_FORWARD
Definition: ip6_sv_reass.c:175
ip6_sv_reass_init_function
static clib_error_t * ip6_sv_reass_init_function(vlib_main_t *vm)
Definition: ip6_sv_reass.c:917
IP6_SV_REASSEMBLY_HANDOFF_N_ERROR
@ IP6_SV_REASSEMBLY_HANDOFF_N_ERROR
Definition: ip6_sv_reass.c:1175
ip6_sv_reass_main_t::ip6_drop_idx
u32 ip6_drop_idx
Definition: ip6_sv_reass.c:144
IP6_SV_REASS_HT_LOAD_FACTOR
#define IP6_SV_REASS_HT_LOAD_FACTOR
Definition: ip6_sv_reass.c:35
format_ip6_sv_reass_key
static u8 * format_ip6_sv_reass_key(u8 *s, va_list *args)
Definition: ip6_sv_reass.c:1057
ctx
long ctx[MAX_CONNS]
Definition: main.c:144
clib_bihash_kv_48_8_t::key
u64 key[6]
Definition: bihash_48_8.h:41
vec_foreach
#define vec_foreach(var, vec)
Vector iterator.
Definition: vec_bootstrap.h:213
VLIB_NODE_TYPE_PROCESS
@ VLIB_NODE_TYPE_PROCESS
Definition: node.h:84
as_u64
u64 as_u64
Definition: bihash_doc.h:63
n_vectors
return frame n_vectors
Definition: nat44_ei_hairpinning.c:488
ip6_sv_reass_key_t
Definition: ip6_sv_reass.c:45
ip6_sv_reass_main_t::ip6_sv_reass_expire_node_idx
u32 ip6_sv_reass_expire_node_idx
Definition: ip6_sv_reass.c:146
ip6_sv_reass_per_thread_t::lru_last
u32 lru_last
Definition: ip6_sv_reass.c:119
clib_spinlock_unlock
static_always_inline void clib_spinlock_unlock(clib_spinlock_t *p)
Definition: lock.h:121
ip6_header_t
Definition: ip6_packet.h:294
vnet_feature_enable_disable
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)
Definition: pnat_test_stubs.h:50
ip6_get_port
static u16 ip6_get_port(vlib_main_t *vm, vlib_buffer_t *b, ip6_header_t *ip6, u16 buffer_len, u8 *ip_protocol, u16 *src_port, u16 *dst_port, u8 *icmp_type_or_tcp_flags, u32 *tcp_ack_number, u32 *tcp_seq_number)
Get L4 information like port number or ICMP id from IPv6 packet.
Definition: ip6_to_ip4.h:117
ip6_sv_reass_main_t::hash
clib_bihash_48_8_t hash
Definition: ip6_sv_reass.c:134
vec.h
ip6_frag_hdr_offset_bytes
#define ip6_frag_hdr_offset_bytes(hdr)
Definition: ip6_packet.h:703
now
f64 now
Definition: nat44_ei_out2in.c:710
ip6_header_t::src_address
ip6_address_t src_address
Definition: ip6_packet.h:310
clib_memset
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
vlib_main_t
Definition: main.h:102
ip6_sv_reassembly_handoff_trace_t::next_worker_index
u32 next_worker_index
Definition: ip6_sv_reass.c:1186
vlib_node_t
Definition: node.h:247
vlib_add_trace
void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace.c:628
b
vlib_buffer_t ** b
Definition: nat44_ei_out2in.c:717
VNET_FEATURES
#define VNET_FEATURES(...)
Definition: feature.h:470
u8
unsigned char u8
Definition: types.h:56
clib_error_t
Definition: clib_error.h:21
vlib_buffer_get_current
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:257
rt
vnet_interface_output_runtime_t * rt
Definition: interface_output.c:419
ip
vl_api_address_t ip
Definition: l2.api:558
IP6_SV_REASSEMBLY_NEXT_INPUT
@ IP6_SV_REASSEMBLY_NEXT_INPUT
Definition: ip6_sv_reass.c:164
vlib_init_function_t
clib_error_t *() vlib_init_function_t(struct vlib_main_t *vm)
Definition: init.h:51
IP6_SV_REASSEMBLY_N_NEXT
@ IP6_SV_REASSEMBLY_N_NEXT
Definition: ip6_sv_reass.c:168
format_ip6_address
format_function_t format_ip6_address
Definition: format.h:91
ip6_sv_reassembly_handoff_trace_t
Definition: ip6_sv_reass.c:1184
ip6_sv_reass_val_t::thread_index
u32 thread_index
Definition: ip6_sv_reass.c:67
ip6_sv_reass_trace_t::l4_dst_port
u16 l4_dst_port
Definition: ip6_sv_reass.c:186
ip6_sv_reass_rc_t
ip6_sv_reass_rc_t
Definition: ip6_sv_reass.c:37
i
int i
Definition: flowhash_template.h:376
clib_warning
#define clib_warning(format, args...)
Definition: error.h:59
pool_alloc
#define pool_alloc(P, N)
Allocate N more free elements to pool (unspecified alignment).
Definition: pool.h:367
ip6_rehash_cb
static int ip6_rehash_cb(clib_bihash_kv_48_8_t *kv, void *_ctx)
Definition: ip6_sv_reass.c:845
ip6_sv_reass_main_t::timeout
f64 timeout
Definition: ip6_sv_reass.c:126
vlib_time_now
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:327
vnet.h
vlib_main_t::trace_main
vlib_trace_main_t trace_main
Definition: main.h:176
ip6_ext_next_header
static void * ip6_ext_next_header(ip6_ext_header_t *ext_hdr)
Definition: ip6_packet.h:549
vlib_node_runtime_t
Definition: node.h:454
show_ip6_sv_reass
static clib_error_t * show_ip6_sv_reass(vlib_main_t *vm, unformat_input_t *input, CLIB_UNUSED(vlib_cli_command_t *lmd))
Definition: ip6_sv_reass.c:1094
ip6_sv_reass_main_t::vnet_main
vnet_main_t * vnet_main
Definition: ip6_sv_reass.c:141
vlib_buffer_get_trace_index
static u32 vlib_buffer_get_trace_index(vlib_buffer_t *b)
Extract the trace (pool) index from a trace handle.
Definition: buffer.h:416
vlib_cli_command_t
Definition: cli.h:92
ip6_sv_reassembly_handoff_error_strings
static char * ip6_sv_reassembly_handoff_error_strings[]
Definition: ip6_sv_reass.c:1178
from
from
Definition: nat44_ei_hairpinning.c:415
action
vl_api_mac_event_action_t action
Definition: l2.api:211
sw_if_index
vl_api_interface_index_t sw_if_index
Definition: wireguard.api:34
vlib_get_next_frame
#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).
Definition: node_funcs.h:395
ip6_sv_reass_main_t::max_reass_n
u32 max_reass_n
Definition: ip6_sv_reass.c:131
ip6_sv_reass_main_t::max_reass_len
u32 max_reass_len
Definition: ip6_sv_reass.c:129
n_left_from
n_left_from
Definition: nat44_ei_hairpinning.c:416
clib_bihash_kv_48_8_t
Definition: bihash_48_8.h:39
VNET_FEATURE_INIT
VNET_FEATURE_INIT(ip6_sv_reassembly_feature)
ip6_sv_reass_trace_t::reass_id
u32 reass_id
Definition: ip6_sv_reass.c:182
bihash_48_8.h
vnet_api_error_t
vnet_api_error_t
Definition: api_errno.h:162
vlib_buffer_t::flags
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index,...
Definition: buffer.h:133
ip6_sv_reass_val_t
Definition: ip6_sv_reass.c:62
foreach_ip6_error
#define foreach_ip6_error
Definition: ip6_error.h:43
ip6_sv_reass_verify_fragment_multiple_8
static bool ip6_sv_reass_verify_fragment_multiple_8(vlib_main_t *vm, vlib_buffer_t *b, ip6_frag_hdr_t *frag_hdr)
Definition: ip6_sv_reass.c:465
vlib_buffer_t
VLIB buffer representation.
Definition: buffer.h:111
ip6_sv_reass_t::last_heard
f64 last_heard
Definition: ip6_sv_reass.c:87
VLIB_REGISTER_NODE
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:169
ip6_sv_reass_trace_t
Definition: ip6_sv_reass.c:179
ip6_sv_reass_t::icmp_type_or_tcp_flags
u8 icmp_type_or_tcp_flags
Definition: ip6_sv_reass.c:99
IP6_SV_REASSEMBLY_NEXT_HANDOFF
@ IP6_SV_REASSEMBLY_NEXT_HANDOFF
Definition: ip6_sv_reass.c:167