FD.io VPP  v16.09
Vector Packet Processing
l2_classify.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2015 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  * l2_classify.c
17  */
18 
19 #include <vnet/l2/l2_classify.h>
20 #include <vnet/api_errno.h>
21 
22 typedef struct
23 {
24  /* per-pkt trace data */
30 
31 typedef struct
32 {
36 
37 /* packet trace format function */
38 static u8 *
39 format_l2_classify_trace (u8 * s, va_list * args)
40 {
41  CLIB_UNUSED (vlib_main_t * vm) = va_arg (*args, vlib_main_t *);
42  CLIB_UNUSED (vlib_node_t * node) = va_arg (*args, vlib_node_t *);
43  l2_classify_trace_t *t = va_arg (*args, l2_classify_trace_t *);
44 
45  s = format (s, "l2-classify: sw_if_index %d, table %d, offset %x, next %d",
47  t->next_index);
48  return s;
49 }
50 
52 
54 
55 #define foreach_l2_classify_error \
56 _(MISS, "Classify misses") \
57 _(HIT, "Classify hits") \
58 _(CHAIN_HIT, "Classify hits after chain walk") \
59 _(DROP, "L2 Classify Drops")
60 
61 typedef enum
62 {
63 #define _(sym,str) L2_CLASSIFY_ERROR_##sym,
65 #undef _
68 
69 static char *l2_classify_error_strings[] = {
70 #define _(sym,string) string,
72 #undef _
73 };
74 
75 static uword
77  vlib_node_runtime_t * node, vlib_frame_t * frame)
78 {
79  u32 n_left_from, *from, *to_next;
80  l2_classify_next_t next_index;
84  u32 feature_bitmap;
85  u32 hits = 0;
86  u32 misses = 0;
87  u32 chain_hits = 0;
88  f64 now;
89 
90  now = vlib_time_now (vm);
91 
92  n_left_from = frame->n_vectors;
93  from = vlib_frame_vector_args (frame);
94 
95  /* First pass: compute hash */
96 
97  while (n_left_from > 2)
98  {
99  vlib_buffer_t *b0, *b1;
100  u32 bi0, bi1;
101  ethernet_header_t *h0, *h1;
102  u32 sw_if_index0, sw_if_index1;
103  u16 type0, type1;
104  int type_index0, type_index1;
105  vnet_classify_table_t *t0, *t1;
106  u32 table_index0, table_index1;
107  u64 hash0, hash1;
108 
109 
110  /* prefetch next iteration */
111  {
112  vlib_buffer_t *p1, *p2;
113 
114  p1 = vlib_get_buffer (vm, from[1]);
115  p2 = vlib_get_buffer (vm, from[2]);
116 
117  vlib_prefetch_buffer_header (p1, STORE);
119  vlib_prefetch_buffer_header (p2, STORE);
121  }
122 
123  bi0 = from[0];
124  b0 = vlib_get_buffer (vm, bi0);
125  h0 = vlib_buffer_get_current (b0);
126 
127  bi1 = from[1];
128  b1 = vlib_get_buffer (vm, bi1);
129  h1 = vlib_buffer_get_current (b1);
130 
131  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
132  vnet_buffer (b0)->l2_classify.table_index = ~0;
133 
134  sw_if_index1 = vnet_buffer (b1)->sw_if_index[VLIB_RX];
135  vnet_buffer (b1)->l2_classify.table_index = ~0;
136 
137  /* Select classifier table based on ethertype */
138  type0 = clib_net_to_host_u16 (h0->type);
139  type1 = clib_net_to_host_u16 (h1->type);
140 
141  type_index0 = (type0 == ETHERNET_TYPE_IP4)
143  type_index0 = (type0 == ETHERNET_TYPE_IP6)
144  ? L2_CLASSIFY_TABLE_IP6 : type_index0;
145 
146  type_index1 = (type1 == ETHERNET_TYPE_IP4)
148  type_index1 = (type1 == ETHERNET_TYPE_IP6)
149  ? L2_CLASSIFY_TABLE_IP6 : type_index1;
150 
151  vnet_buffer (b0)->l2_classify.table_index =
152  table_index0 =
154  [type_index0][sw_if_index0];
155 
156  if (table_index0 != ~0)
157  {
158  t0 = pool_elt_at_index (vcm->tables, table_index0);
159 
160  vnet_buffer (b0)->l2_classify.hash = hash0 =
161  vnet_classify_hash_packet (t0, (u8 *) h0);
162  vnet_classify_prefetch_bucket (t0, hash0);
163  }
164 
165  vnet_buffer (b1)->l2_classify.table_index =
166  table_index1 =
168  [type_index1][sw_if_index1];
169 
170  if (table_index1 != ~0)
171  {
172  t1 = pool_elt_at_index (vcm->tables, table_index1);
173 
174  vnet_buffer (b1)->l2_classify.hash = hash1 =
175  vnet_classify_hash_packet (t1, (u8 *) h1);
176  vnet_classify_prefetch_bucket (t1, hash1);
177  }
178 
179  from += 2;
180  n_left_from -= 2;
181  }
182 
183  while (n_left_from > 0)
184  {
185  vlib_buffer_t *b0;
186  u32 bi0;
187  ethernet_header_t *h0;
188  u32 sw_if_index0;
189  u16 type0;
190  u32 type_index0;
192  u32 table_index0;
193  u64 hash0;
194 
195  bi0 = from[0];
196  b0 = vlib_get_buffer (vm, bi0);
197  h0 = vlib_buffer_get_current (b0);
198 
199  sw_if_index0 = vnet_buffer (b0)->sw_if_index[VLIB_RX];
200  vnet_buffer (b0)->l2_classify.table_index = ~0;
201 
202  /* Select classifier table based on ethertype */
203  type0 = clib_net_to_host_u16 (h0->type);
204 
205  type_index0 = (type0 == ETHERNET_TYPE_IP4)
207  type_index0 = (type0 == ETHERNET_TYPE_IP6)
208  ? L2_CLASSIFY_TABLE_IP6 : type_index0;
209 
210  vnet_buffer (b0)->l2_classify.table_index =
211  table_index0 = rt->l2cm->classify_table_index_by_sw_if_index
212  [type_index0][sw_if_index0];
213 
214  if (table_index0 != ~0)
215  {
216  t0 = pool_elt_at_index (vcm->tables, table_index0);
217 
218  vnet_buffer (b0)->l2_classify.hash = hash0 =
219  vnet_classify_hash_packet (t0, (u8 *) h0);
220  vnet_classify_prefetch_bucket (t0, hash0);
221  }
222  from++;
223  n_left_from--;
224  }
225 
226  next_index = node->cached_next_index;
227  from = vlib_frame_vector_args (frame);
228  n_left_from = frame->n_vectors;
229 
230  while (n_left_from > 0)
231  {
232  u32 n_left_to_next;
233 
234  vlib_get_next_frame (vm, node, next_index, to_next, n_left_to_next);
235 
236  /* Not enough load/store slots to dual loop... */
237  while (n_left_from > 0 && n_left_to_next > 0)
238  {
239  u32 bi0;
240  vlib_buffer_t *b0;
242  ethernet_header_t *h0;
243  u32 table_index0;
244  u64 hash0;
246  vnet_classify_entry_t *e0;
247 
248  if (PREDICT_TRUE (n_left_from > 2))
249  {
250  vlib_buffer_t *p2 = vlib_get_buffer (vm, from[2]);
251  u64 phash2;
252  u32 table_index2;
254 
255  /*
256  * Prefetch table entry two ahead. Buffer / data
257  * were prefetched above...
258  */
259  table_index2 = vnet_buffer (p2)->l2_classify.table_index;
260 
261  if (PREDICT_TRUE (table_index2 != ~0))
262  {
263  tp2 = pool_elt_at_index (vcm->tables, table_index2);
264  phash2 = vnet_buffer (p2)->l2_classify.hash;
265  vnet_classify_prefetch_entry (tp2, phash2);
266  }
267  }
268 
269  /* speculatively enqueue b0 to the current next frame */
270  bi0 = from[0];
271  to_next[0] = bi0;
272  from += 1;
273  to_next += 1;
274  n_left_from -= 1;
275  n_left_to_next -= 1;
276 
277  b0 = vlib_get_buffer (vm, bi0);
278  h0 = vlib_buffer_get_current (b0);
279  table_index0 = vnet_buffer (b0)->l2_classify.table_index;
280  e0 = 0;
281  vnet_buffer (b0)->l2_classify.opaque_index = ~0;
282 
283  if (PREDICT_TRUE (table_index0 != ~0))
284  {
285  hash0 = vnet_buffer (b0)->l2_classify.hash;
286  t0 = pool_elt_at_index (vcm->tables, table_index0);
287 
288  e0 = vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
289  if (e0)
290  {
291  vnet_buffer (b0)->l2_classify.opaque_index
292  = e0->opaque_index;
293  vlib_buffer_advance (b0, e0->advance);
294  next0 = (e0->next_index < L2_CLASSIFY_N_NEXT) ?
295  e0->next_index : next0;
296  hits++;
297  }
298  else
299  {
300  while (1)
301  {
302  if (t0->next_table_index != ~0)
303  t0 = pool_elt_at_index (vcm->tables,
304  t0->next_table_index);
305  else
306  {
307  next0 = (t0->miss_next_index < L2_CLASSIFY_N_NEXT) ?
308  t0->miss_next_index : next0;
309  misses++;
310  break;
311  }
312 
313  hash0 = vnet_classify_hash_packet (t0, (u8 *) h0);
314  e0 =
315  vnet_classify_find_entry (t0, (u8 *) h0, hash0, now);
316  if (e0)
317  {
318  vnet_buffer (b0)->l2_classify.opaque_index
319  = e0->opaque_index;
320  vlib_buffer_advance (b0, e0->advance);
321  next0 = (e0->next_index < L2_CLASSIFY_N_NEXT) ?
322  e0->next_index : next0;
323  hits++;
324  chain_hits++;
325  break;
326  }
327  }
328  }
329  }
330 
331  if (PREDICT_FALSE (next0 == 0))
332  b0->error = node->errors[L2_CLASSIFY_ERROR_DROP];
333 
334  if (PREDICT_FALSE (next0 == ~0))
335  {
336 
337  // Remove ourself from the feature bitmap
338  feature_bitmap = vnet_buffer (b0)->l2.feature_bitmap
339  & ~L2INPUT_FEAT_CLASSIFY;
340 
341  // save for next feature graph nodes
342  vnet_buffer (b0)->l2.feature_bitmap = feature_bitmap;
343 
344  // Determine the next node
345  next0 =
347  feature_bitmap);
348  }
349 
351  && (b0->flags & VLIB_BUFFER_IS_TRACED)))
352  {
354  vlib_add_trace (vm, node, b0, sizeof (*t));
355  t->sw_if_index = vnet_buffer (b0)->sw_if_index[VLIB_RX];
356  t->table_index = table_index0;
357  t->next_index = next0;
358  t->session_offset = e0 ? vnet_classify_get_offset (t0, e0) : 0;
359  }
360 
361  /* verify speculative enqueue, maybe switch current next frame */
362  vlib_validate_buffer_enqueue_x1 (vm, node, next_index,
363  to_next, n_left_to_next,
364  bi0, next0);
365  }
366 
367  vlib_put_next_frame (vm, node, next_index, n_left_to_next);
368  }
369 
371  L2_CLASSIFY_ERROR_MISS, misses);
373  L2_CLASSIFY_ERROR_HIT, hits);
375  L2_CLASSIFY_ERROR_CHAIN_HIT, chain_hits);
376  return frame->n_vectors;
377 }
378 
379 /* *INDENT-OFF* */
381  .function = l2_classify_node_fn,
382  .name = "l2-classify",
383  .vector_size = sizeof (u32),
384  .format_trace = format_l2_classify_trace,
386 
388  .error_strings = l2_classify_error_strings,
389 
390  .runtime_data_bytes = sizeof (l2_classify_runtime_t),
391 
392  .n_next_nodes = L2_CLASSIFY_N_NEXT,
393 
394  /* edit / add dispositions here */
395  .next_nodes = {
396  [L2_CLASSIFY_NEXT_DROP] = "error-drop",
397  [L2_CLASSIFY_NEXT_ETHERNET_INPUT] = "ethernet-input-not-l2",
398  [L2_CLASSIFY_NEXT_IP4_INPUT] = "ip4-input",
399  [L2_CLASSIFY_NEXT_IP6_INPUT] = "ip6-input",
400  [L2_CLASSIFY_NEXT_LI] = "li-hit",
401  },
402 };
403 /* *INDENT-ON* */
404 
407 {
410 
412 
413  cm->vlib_main = vm;
414  cm->vnet_main = vnet_get_main ();
416 
417  /* Initialize the feature next-node indexes */
419  l2_classify_node.index,
423  rt->l2cm = cm;
424  rt->vcm = cm->vnet_classify_main;
425 
426  return 0;
427 }
428 
430 
431 
432 void
433 vnet_l2_classify_enable_disable (u32 sw_if_index, int enable_disable)
434 {
435  vlib_main_t *vm = vlib_get_main ();
436  vnet_main_t *vnm = vnet_get_main ();
437 
438  if (enable_disable)
439  set_int_l2_mode (vm, vnm, MODE_L2_CLASSIFY, sw_if_index, 0, 0, 0, 0);
440  else
441  set_int_l2_mode (vm, vnm, MODE_L3, sw_if_index, 0, 0, 0, 0);
442 }
443 
444 int
446  u32 ip4_table_index,
447  u32 ip6_table_index, u32 other_table_index)
448 {
451 
452  /* Assume that we've validated sw_if_index in the API layer */
453 
454  if (ip4_table_index != ~0 &&
455  pool_is_free_index (vcm->tables, ip4_table_index))
456  return VNET_API_ERROR_NO_SUCH_TABLE;
457 
458  if (ip6_table_index != ~0 &&
459  pool_is_free_index (vcm->tables, ip6_table_index))
460  return VNET_API_ERROR_NO_SUCH_TABLE2;
461 
462  if (other_table_index != ~0 &&
463  pool_is_free_index (vcm->tables, other_table_index))
464  return VNET_API_ERROR_NO_SUCH_TABLE3;
465 
468  sw_if_index);
469 
472  sw_if_index);
473 
476  sw_if_index);
477 
479  [sw_if_index] = ip4_table_index;
480 
482  [sw_if_index] = ip6_table_index;
483 
485  [sw_if_index] = other_table_index;
486 
487  return 0;
488 }
489 
490 static clib_error_t *
492  unformat_input_t * input,
493  vlib_cli_command_t * cmd)
494 {
495  vnet_main_t *vnm = vnet_get_main ();
496  u32 sw_if_index = ~0;
497  u32 ip4_table_index = ~0;
498  u32 ip6_table_index = ~0;
499  u32 other_table_index = ~0;
500  int rv;
501 
503  {
504  if (unformat (input, "intfc %U", unformat_vnet_sw_interface,
505  vnm, &sw_if_index))
506  ;
507  else if (unformat (input, "ip4-table %d", &ip4_table_index))
508  ;
509  else if (unformat (input, "ip6-table %d", &ip6_table_index))
510  ;
511  else if (unformat (input, "other-table %d", &other_table_index))
512  ;
513  else
514  break;
515  }
516 
517  if (sw_if_index == ~0)
518  return clib_error_return (0, "interface must be specified");
519 
520 
521  if (ip4_table_index == ~0 && ip6_table_index == ~0
522  && other_table_index == ~0)
523  {
524  vlib_cli_output (vm, "L2 classification disabled");
525  vnet_l2_classify_enable_disable (sw_if_index, 0 /* enable */ );
526  return 0;
527  }
528 
529  rv = vnet_l2_classify_set_tables (sw_if_index, ip4_table_index,
530  ip6_table_index, other_table_index);
531  switch (rv)
532  {
533  case 0:
534  vnet_l2_classify_enable_disable (sw_if_index, 1 /* enable */ );
535  break;
536 
537  default:
538  return clib_error_return (0, "vnet_l2_classify_set_tables: %d", rv);
539  break;
540  }
541 
542  return 0;
543 }
544 
545 /* *INDENT-OFF* */
546 VLIB_CLI_COMMAND (int_l2_classify_cli, static) = {
547  .path = "set interface l2 classify",
548  .short_help =
549  "set interface l2 classify intfc <int> [ip4-table <n>]\n"
550  " [ip6-table <n>] [other-table <n>]",
551  .function = int_l2_classify_command_fn,
552 };
553 /* *INDENT-ON* */
554 
555 
556 
557 /*
558  * fd.io coding-style-patch-verification: ON
559  *
560  * Local Variables:
561  * eval: (c-set-style "gnu")
562  * End:
563  */
u64 vnet_classify_hash_packet(vnet_classify_table_t *t, u8 *h)
#define vec_validate(V, I)
Make sure vector is long enough for given index (no header, unspecified alignment) ...
Definition: vec.h:396
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
#define CLIB_UNUSED(x)
Definition: clib.h:79
uword unformat(unformat_input_t *i, char *fmt,...)
Definition: unformat.c:966
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:23
bad routing header type(not 4)") sr_error (NO_MORE_SEGMENTS
#define PREDICT_TRUE(x)
Definition: clib.h:98
#define foreach_l2_classify_error
Definition: l2_classify.c:55
#define UNFORMAT_END_OF_INPUT
Definition: format.h:143
static f64 vlib_time_now(vlib_main_t *vm)
Definition: main.h:182
struct _vlib_node_registration vlib_node_registration_t
unformat_function_t unformat_vnet_sw_interface
vlib_error_t * errors
Definition: node.h:418
u32 * classify_table_index_by_sw_if_index[L2_CLASSIFY_N_TABLES]
Definition: l2_classify.h:61
l2_classify_next_t
Definition: l2_classify.h:36
vnet_main_t * vnet_get_main(void)
Definition: misc.c:45
#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
vnet_classify_main_t * vnet_classify_main
Definition: l2_classify.h:66
static char * l2_classify_error_strings[]
Definition: l2_classify.c:69
unsigned long u64
Definition: types.h:89
void vnet_l2_classify_enable_disable(u32 sw_if_index, int enable_disable)
Definition: l2_classify.c:433
static void vnet_classify_prefetch_bucket(vnet_classify_table_t *t, u64 hash)
u32 set_int_l2_mode(vlib_main_t *vm, vnet_main_t *vnet_main, u32 mode, u32 sw_if_index, u32 bd_index, u32 bvi, u32 shg, u32 xc_sw_if_index)
Set the subinterface to run in l2 or l3 mode.
Definition: l2_input.c:542
l2_classify_main_t l2_classify_main
Definition: l2_classify.c:51
static void vnet_classify_prefetch_entry(vnet_classify_table_t *t, u64 hash)
#define pool_elt_at_index(p, i)
Returns pointer to element at given index.
Definition: pool.h:369
int vnet_l2_classify_set_tables(u32 sw_if_index, u32 ip4_table_index, u32 ip6_table_index, u32 other_table_index)
Definition: l2_classify.c:445
static clib_error_t * int_l2_classify_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: l2_classify.c:491
static void * vlib_node_get_runtime_data(vlib_main_t *vm, u32 node_index)
Get node runtime private data by node index.
Definition: node_funcs.h:109
#define PREDICT_FALSE(x)
Definition: clib.h:97
static u32 feat_bitmap_get_next_node_index(u32 *next_nodes, u32 bitmap)
Return the graph node index for the feature corresponding to the first set bit in the bitmap...
Definition: feat_bitmap.h:79
#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
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:575
vlib_error_t error
Error code for buffers to be enqueued to error handler.
Definition: buffer.h:118
static void vlib_node_increment_counter(vlib_main_t *vm, u32 node_index, u32 counter_index, u64 increment)
Definition: node_funcs.h:1111
vlib_main_t * vlib_main
Definition: l2_classify.h:64
vnet_main_t * vnet_main
Definition: l2_classify.h:65
static uword vnet_classify_get_offset(vnet_classify_table_t *t, vnet_classify_entry_t *v)
u16 n_vectors
Definition: node.h:344
u32 feat_next_node_index[32]
Definition: l2_classify.h:58
#define CLIB_PREFETCH(addr, size, type)
Definition: cache.h:82
static u8 * format_l2_classify_trace(u8 *s, va_list *args)
Definition: l2_classify.c:39
vnet_classify_main_t * vcm
Definition: l2_classify.c:33
static void feat_bitmap_init_next_nodes(vlib_main_t *vm, u32 node_index, u32 num_features, char **feat_names, u32 *next_nodes)
Initialize the feature next-node indexes of a graph node.
Definition: feat_bitmap.h:43
static void vlib_buffer_advance(vlib_buffer_t *b, word l)
Advance current data pointer by the supplied (signed!) amount.
Definition: buffer.h:200
vlib_node_registration_t l2_classify_node
(constructor) VLIB_REGISTER_NODE (l2_classify_node)
Definition: l2_classify.c:53
clib_error_t * l2_classify_init(vlib_main_t *vm)
Definition: l2_classify.c:406
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:211
#define ARRAY_LEN(x)
Definition: clib.h:59
char ** l2input_get_feat_names(void)
Return an array of strings containing graph node names of each feature.
Definition: l2_input.c:46
struct _vnet_classify_main vnet_classify_main_t
Definition: vnet_classify.h:50
u16 cached_next_index
Definition: node.h:462
unsigned int u32
Definition: types.h:88
#define vnet_buffer(b)
Definition: buffer.h:335
u8 * format(u8 *s, char *fmt,...)
Definition: format.c:418
#define VLIB_NODE_FLAG_TRACE
Definition: node.h:259
vnet_classify_main_t vnet_classify_main
Definition: vnet_classify.c:21
l2_classify_error_t
Definition: l2_classify.c:61
#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
unsigned short u16
Definition: types.h:57
static uword l2_classify_node_fn(vlib_main_t *vm, vlib_node_runtime_t *node, vlib_frame_t *frame)
Definition: l2_classify.c:76
VLIB_CLI_COMMAND(set_interface_ip_source_and_port_range_check_command, static)
double f64
Definition: types.h:142
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
#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
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:169
#define VLIB_REGISTER_NODE(x,...)
Definition: node.h:143
u8 data[0]
Packet data.
Definition: buffer.h:151
#define MODE_L2_CLASSIFY
Definition: l2_input.h:218
#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
uword runtime_data[(128-1 *sizeof(vlib_node_function_t *)-1 *sizeof(vlib_error_t *)-11 *sizeof(u32)-5 *sizeof(u16))/sizeof(uword)]
Definition: node.h:472
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
vnet_classify_entry_t * vnet_classify_find_entry(vnet_classify_table_t *t, u8 *h, u64 hash, f64 now)
Definition: defs.h:46
#define MODE_L3
Definition: l2_input.h:215
l2_classify_main_t * l2cm
Definition: l2_classify.c:34