FD.io VPP  v18.07.1-19-g511ce25
Vector Packet Processing
mfib_forward.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2016 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 #include <vnet/mfib/mfib_itf.h>
17 #include <vnet/mfib/mfib_entry.h>
18 #include <vnet/dpo/replicate_dpo.h>
19 #include <vnet/mfib/ip4_mfib.h>
20 #include <vnet/mfib/ip6_mfib.h>
21 #include <vnet/mfib/mfib_signal.h>
22 #include <vnet/fib/ip4_fib.h>
23 #include <vnet/fib/ip6_fib.h>
24 
25 #include <vnet/ip/ip4.h>
26 #include <vnet/vnet.h>
27 
32 
33 static u8 *
34 format_mfib_forward_lookup_trace (u8 * s, va_list * args)
35 {
36  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
37  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
39 
40  s = format (s, "fib %d entry %d", t->fib_index, t->entry_index);
41  return s;
42 }
43 
44 /* Common trace function for all ip4-forward next nodes. */
45 void
47  vlib_node_runtime_t * node,
48  vlib_frame_t * frame)
49 {
50  u32 * from, n_left;
51  ip4_main_t * im = &ip4_main;
52 
53  n_left = frame->n_vectors;
54  from = vlib_frame_vector_args (frame);
55 
56  while (n_left >= 4)
57  {
58  mfib_forward_lookup_trace_t * t0, * t1;
59  vlib_buffer_t * b0, * b1;
60  u32 bi0, bi1;
61 
62  /* Prefetch next iteration. */
63  vlib_prefetch_buffer_with_index (vm, from[2], LOAD);
64  vlib_prefetch_buffer_with_index (vm, from[3], LOAD);
65 
66  bi0 = from[0];
67  bi1 = from[1];
68 
69  b0 = vlib_get_buffer (vm, bi0);
70  b1 = vlib_get_buffer (vm, bi1);
71 
72  if (b0->flags & VLIB_BUFFER_IS_TRACED)
73  {
74  t0 = vlib_add_trace (vm, node, b0, sizeof (t0[0]));
75  t0->entry_index = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
77  vnet_buffer(b1)->sw_if_index[VLIB_RX]);
78  }
79  if (b1->flags & VLIB_BUFFER_IS_TRACED)
80  {
81  t1 = vlib_add_trace (vm, node, b1, sizeof (t1[0]));
82  t1->entry_index = vnet_buffer (b1)->ip.adj_index[VLIB_TX];
84  vnet_buffer(b1)->sw_if_index[VLIB_RX]);
85  }
86  from += 2;
87  n_left -= 2;
88  }
89 
90  while (n_left >= 1)
91  {
93  vlib_buffer_t * b0;
94  u32 bi0;
95 
96  bi0 = from[0];
97 
98  b0 = vlib_get_buffer (vm, bi0);
99 
100  if (b0->flags & VLIB_BUFFER_IS_TRACED)
101  {
102  t0 = vlib_add_trace (vm, node, b0, sizeof (t0[0]));
103  t0->entry_index = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
105  vnet_buffer(b0)->sw_if_index[VLIB_RX]);
106  }
107  from += 1;
108  n_left -= 1;
109  }
110 }
111 
116 
117 static uword
119  vlib_node_runtime_t * node,
120  vlib_frame_t * frame,
121  int is_v4)
122 {
123  u32 n_left_from, n_left_to_next, * from, * to_next;
124 
125  from = vlib_frame_vector_args (frame);
126  n_left_from = frame->n_vectors;
127 
128  while (n_left_from > 0)
129  {
131  to_next, n_left_to_next);
132 
133  while (n_left_from > 0 && n_left_to_next > 0)
134  {
135  fib_node_index_t mfei0;
136  vlib_buffer_t * p0;
137  u32 fib_index0;
138  u32 pi0;
139 
140  pi0 = from[0];
141  to_next[0] = pi0;
142  from += 1;
143  to_next += 1;
144  n_left_to_next -= 1;
145  n_left_from -= 1;
146 
147  p0 = vlib_get_buffer (vm, pi0);
148 
149  if (is_v4)
150  {
151  ip4_header_t * ip0;
152 
154  vnet_buffer(p0)->sw_if_index[VLIB_RX]);
155  ip0 = vlib_buffer_get_current (p0);
156  mfei0 = ip4_mfib_table_lookup(ip4_mfib_get(fib_index0),
157  &ip0->src_address,
158  &ip0->dst_address,
159  64);
160  }
161  else
162  {
163  ip6_header_t * ip0;
164 
166  vnet_buffer(p0)->sw_if_index[VLIB_RX]);
167  ip0 = vlib_buffer_get_current (p0);
168  mfei0 = ip6_mfib_table_lookup2(ip6_mfib_get(fib_index0),
169  &ip0->src_address,
170  &ip0->dst_address);
171  }
172 
173  vnet_buffer (p0)->ip.adj_index[VLIB_TX] = mfei0;
174  }
175 
176  vlib_put_next_frame(vm, node,
178  n_left_to_next);
179  }
180 
181  if (node->flags & VLIB_NODE_FLAG_TRACE)
182  mfib_forward_lookup_trace(vm, node, frame);
183 
184  return frame->n_vectors;
185 }
186 
187 static uword
189  vlib_node_runtime_t * node,
190  vlib_frame_t * frame)
191 {
192  return (mfib_forward_lookup (vm, node, frame, 1));
193 }
194 
196  .function = ip4_mfib_forward_lookup,
197  .name = "ip4-mfib-forward-lookup",
198  .vector_size = sizeof (u32),
199 
200  .format_trace = format_mfib_forward_lookup_trace,
201 
202  .n_next_nodes = MFIB_FORWARD_LOOKUP_N_NEXT,
203  .next_nodes = {
204  [MFIB_FORWARD_LOOKUP_NEXT_RPF] = "ip4-mfib-forward-rpf",
205  },
206 };
207 
210 
211 static uword
212 ip6_mfib_forward_lookup (vlib_main_t * vm,
213  vlib_node_runtime_t * node,
214  vlib_frame_t * frame)
215 {
216  return (mfib_forward_lookup (vm, node, frame, 0));
217 }
218 
220  .function = ip6_mfib_forward_lookup,
221  .name = "ip6-mfib-forward-lookup",
222  .vector_size = sizeof (u32),
223 
224  .format_trace = format_mfib_forward_lookup_trace,
225 
226  .n_next_nodes = MFIB_FORWARD_LOOKUP_N_NEXT,
227  .next_nodes = {
228  [MFIB_FORWARD_LOOKUP_NEXT_RPF] = "ip6-mfib-forward-rpf",
229  },
230 };
231 
233  ip6_mfib_forward_lookup)
234 
235 
236 typedef struct mfib_forward_rpf_trace_t_ {
238  u32 sw_if_index;
239  mfib_itf_flags_t itf_flags;
241 
246 
247 static u8 *
248 format_mfib_forward_rpf_trace (u8 * s, va_list * args)
249 {
250  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
251  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
252  mfib_forward_rpf_trace_t * t = va_arg (*args, mfib_forward_rpf_trace_t *);
253 
254  s = format (s, "entry %d", t->entry_index);
255  s = format (s, " itf %d", t->sw_if_index);
256  s = format (s, " flags %U", format_mfib_itf_flags, t->itf_flags);
257 
258  return s;
259 }
260 
261 static int
263  u32 sw_if_index,
264  int is_v4)
265 {
266  /*
267  * Lookup the source of the IP packet in the
268  * FIB. return true if the entry is attached.
269  */
270  index_t lbi0;
271 
272  if (is_v4)
273  {
274  load_balance_t *lb0;
275  ip4_header_t *ip0;
276 
277  ip0 = vlib_buffer_get_current(b0);
278 
281  sw_if_index),
282  &ip0->src_address);
283  lb0 = load_balance_get(lbi0);
284 
285  return (FIB_ENTRY_FLAG_ATTACHED &
286  lb0->lb_fib_entry_flags);
287  }
288  else
289  {
290  ASSERT(0);
291  }
292  return (0);
293 }
294 
295 static void
297  const mfib_entry_t *mfe,
298  mfib_itf_t *mfi,
299  vlib_buffer_t *b0)
300 {
301  mfib_itf_flags_t old_flags;
302 
303  old_flags = __sync_fetch_and_or(&mfi->mfi_flags,
305 
306  if (!(old_flags & MFIB_ITF_FLAG_SIGNAL_PRESENT))
307  {
308  /*
309  * we were the lucky ones to set the signal present flag
310  */
311  if (!(old_flags & MFIB_ITF_FLAG_DONT_PRESERVE))
312  {
313  /*
314  * preserve a copy of the packet for the control
315  * plane to examine.
316  * Only allow one preserved packet at at time, since
317  * when the signal present flag is cleared so is the
318  * preserved packet.
319  */
320  mfib_signal_push(mfe, mfi, b0);
321  }
322  else
323  {
324  /*
325  * The control plane just wants the signal, not the packet as well
326  */
327  mfib_signal_push(mfe, mfi, NULL);
328  }
329  }
330  /*
331  * else
332  * there is already a signal present on this interface that the
333  * control plane has not yet acknowledged
334  */
335 }
336 
339  vlib_node_runtime_t * node,
340  vlib_frame_t * frame,
341  int is_v4)
342 {
343  u32 n_left_from, n_left_to_next, * from, * to_next;
345  vlib_node_runtime_t *error_node;
346 
347  if (is_v4)
348  error_node = vlib_node_get_runtime (vm, ip4_input_node.index);
349  else
350  error_node = vlib_node_get_runtime (vm, ip6_input_node.index);
351  from = vlib_frame_vector_args (frame);
352  n_left_from = frame->n_vectors;
354 
355  while (n_left_from > 0)
356  {
357  vlib_get_next_frame (vm, node, next,
358  to_next, n_left_to_next);
359 
360  while (n_left_from > 0 && n_left_to_next > 0)
361  {
362  fib_node_index_t mfei0;
363  const mfib_entry_t *mfe0;
364  mfib_itf_t *mfi0;
365  vlib_buffer_t * b0;
366  u32 pi0, next0;
367  mfib_itf_flags_t iflags0;
368  mfib_entry_flags_t eflags0;
369  u8 error0;
370 
371  pi0 = from[0];
372  to_next[0] = pi0;
373  from += 1;
374  to_next += 1;
375  n_left_to_next -= 1;
376  n_left_from -= 1;
377 
378  error0 = IP4_ERROR_NONE;
379  b0 = vlib_get_buffer (vm, pi0);
380  mfei0 = vnet_buffer (b0)->ip.adj_index[VLIB_TX];
381  mfe0 = mfib_entry_get(mfei0);
382  mfi0 = mfib_entry_get_itf(mfe0,
383  vnet_buffer(b0)->sw_if_index[VLIB_RX]);
384 
385  /*
386  * throughout this function we are 'PREDICT' optimising
387  * for the case of throughput traffic that is not replicated
388  * to the host stack nor sets local flags
389  */
390 
391  /*
392  * If the mfib entry has a configured RPF-ID check that
393  * in preference to an interface based RPF
394  */
395  if (MFIB_RPF_ID_NONE != mfe0->mfe_rpf_id)
396  {
397  iflags0 = (mfe0->mfe_rpf_id == vnet_buffer(b0)->ip.rpf_id ?
400  }
401  else
402  {
403  if (PREDICT_TRUE(NULL != mfi0))
404  {
405  iflags0 = mfi0->mfi_flags;
406  }
407  else
408  {
409  iflags0 = MFIB_ITF_FLAG_NONE;
410  }
411  }
412  eflags0 = mfe0->mfe_flags;
413 
415  {
416  /*
417  * lookup the source in the unicast FIB - check it
418  * matches a connected.
419  */
421  b0,
422  vnet_buffer(b0)->sw_if_index[VLIB_RX],
423  is_v4))
424  {
425  mfib_forward_itf_signal(vm, mfe0, mfi0, b0);
426  }
427  }
428  if (PREDICT_FALSE((eflags0 & MFIB_ENTRY_FLAG_SIGNAL) ^
429  (iflags0 & MFIB_ITF_FLAG_NEGATE_SIGNAL)))
430  {
431  /*
432  * Entry signal XOR interface negate-signal
433  */
434  if (NULL != mfi0)
435  {
436  mfib_forward_itf_signal(vm, mfe0, mfi0, b0);
437  }
438  }
439 
440  if (PREDICT_TRUE((iflags0 & MFIB_ITF_FLAG_ACCEPT) ||
441  (eflags0 & MFIB_ENTRY_FLAG_ACCEPT_ALL_ITF)))
442  {
443  /*
444  * This interface is accepting packets for the matching entry
445  */
446  next0 = mfe0->mfe_rep.dpoi_next_node;
447 
448  vnet_buffer(b0)->ip.adj_index[VLIB_TX] =
449  mfe0->mfe_rep.dpoi_index;
450  }
451  else
452  {
454  error0 = IP4_ERROR_RPF_FAILURE;
455  }
456 
457  b0->error = error0 ? error_node->errors[error0] : 0;
458 
459  if (b0->flags & VLIB_BUFFER_IS_TRACED)
460  {
462 
463  t0 = vlib_add_trace (vm, node, b0, sizeof (*t0));
464  t0->entry_index = mfei0;
465  t0->itf_flags = iflags0;
466  if (NULL == mfi0)
467  {
468  t0->sw_if_index = ~0;
469  }
470  else
471  {
472  t0->sw_if_index = mfi0->mfi_sw_if_index;
473  }
474  }
475  vlib_validate_buffer_enqueue_x1 (vm, node, next,
476  to_next, n_left_to_next,
477  pi0, next0);
478  }
479 
480  vlib_put_next_frame(vm, node, next, n_left_to_next);
481  }
482 
483  return frame->n_vectors;
484 }
485 
486 static uword
488  vlib_node_runtime_t * node,
489  vlib_frame_t * frame)
490 {
491  return (mfib_forward_rpf(vm, node, frame, 1));
492 }
493 
494 
496  .function = ip4_mfib_forward_rpf,
497  .name = "ip4-mfib-forward-rpf",
498  .vector_size = sizeof (u32),
499 
500  .format_trace = format_mfib_forward_rpf_trace,
501 
502  .n_next_nodes = MFIB_FORWARD_RPF_N_NEXT,
503  .next_nodes = {
504  [MFIB_FORWARD_RPF_NEXT_DROP] = "ip4-drop",
505  },
506 };
507 
510 
511 static uword
512 ip6_mfib_forward_rpf (vlib_main_t * vm,
513  vlib_node_runtime_t * node,
514  vlib_frame_t * frame)
515 {
516  return (mfib_forward_rpf(vm, node, frame, 1));
517 }
518 
519 
521  .function = ip6_mfib_forward_rpf,
522  .name = "ip6-mfib-forward-rpf",
523  .vector_size = sizeof (u32),
524 
525  .format_trace = format_mfib_forward_rpf_trace,
526 
527  .n_next_nodes = MFIB_FORWARD_RPF_N_NEXT,
528  .next_nodes = {
529  [MFIB_FORWARD_RPF_NEXT_DROP] = "ip6-drop",
530  },
531 };
532 
534  ip6_mfib_forward_rpf)
535 
fib_entry_flag_t lb_fib_entry_flags
Flags from the load-balance&#39;s associated fib_entry_t.
Definition: load_balance.h:111
#define CLIB_UNUSED(x)
Definition: clib.h:79
enum mfib_entry_flags_t_ mfib_entry_flags_t
u32 * mfib_index_by_sw_if_index
Table index indexed by software interface.
Definition: ip6.h:179
ip4_address_t src_address
Definition: ip4_packet.h:169
#define PREDICT_TRUE(x)
Definition: clib.h:106
static u8 * format_mfib_forward_rpf_trace(u8 *s, va_list *args)
Definition: mfib_forward.c:248
#define NULL
Definition: clib.h:55
An entry in a FIB table.
Definition: mfib_entry.h:31
u32 index_t
A Data-Path Object is an object that represents actions that are applied to packets are they are swit...
Definition: dpo.h:41
static uword mfib_forward_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_v4)
Definition: mfib_forward.c:118
static void mfib_forward_itf_signal(vlib_main_t *vm, const mfib_entry_t *mfe, mfib_itf_t *mfi, vlib_buffer_t *b0)
Definition: mfib_forward.c:296
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:419
fib_node_index_t ip6_mfib_table_lookup2(const ip6_mfib_t *mfib, const ip6_address_t *src, const ip6_address_t *grp)
Data-plane lookup function.
Definition: ip6_mfib.c:411
vlib_error_t * errors
Vector of errors for this node.
Definition: node.h:451
Definition: fib_entry.h:277
ip6_address_t src_address
Definition: ip6_packet.h:347
unsigned char u8
Definition: types.h:56
static ip4_mfib_t * ip4_mfib_get(u32 index)
Get the FIB at the given index.
Definition: ip4_mfib.h:58
u32 ip4_fib_table_get_index_for_sw_if_index(u32 sw_if_index)
Definition: ip4_fib.c:224
u32 * mfib_index_by_sw_if_index
Table index indexed by software interface.
Definition: ip4.h:114
#define vlib_prefetch_buffer_with_index(vm, bi, type)
Prefetch buffer metadata by buffer index The first 64 bytes of buffer contains most header informatio...
Definition: buffer_funcs.h:324
#define MFIB_RPF_ID_NONE
Definition: fib_types.h:383
#define always_inline
Definition: clib.h:92
ip4_address_t dst_address
Definition: ip4_packet.h:169
enum mfib_forward_lookup_next_t_ mfib_forward_lookup_next_t
mfib_forward_rpf_trace_t
Definition: mfib_forward.c:240
static vlib_node_registration_t ip6_mfib_forward_rpf_node
(constructor) VLIB_REGISTER_NODE (ip6_mfib_forward_rpf_node)
Definition: mfib_forward.c:520
unsigned int u32
Definition: types.h:88
static uword ip4_mfib_forward_lookup(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mfib_forward.c:188
static vlib_node_registration_t ip6_mfib_forward_lookup_node
(constructor) VLIB_REGISTER_NODE (ip6_mfib_forward_lookup_node)
Definition: mfib_forward.c:219
dpo_id_t mfe_rep
The DPO used for forwarding; replicate, drop, etc.
Definition: mfib_entry.h:69
vlib_node_registration_t ip4_input_node
Global ip4 input node.
Definition: ip4_input.c:317
vlib_node_registration_t ip6_input_node
(constructor) VLIB_REGISTER_NODE (ip6_input_node)
Definition: ip6_input.c:228
static u8 * format_mfib_forward_lookup_trace(u8 *s, va_list *args)
Definition: mfib_forward.c:34
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:202
The FIB DPO provieds;.
Definition: load_balance.h:84
#define PREDICT_FALSE(x)
Definition: clib.h:105
#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:218
#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:364
static mfib_entry_t * mfib_entry_get(fib_node_index_t index)
Definition: mfib_entry.h:153
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:135
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:153
u16 n_vectors
Definition: node.h:380
vlib_main_t * vm
Definition: buffer.c:294
mfib_forward_lookup_next_t_
Definition: mfib_forward.c:112
mfib_itf_flags_t mfi_flags
Forwarding Flags on the entry - checked in the data-path.
Definition: mfib_itf.h:35
static vlib_node_runtime_t * vlib_node_get_runtime(vlib_main_t *vm, u32 node_index)
Get node runtime by node index.
Definition: node_funcs.h:89
static int mfib_forward_connected_check(vlib_buffer_t *b0, u32 sw_if_index, int is_v4)
Definition: mfib_forward.c:262
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
mfib_entry_flags_t mfe_flags
Route flags.
Definition: mfib_entry.h:74
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.
Definition: main.c:454
static uword ip4_mfib_forward_rpf(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mfib_forward.c:487
#define ASSERT(truth)
VLIB_NODE_FUNCTION_MULTIARCH(ip4_mfib_forward_lookup_node, ip4_mfib_forward_lookup)
Definition: mfib_forward.c:208
ip6_main_t ip6_main
Definition: ip6_forward.c:2574
static load_balance_t * load_balance_get(index_t lbi)
Definition: load_balance.h:200
void mfib_forward_lookup_trace(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: mfib_forward.c:46
IPv4 main type.
Definition: ip4.h:95
An interface associated with a particular MFIB entry.
Definition: mfib_itf.h:25
fib_node_index_t ip4_mfib_table_lookup(const ip4_mfib_t *mfib, const ip4_address_t *src, const ip4_address_t *grp, u32 len)
The IPv4 Multicast-FIB.
Definition: ip4_mfib.c:190
static index_t ip4_fib_forwarding_lookup(u32 fib_index, const ip4_address_t *addr)
Definition: ip4_fib.h:160
fib_rpf_id_t mfe_rpf_id
RPF-ID used when the packets ingress not from an interface.
Definition: mfib_entry.h:79
static vlib_node_registration_t ip4_mfib_forward_rpf_node
(constructor) VLIB_REGISTER_NODE (ip4_mfib_forward_rpf_node)
Definition: mfib_forward.c:495
static void * vlib_add_trace(vlib_main_t *vm, vlib_node_runtime_t *r, vlib_buffer_t *b, u32 n_data_bytes)
Definition: trace_funcs.h:55
#define vec_elt(v, i)
Get vector value at index i.
Definition: defs.h:47
static mfib_itf_t * mfib_entry_get_itf(const mfib_entry_t *mfe, u32 sw_if_index)
Definition: mfib_entry.h:181
index_t dpoi_index
the index of objects of that type
Definition: dpo.h:184
u64 uword
Definition: types.h:112
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:267
u8 * format_mfib_itf_flags(u8 *s, va_list *args)
Definition: mfib_types.c:105
void mfib_signal_push(const mfib_entry_t *mfe, mfib_itf_t *mfi, vlib_buffer_t *b0)
Definition: mfib_signal.c:141
static vlib_node_registration_t ip4_mfib_forward_lookup_node
(constructor) VLIB_REGISTER_NODE (ip4_mfib_forward_lookup_node)
Definition: mfib_forward.c:195
enum mfib_itf_flags_t_ mfib_itf_flags_t
static uword mfib_forward_rpf(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame, int is_v4)
Definition: mfib_forward.c:338
enum mfib_forward_rpf_next_t_ mfib_forward_rpf_next_t
static ip6_mfib_t * ip6_mfib_get(u32 index)
Get the FIB at the given index.
Definition: ip6_mfib.h:65
#define vnet_buffer(b)
Definition: buffer.h:360
u32 mfi_sw_if_index
The SW IF index that this MFIB interface represents.
Definition: mfib_itf.h:40
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:832
u16 flags
Copy of main node flags.
Definition: node.h:486
u16 dpoi_next_node
The next VLIB node to follow.
Definition: dpo.h:180
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:295
u32 flags
buffer flags: VLIB_BUFFER_FREE_LIST_INDEX_MASK: bits used to store free list index, VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:111
mfib_forward_rpf_next_t_
Definition: mfib_forward.c:242
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:57
Definition: defs.h:46
ip6_address_t dst_address
Definition: ip6_packet.h:347
struct mfib_forward_lookup_trace_t_ mfib_forward_lookup_trace_t