FD.io VPP  v16.09
Vector Packet Processing
l2_fwd.c
Go to the documentation of this file.
1 /*
2  * l2_fwd.c : layer 2 forwarding using l2fib
3  *
4  * Copyright (c) 2013 Cisco and/or its affiliates.
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at:
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */
17 
18 #include <vlib/vlib.h>
19 #include <vnet/vnet.h>
20 #include <vnet/pg/pg.h>
21 #include <vnet/ethernet/ethernet.h>
22 #include <vlib/cli.h>
23 
24 #include <vnet/l2/l2_input.h>
25 #include <vnet/l2/l2_bvi.h>
26 #include <vnet/l2/l2_fwd.h>
27 #include <vnet/l2/l2_fib.h>
28 
29 #include <vppinfra/error.h>
30 #include <vppinfra/hash.h>
31 #include <vppinfra/sparse_vec.h>
32 
33 
34 typedef struct
35 {
36 
37  /* Hash table */
38  BVT (clib_bihash) * mac_table;
39 
40  /* next node index for the L3 input node of each ethertype */
41  next_by_ethertype_t l3_next;
42 
43  /* convenience variables */
46 } l2fwd_main_t;
47 
48 typedef struct
49 {
50  /* per-pkt trace data */
51  u8 src[6];
52  u8 dst[6];
56 
57 /* packet trace format function */
58 static u8 *
59 format_l2fwd_trace (u8 * s, va_list * args)
60 {
61  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
62  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
63  l2fwd_trace_t *t = va_arg (*args, l2fwd_trace_t *);
64 
65  s = format (s, "l2-fwd: sw_if_index %d dst %U src %U bd_index %d",
66  t->sw_if_index,
69  return s;
70 }
71 
73 
75 
76 #define foreach_l2fwd_error \
77 _(L2FWD, "L2 forward packets") \
78 _(FLOOD, "L2 forward misses") \
79 _(HIT, "L2 forward hits") \
80 _(BVI_BAD_MAC, "BVI L3 MAC mismatch") \
81 _(BVI_ETHERTYPE, "BVI packet with unhandled ethertype") \
82 _(FILTER_DROP, "Filter Mac Drop") \
83 _(REFLECT_DROP, "Reflection Drop")
84 
85 typedef enum
86 {
87 #define _(sym,str) L2FWD_ERROR_##sym,
89 #undef _
92 
93 static char *l2fwd_error_strings[] = {
94 #define _(sym,string) string,
96 #undef _
97 };
98 
99 typedef enum
100 {
105 } l2fwd_next_t;
106 
107 /** Forward one packet based on the mac table lookup result. */
108 
111  vlib_node_runtime_t * node,
112  l2fwd_main_t * msm,
113  vlib_error_main_t * em,
114  vlib_buffer_t * b0,
115  u32 sw_if_index0, l2fib_entry_result_t * result0, u32 * next0)
116 {
117  if (PREDICT_FALSE (result0->raw == ~0))
118  {
119  /*
120  * lookup miss, so flood
121  * TODO:replicate packet to each intf in bridge-domain
122  * For now just drop
123  */
124  if (vnet_buffer (b0)->l2.feature_bitmap & L2INPUT_FEAT_UU_FLOOD)
125  {
126  *next0 = L2FWD_NEXT_FLOOD;
127  }
128  else
129  {
130  /* Flooding is disabled */
131  b0->error = node->errors[L2FWD_ERROR_FLOOD];
132  *next0 = L2FWD_NEXT_DROP;
133  }
134 
135  }
136  else
137  {
138 
139  /* lookup hit, forward packet */
140 #ifdef COUNTERS
141  em->counters[node_counter_base_index + L2FWD_ERROR_HIT] += 1;
142 #endif
143 
144  vnet_buffer (b0)->sw_if_index[VLIB_TX] = result0->fields.sw_if_index;
145  *next0 = L2FWD_NEXT_L2_OUTPUT;
146 
147  /* perform reflection check */
148  if (PREDICT_FALSE (sw_if_index0 == result0->fields.sw_if_index))
149  {
150  b0->error = node->errors[L2FWD_ERROR_REFLECT_DROP];
151  *next0 = L2FWD_NEXT_DROP;
152 
153  /* perform filter check */
154  }
155  else if (PREDICT_FALSE (result0->fields.filter))
156  {
157  b0->error = node->errors[L2FWD_ERROR_FILTER_DROP];
158  *next0 = L2FWD_NEXT_DROP;
159 
160  /* perform BVI check */
161  }
162  else if (PREDICT_FALSE (result0->fields.bvi))
163  {
164  u32 rc;
165  rc = l2_to_bvi (vm,
166  msm->vnet_main,
167  b0,
168  vnet_buffer (b0)->sw_if_index[VLIB_TX],
169  &msm->l3_next, next0);
170 
171  if (PREDICT_FALSE (rc))
172  {
173  if (rc == TO_BVI_ERR_BAD_MAC)
174  {
175  b0->error = node->errors[L2FWD_ERROR_BVI_BAD_MAC];
176  *next0 = L2FWD_NEXT_DROP;
177  }
178  else if (rc == TO_BVI_ERR_ETHERTYPE)
179  {
180  b0->error = node->errors[L2FWD_ERROR_BVI_ETHERTYPE];
181  *next0 = L2FWD_NEXT_DROP;
182  }
183  }
184  }
185  }
186 }
187 
188 
189 static uword
191  vlib_node_runtime_t * node, vlib_frame_t * frame)
192 {
193  u32 n_left_from, *from, *to_next;
194  l2fwd_next_t next_index;
195  l2fwd_main_t *msm = &l2fwd_main;
196  vlib_node_t *n = vlib_get_node (vm, l2fwd_node.index);
197  CLIB_UNUSED (u32 node_counter_base_index) = n->error_heap_index;
198  vlib_error_main_t *em = &vm->error_main;
199  l2fib_entry_key_t cached_key;
200  l2fib_entry_result_t cached_result;
201 
202  /* Clear the one-entry cache in case mac table was updated */
203  cached_key.raw = ~0;
204  cached_result.raw = ~0;
205 
206  from = vlib_frame_vector_args (frame);
207  n_left_from = frame->n_vectors; /* number of packets to process */
208  next_index = node->cached_next_index;
209 
210  while (n_left_from > 0)
211  {
212  u32 n_left_to_next;
213 
214  /* get space to enqueue frame to graph node "next_index" */
215  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
216 
217  while (n_left_from >= 4 && n_left_to_next >= 2)
218  {
219  u32 bi0, bi1;
220  vlib_buffer_t *b0, *b1;
221  u32 next0, next1;
222  u32 sw_if_index0, sw_if_index1;
223  ethernet_header_t *h0, *h1;
224  l2fib_entry_key_t key0, key1;
225  l2fib_entry_result_t result0, result1;
226  u32 bucket0, bucket1;
227 
228  /* Prefetch next iteration. */
229  {
230  vlib_buffer_t *p2, *p3;
231 
232  p2 = vlib_get_buffer (vm, from[2]);
233  p3 = vlib_get_buffer (vm, from[3]);
234 
235  vlib_prefetch_buffer_header (p2, LOAD);
236  vlib_prefetch_buffer_header (p3, LOAD);
237 
240  }
241 
242  /* speculatively enqueue b0 and b1 to the current next frame */
243  /* bi is "buffer index", b is pointer to the buffer */
244  to_next[0] = bi0 = from[0];
245  to_next[1] = bi1 = from[1];
246  from += 2;
247  to_next += 2;
248  n_left_from -= 2;
249  n_left_to_next -= 2;
250 
251  b0 = vlib_get_buffer (vm, bi0);
252  b1 = vlib_get_buffer (vm, bi1);
253 
254  /* RX interface handles */
255  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
256  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];
257 
258  h0 = vlib_buffer_get_current (b0);
259  h1 = vlib_buffer_get_current (b1);
260 
261  if (PREDICT_FALSE ((node->flags & VLIB_NODE_FLAG_TRACE)))
262  {
263  if (b0->flags & VLIB_BUFFER_IS_TRACED)
264  {
265  l2fwd_trace_t *t =
266  vlib_add_trace (vm, node, b0, sizeof (*t));
267  t->sw_if_index = sw_if_index0;
268  t->bd_index = vnet_buffer (b0)->l2.bd_index;
269  clib_memcpy (t->src, h0->src_address, 6);
270  clib_memcpy (t->dst, h0->dst_address, 6);
271  }
272  if (b1->flags & VLIB_BUFFER_IS_TRACED)
273  {
274  l2fwd_trace_t *t =
275  vlib_add_trace (vm, node, b1, sizeof (*t));
276  t->sw_if_index = sw_if_index1;
277  t->bd_index = vnet_buffer (b1)->l2.bd_index;
278  clib_memcpy (t->src, h1->src_address, 6);
279  clib_memcpy (t->dst, h1->dst_address, 6);
280  }
281  }
282 
283  /* process 2 pkts */
284 #ifdef COUNTERS
285  em->counters[node_counter_base_index + L2FWD_ERROR_L2FWD] += 2;
286 #endif
287  l2fib_lookup_2 (msm->mac_table, &cached_key, &cached_result, h0->dst_address, h1->dst_address, vnet_buffer (b0)->l2.bd_index, vnet_buffer (b1)->l2.bd_index, &key0, /* not used */
288  &key1, /* not used */
289  &bucket0, /* not used */
290  &bucket1, /* not used */
291  &result0, &result1);
292  l2fwd_process (vm, node, msm, em, b0, sw_if_index0, &result0,
293  &next0);
294  l2fwd_process (vm, node, msm, em, b1, sw_if_index1, &result1,
295  &next1);
296 
297  /* verify speculative enqueues, maybe switch current next frame */
298  /* if next0==next1==next_index then nothing special needs to be done */
299  vlib_validate_buffer_enqueue_x2 (vm, node, next_index,
300  to_next, n_left_to_next,
301  bi0, bi1, next0, next1);
302  }
303 
304  while (n_left_from > 0 && n_left_to_next > 0)
305  {
306  u32 bi0;
307  vlib_buffer_t *b0;
308  u32 next0;
309  u32 sw_if_index0;
310  ethernet_header_t *h0;
311  l2fib_entry_key_t key0;
312  l2fib_entry_result_t result0;
313  u32 bucket0;
314 
315  /* speculatively enqueue b0 to the current next frame */
316  bi0 = from[0];
317  to_next[0] = bi0;
318  from += 1;
319  to_next += 1;
320  n_left_from -= 1;
321  n_left_to_next -= 1;
322 
323  b0 = vlib_get_buffer (vm, bi0);
324 
325  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
326 
327  h0 = vlib_buffer_get_current (b0);
328 
330  && (b0->flags & VLIB_BUFFER_IS_TRACED)))
331  {
332  l2fwd_trace_t *t = vlib_add_trace (vm, node, b0, sizeof (*t));
333  t->sw_if_index = sw_if_index0;
334  t->bd_index = vnet_buffer (b0)->l2.bd_index;
335  clib_memcpy (t->src, h0->src_address, 6);
336  clib_memcpy (t->dst, h0->dst_address, 6);
337  }
338 
339  /* process 1 pkt */
340 #ifdef COUNTERS
341  em->counters[node_counter_base_index + L2FWD_ERROR_L2FWD] += 1;
342 #endif
343  l2fib_lookup_1 (msm->mac_table, &cached_key, &cached_result, h0->dst_address, vnet_buffer (b0)->l2.bd_index, &key0, /* not used */
344  &bucket0, /* not used */
345  &result0);
346  l2fwd_process (vm, node, msm, em, b0, sw_if_index0, &result0,
347  &next0);
348 
349  /* verify speculative enqueue, maybe switch current next frame */
350  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
351  to_next, n_left_to_next,
352  bi0, next0);
353  }
354 
355  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
356  }
357 
358  return frame->n_vectors;
359 }
360 
361 /* *INDENT-OFF* */
362 VLIB_REGISTER_NODE (l2fwd_node,static) = {
363  .function = l2fwd_node_fn,
364  .name = "l2-fwd",
365  .vector_size = sizeof (u32),
366  .format_trace = format_l2fwd_trace,
368 
369  .n_errors = ARRAY_LEN(l2fwd_error_strings),
370  .error_strings = l2fwd_error_strings,
371 
372  .n_next_nodes = L2FWD_N_NEXT,
373 
374  /* edit / add dispositions here */
375  .next_nodes = {
376  [L2FWD_NEXT_L2_OUTPUT] = "l2-output",
377  [L2FWD_NEXT_FLOOD] = "l2-flood",
378  [L2FWD_NEXT_DROP] = "error-drop",
379  },
380 };
381 /* *INDENT-ON* */
382 
385 {
386  l2fwd_main_t *mp = &l2fwd_main;
387 
388  mp->vlib_main = vm;
389  mp->vnet_main = vnet_get_main ();
390 
391  /* init the hash table ptr */
392  mp->mac_table = get_mac_table ();
393 
394  /* Initialize the next nodes for each ethertype */
395  next_by_ethertype_init (&mp->l3_next);
396 
397  return 0;
398 }
399 
401 
402 
403 /** Add the L3 input node for this ethertype to the next nodes structure. */
404 void
406  ethernet_type_t type, u32 node_index)
407 {
408  l2fwd_main_t *mp = &l2fwd_main;
409  u32 next_index;
410 
411  next_index = vlib_node_add_next (vm, l2fwd_node.index, node_index);
412 
413  next_by_ethertype_register (&mp->l3_next, type, next_index);
414 }
415 
416 
417 /**
418  * Set subinterface forward enable/disable.
419  * The CLI format is:
420  * set interface l2 forward <interface> [disable]
421  */
422 static clib_error_t *
424 {
425  vnet_main_t *vnm = vnet_get_main ();
426  clib_error_t *error = 0;
427  u32 sw_if_index;
428  u32 enable;
429 
430  if (!unformat_user (input, unformat_vnet_sw_interface, vnm, &sw_if_index))
431  {
432  error = clib_error_return (0, "unknown interface `%U'",
433  format_unformat_error, input);
434  goto done;
435  }
436 
437  enable = 1;
438  if (unformat (input, "disable"))
439  {
440  enable = 0;
441  }
442 
443  /* set the interface flag */
444  if (l2input_intf_config (sw_if_index)->xconnect)
445  {
446  l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_XCONNECT, enable);
447  }
448  else
449  {
450  l2input_intf_bitmap_enable (sw_if_index, L2INPUT_FEAT_FWD, enable);
451  }
452 
453 done:
454  return error;
455 }
456 
457 /* *INDENT-OFF* */
458 VLIB_CLI_COMMAND (int_fwd_cli, static) = {
459  .path = "set interface l2 forward",
460  .short_help = "set interface l2 forward <interface> [disable]",
461  .function = int_fwd,
462 };
463 /* *INDENT-ON* */
464 
465 /*
466  * fd.io coding-style-patch-verification: ON
467  *
468  * Local Variables:
469  * eval: (c-set-style "gnu")
470  * End:
471  */
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:457
u32 error_heap_index
Definition: node.h:278
#define CLIB_UNUSED(x)
Definition: clib.h:79
uword unformat(unformat_input_t *i, char *fmt,...)
Definition: unformat.c:966
u16 bd_index
Definition: l2_fwd.c:54
#define TO_BVI_ERR_BAD_MAC
Definition: l2_bvi.h:28
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
l2_input_config_t * l2input_intf_config(u32 sw_if_index)
Get a pointer to the config for the given interface.
Definition: l2_input.c:491
struct l2fib_entry_result_t::@159::@161 fields
ethernet_type_t
Definition: packet.h:43
#define TO_BVI_ERR_ETHERTYPE
Definition: l2_bvi.h:29
static_always_inline u32 l2_to_bvi(vlib_main_t *vlib_main, vnet_main_t *vnet_main, vlib_buffer_t *b0, u32 bvi_sw_if_index, next_by_ethertype_t *l3_next, u32 *next0)
Send a packet from L2 processing to L3 via the BVI interface.
Definition: l2_bvi.h:38
u8 src_address[6]
Definition: packet.h:54
static uword l2fwd_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: l2_fwd.c:190
clib_error_t * l2fwd_init(vlib_main_t *vm)
Definition: l2_fwd.c:384
struct _vlib_node_registration vlib_node_registration_t
unformat_function_t unformat_vnet_sw_interface
Definition: l2_fib.h:54
vlib_error_t * errors
Definition: node.h:418
static vlib_node_registration_t l2fwd_node
(constructor) VLIB_REGISTER_NODE (l2fwd_node)
Definition: l2_fwd.c:74
static uword vlib_node_add_next(vlib_main_t *vm, uword node, uword next_node)
Definition: node_funcs.h:1061
vnet_main_t * vnet_get_main(void)
Definition: misc.c:45
#define static_always_inline
Definition: clib.h:85
u8 * format_ethernet_address(u8 *s, va_list *args)
Definition: format.c:44
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:111
static void * vlib_buffer_get_current(vlib_buffer_t *b)
Get pointer to current data to process.
Definition: buffer.h:187
u8 dst_address[6]
Definition: packet.h:53
int vlib_main(vlib_main_t *vm, unformat_input_t *input)
Definition: main.c:1572
static_always_inline void l2fwd_process(vlib_main_t *vm, vlib_node_runtime_t *node, l2fwd_main_t *msm, vlib_error_main_t *em, vlib_buffer_t *b0, u32 sw_if_index0, l2fib_entry_result_t *result0, u32 *next0)
Forward one packet based on the mac table lookup result.
Definition: l2_fwd.c:110
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:977
static clib_error_t * int_fwd(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Set subinterface forward enable/disable.
Definition: l2_fwd.c:423
vlib_error_main_t error_main
Definition: main.h:124
void l2fwd_register_input_type(vlib_main_t *vm, ethernet_type_t type, u32 node_index)
Add the L3 input node for this ethertype to the next nodes structure.
Definition: l2_fwd.c:405
static char * l2fwd_error_strings[]
Definition: l2_fwd.c:93
static u8 * format_l2fwd_trace(u8 *s, va_list *args)
Definition: l2_fwd.c:59
#define PREDICT_FALSE(x)
Definition: clib.h:97
vnet_main_t vnet_main
Definition: misc.c:42
#define vlib_validate_buffer_enqueue_x2(vm, node, next_index, to_next, n_left_to_next, bi0, bi1, next0, next1)
Finish enqueueing two buffers forward in the graph.
Definition: buffer_node.h:70
#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:130
#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:348
l2fwd_main_t l2fwd_main
Definition: l2_fwd.c:72
u64 raw
Definition: l2_fib.h:70
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:118
BVT(clib_bihash)
Definition: l2_fib.c:577
u64 * counters
Definition: error.h:78
clib_error_t * next_by_ethertype_register(next_by_ethertype_t *l3_next, u32 ethertype, u32 next_index)
Definition: node.c:1107
u16 n_vectors
Definition: node.h:344
#define CLIB_PREFETCH(addr, size, type)
Definition: cache.h:82
#define clib_memcpy(a, b, c)
Definition: string.h:63
#define ARRAY_LEN(x)
Definition: clib.h:59
l2fwd_error_t
Definition: l2_fwd.c:85
static_always_inline void l2fib_lookup_2(BVT(clib_bihash)*mac_table, l2fib_entry_key_t *cached_key, l2fib_entry_result_t *cached_result, u8 *mac0, u8 *mac1, u16 bd_index0, u16 bd_index1, l2fib_entry_key_t *key0, l2fib_entry_key_t *key1, u32 *bucket0, u32 *bucket1, l2fib_entry_result_t *result0, l2fib_entry_result_t *result1)
Lookup the entry for mac and bd_index in the mac table for 2 packets.
Definition: l2_fib.h:184
u32 sw_if_index
Definition: l2_fwd.c:53
u16 cached_next_index
Definition: node.h:462
unsigned int u32
Definition: types.h:88
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
#define vnet_buffer(b)
Definition: buffer.h:335
u8 * format(u8 *s, char *fmt,...)
Definition: format.c:418
Definition: l2_fib.h:33
#define foreach_l2fwd_error
Definition: l2_fwd.c:76
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:259
u8 src[6]
Definition: l2_fwd.c:51
l2fwd_next_t
Definition: l2_fwd.c:99
#define VLIB_BUFFER_IS_TRACED
Definition: buffer.h:93
u64 uword
Definition: types.h:112
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
u32 l2input_intf_bitmap_enable(u32 sw_if_index, u32 feature_bitmap, u32 enable)
Enable (or disable) the feature in the bitmap for the given interface.
Definition: l2_input.c:501
Definition: defs.h:47
unsigned short u16
Definition: types.h:57
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
unsigned char u8
Definition: types.h:56
static void * vlib_frame_vector_args(vlib_frame_t *f)
Get pointer to frame vector data.
Definition: node_funcs.h:251
clib_error_t * next_by_ethertype_init(next_by_ethertype_t *l3_next)
Definition: node.c:1077
u8 dst[6]
Definition: l2_fwd.c:52
#define vlib_prefetch_buffer_header(b, type)
Prefetch buffer metadata.
Definition: buffer.h:163
#define VLIB_NODE_FUNCTION_MULTIARCH(node, fn)
Definition: node.h:158
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:143
u8 data[0]
Packet data.
Definition: buffer.h:151
static vlib_node_t * vlib_get_node(vlib_main_t *vm, u32 i)
Get vlib node by index.
Definition: node_funcs.h:58
static_always_inline void l2fib_lookup_1(BVT(clib_bihash)*mac_table, l2fib_entry_key_t *cached_key, l2fib_entry_result_t *cached_result, u8 *mac0, u16 bd_index0, l2fib_entry_key_t *key0, u32 *bucket0, l2fib_entry_result_t *result0)
Lookup the entry for mac and bd_index in the mac table for 1 packet.
Definition: l2_fib.h:138
#define clib_error_return(e, args...)
Definition: error.h:111
struct _unformat_input_t unformat_input_t
#define CLIB_CACHE_LINE_BYTES
Definition: cache.h:67
u32 flags
buffer flags: VLIB_BUFFER_IS_TRACED: trace this buffer.
Definition: buffer.h:85
static vlib_buffer_t * vlib_get_buffer(vlib_main_t *vm, u32 buffer_index)
Translate buffer index into buffer pointer.
Definition: buffer_funcs.h:69
Definition: defs.h:46
u64 raw
Definition: l2_fib.h:47