FD.io VPP  v17.04-9-g99c0734
Vector Packet Processing
adj.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/adj/adj.h>
17 #include <vnet/adj/adj_internal.h>
18 #include <vnet/adj/adj_glean.h>
19 #include <vnet/adj/adj_midchain.h>
20 #include <vnet/adj/adj_mcast.h>
21 #include <vnet/fib/fib_node_list.h>
22 
23 /*
24  * Special Adj with index zero. we need to define this since the v4 mtrie
25  * assumes an index of 0 implies the ply is empty. therefore all 'real'
26  * adjs need a non-zero index.
27  */
29 
30 /* Adjacency packet/byte counters indexed by adjacency index. */
32 
33 /*
34  * the single adj pool
35  */
37 
38 /**
39  * @brief Global Config for enabling per-adjacency counters.
40  * By default these are disabled.
41  */
43 
44 always_inline void
46 {
47  if (CLIB_DEBUG > 0)
48  {
49  memset (adj, 0xfe, sizeof (adj[0]));
50  }
51 }
52 
55 {
56  ip_adjacency_t *adj;
57 
58  pool_get(adj_pool, adj);
59 
60  adj_poison(adj);
61 
62  /* Make sure certain fields are always initialized. */
63  /* Validate adjacency counters. */
64  vlib_validate_combined_counter(&adjacency_counters,
65  adj_get_index(adj));
66 
67  adj->rewrite_header.sw_if_index = ~0;
68  adj->n_adj = 1;
69  adj->lookup_next_index = 0;
70 
71  fib_node_init(&adj->ia_node,
73  adj->ia_nh_proto = proto;
74  adj->ia_flags = 0;
75 
78 
79  return (adj);
80 }
81 
82 static int
84 {
85  if (ADJ_INDEX_INVALID == adj_index)
86  return (!0);
87 
88  return (0);
89 }
90 
91 /**
92  * @brief Pretty print helper function for formatting specific adjacencies.
93  * @param s - input string to format
94  * @param args - other args passed to format function such as:
95  * - vnet_main_t
96  * - ip_lookup_main_t
97  * - adj_index
98  */
99 u8 *
100 format_ip_adjacency (u8 * s, va_list * args)
101 {
103  ip_adjacency_t * adj;
104  u32 adj_index;
105 
106  adj_index = va_arg (*args, u32);
107  fiaf = va_arg (*args, format_ip_adjacency_flags_t);
108  adj = adj_get(adj_index);
109 
110  switch (adj->lookup_next_index)
111  {
113  s = format (s, "%U", format_adj_nbr, adj_index, 0);
114  break;
115  case IP_LOOKUP_NEXT_ARP:
116  s = format (s, "%U", format_adj_nbr_incomplete, adj_index, 0);
117  break;
119  s = format (s, "%U", format_adj_glean, adj_index, 0);
120  break;
122  s = format (s, "%U", format_adj_midchain, adj_index, 2);
123  break;
125  s = format (s, "%U", format_adj_mcast, adj_index, 0);
126  break;
127  default:
128  break;
129  }
130 
131  if (fiaf & FORMAT_IP_ADJACENCY_DETAIL)
132  {
133  vlib_counter_t counts;
134 
135  vlib_get_combined_counter(&adjacency_counters, adj_index, &counts);
136  s = format (s, "\n counts:[%Ld:%Ld]", counts.packets, counts.bytes);
137  s = format (s, "\n locks:%d", adj->ia_node.fn_locks);
138  s = format(s, "\n children:\n ");
140  }
141 
142  return s;
143 }
144 
145 /*
146  * adj_last_lock_gone
147  *
148  * last lock/reference to the adj has gone, we no longer need it.
149  */
150 static void
152 {
154 
156  ADJ_DBG(adj, "last-lock-gone");
157 
159 
160  switch (adj->lookup_next_index)
161  {
163  dpo_reset(&adj->sub_type.midchain.next_dpo);
164  /* FALL THROUGH */
165  case IP_LOOKUP_NEXT_ARP:
167  /*
168  * complete and incomplete nbr adjs
169  */
171  adj->ia_nh_proto,
172  adj->ia_link,
173  &adj->sub_type.nbr.next_hop,
174  adj->rewrite_header.sw_if_index);
175  break;
178  adj->rewrite_header.sw_if_index);
179  break;
182  adj->rewrite_header.sw_if_index);
183  break;
184  default:
185  /*
186  * type not stored in any DB from which we need to remove it
187  */
188  break;
189  }
190 
192 
193  fib_node_deinit(&adj->ia_node);
194  pool_put(adj_pool, adj);
195 }
196 
197 void
199 {
200  ip_adjacency_t *adj;
201 
202  if (adj_index_is_special(adj_index))
203  {
204  return;
205  }
206 
207  adj = adj_get(adj_index);
208  ASSERT(adj);
209 
210  ADJ_DBG(adj, "lock");
211  fib_node_lock(&adj->ia_node);
212 }
213 
214 void
216 {
217  ip_adjacency_t *adj;
218 
219  if (adj_index_is_special(adj_index))
220  {
221  return;
222  }
223 
224  adj = adj_get(adj_index);
225  ASSERT(adj);
226 
227  ADJ_DBG(adj, "unlock");
228  ASSERT(adj);
229 
230  fib_node_unlock(&adj->ia_node);
231 }
232 
233 u32
235  fib_node_type_t child_type,
236  fib_node_index_t child_index)
237 {
238  ASSERT(ADJ_INDEX_INVALID != adj_index);
239  if (adj_index_is_special(adj_index))
240  {
241  return (~0);
242  }
243 
245  adj_index,
246  child_type,
247  child_index));
248 }
249 
250 void
252  u32 sibling_index)
253 {
254  if (adj_index_is_special(adj_index))
255  {
256  return;
257  }
258 
260  adj_index,
261  sibling_index);
262 }
263 
264 /*
265  * Context for the walk to update the cached feture flags.
266  */
267 typedef struct adj_feature_update_t_
268 {
272 
273 static adj_walk_rc_t
275  void *arg)
276 {
277  adj_feature_update_ctx_t *ctx = arg;
278  ip_adjacency_t *adj;
279 
280  adj = adj_get(ai);
281 
282  /*
283  * this ugly mess matches the feature arc that is changing with affected
284  * adjacencies
285  */
287  (VNET_LINK_IP6 == adj->ia_link)) ||
289  (VNET_LINK_IP4 == adj->ia_link)) ||
291  (VNET_LINK_MPLS == adj->ia_link)))
292  {
293  if (ctx->enable)
294  adj->rewrite_header.flags |= VNET_REWRITE_HAS_FEATURES;
295  else
296  adj->rewrite_header.flags &= ~VNET_REWRITE_HAS_FEATURES;
297  }
298  return (ADJ_WALK_RC_CONTINUE);
299 }
300 
301 void
302 adj_feature_update (u32 sw_if_index,
303  u8 arc_index,
304  u8 is_enable)
305 {
306  /*
307  * Walk all the adjacencies on the interface to update the cached
308  * 'has-features' flag
309  */
311  .arc = arc_index,
312  .enable = is_enable,
313  };
314  adj_walk (sw_if_index, adj_feature_update_walk_cb, &ctx);
315 }
316 
317 /**
318  * @brief Walk the Adjacencies on a given interface
319  */
320 void
321 adj_walk (u32 sw_if_index,
322  adj_walk_cb_t cb,
323  void *ctx)
324 {
325  /*
326  * walk all the neighbor adjacencies
327  */
328  fib_protocol_t proto;
329 
331  {
332  adj_nbr_walk(sw_if_index, proto, cb, ctx);
333  }
334 }
335 
336 /**
337  * @brief Return the link type of the adjacency
338  */
341 {
342  const ip_adjacency_t *adj;
343 
344  adj = adj_get(ai);
345 
346  return (adj->ia_link);
347 }
348 
349 /**
350  * @brief Return the sw interface index of the adjacency.
351  */
352 u32
354 {
355  const ip_adjacency_t *adj;
356 
357  adj = adj_get(ai);
358 
359  return (adj->rewrite_header.sw_if_index);
360 }
361 
362 /**
363  * @brief Return the link type of the adjacency
364  */
365 const u8*
367 {
368  vnet_rewrite_header_t *rw;
369  ip_adjacency_t *adj;
370 
371  adj = adj_get(ai);
372  rw = &adj->rewrite_header;
373 
374  ASSERT (rw->data_bytes != 0xfefe);
375 
376  return (rw->data - rw->data_bytes);
377 }
378 
379 static fib_node_t *
381 {
382  ip_adjacency_t *adj;
383 
384  adj = adj_get(index);
385 
386  return (&adj->ia_node);
387 }
388 
389 #define ADJ_FROM_NODE(_node) \
390  ((ip_adjacency_t*)((char*)_node - STRUCT_OFFSET_OF(ip_adjacency_t, ia_node)))
391 
392 static void
394 {
396 }
397 
401 {
402  /*
403  * Que pasa. yo soj en el final!
404  */
405  ASSERT(0);
406 
408 }
409 
410 /*
411  * Adjacency's graph node virtual function table
412  */
413 static const fib_node_vft_t adj_vft = {
415  .fnv_last_lock = adj_node_last_lock_gone,
416  .fnv_back_walk = adj_back_walk_notify,
417 };
418 
419 static clib_error_t *
421 {
423 
428 
429  /*
430  * one special adj to reserve index 0
431  */
432  special_v4_miss_adj_with_index_zero = adj_alloc(FIB_PROTOCOL_IP4);
433 
434  return (NULL);
435 }
436 
438 
439 static clib_error_t *
441  unformat_input_t * input,
442  vlib_cli_command_t * cmd)
443 {
445  u32 sw_if_index = ~0;
446  int summary = 0;
447 
449  {
450  if (unformat (input, "%d", &ai))
451  ;
452  else if (unformat (input, "sum"))
453  summary = 1;
454  else if (unformat (input, "summary"))
455  summary = 1;
456  else if (unformat (input, "%U",
458  &sw_if_index))
459  ;
460  else
461  break;
462  }
463 
464  if (summary)
465  {
466  vlib_cli_output (vm, "Number of adjacenies: %d", pool_elts(adj_pool));
467  vlib_cli_output (vm, "Per-adjacency counters: %s",
469  "enabled":
470  "disabled"));
471  }
472  else
473  {
474  if (ADJ_INDEX_INVALID != ai)
475  {
476  if (pool_is_free_index(adj_pool, ai))
477  {
478  vlib_cli_output (vm, "adjacency %d invalid", ai);
479  return 0;
480  }
481 
482  vlib_cli_output (vm, "[@%d] %U",
483  ai,
486  }
487  else
488  {
489  /* *INDENT-OFF* */
490  pool_foreach_index(ai, adj_pool,
491  ({
492  if (~0 != sw_if_index &&
493  sw_if_index != adj_get_sw_if_index(ai))
494  {
495  }
496  else
497  {
498  vlib_cli_output (vm, "[@%d] %U",
499  ai,
502  }
503  }));
504  /* *INDENT-ON* */
505  }
506  }
507  return 0;
508 }
509 
510 /*?
511  * Show all adjacencies.
512  * @cliexpar
513  * @cliexstart{sh adj}
514  * [@0]
515  * [@1] glean: loop0
516  * [@2] ipv4 via 1.0.0.2 loop0: IP4: 00:00:22:aa:bb:cc -> 00:00:11:aa:bb:cc
517  * [@3] mpls via 1.0.0.2 loop0: MPLS_UNICAST: 00:00:22:aa:bb:cc -> 00:00:11:aa:bb:cc
518  * [@4] ipv4 via 1.0.0.3 loop0: IP4: 00:00:22:aa:bb:cc -> 00:00:11:aa:bb:cc
519  * [@5] mpls via 1.0.0.3 loop0: MPLS_UNICAST: 00:00:22:aa:bb:cc -> 00:00:11:aa:bb:cc
520  * @cliexend
521  ?*/
522 VLIB_CLI_COMMAND (adj_show_command, static) = {
523  .path = "show adj",
524  .short_help = "show adj [<adj_index>] [interface] [summary]",
525  .function = adj_show,
526 };
527 
528 /**
529  * @brief CLI invoked function to enable/disable per-adj counters
530  */
531 static clib_error_t *
533  unformat_input_t * input,
534  vlib_cli_command_t * cmd)
535 {
536  clib_error_t *error = NULL;
537  int enable = ~0;
538 
540  {
541  if (unformat (input, "enable"))
542  enable = 1;
543  else if (unformat (input, "disable"))
544  enable = 0;
545  else
546  break;
547  }
548 
549  if (enable != ~0)
550  {
551  /* user requested something sensible */
553  }
554  else
555  {
556  error = clib_error_return (0, "specify 'enable' or 'disable'");
557  }
558 
559  return (error);
560 }
561 
562 /*?
563  * Enabe/disble per-adjacency counters. This is optional because it comes with
564  * a non-negligible performance cost.
565  ?*/
566 VLIB_CLI_COMMAND (adj_cli_counters_set_command, static) = {
567  .path = "adjacency counters",
568  .short_help = "adjacency counters [enable|disable]",
569  .function = adj_cli_counters_set,
570 };
void adj_glean_remove(fib_protocol_t proto, u32 sw_if_index)
Definition: adj_glean.c:92
ip_adjacency_t * adj_pool
The global adjacnecy pool.
Definition: adj.c:36
void vlib_validate_combined_counter(vlib_combined_counter_main_t *cm, u32 index)
validate a combined counter
Definition: counter.c:89
enum fib_node_type_t_ fib_node_type_t
The types of nodes in a FIB graph.
ip_adjacency_t * adjacency_heap
Definition: lookup.h:331
u8 * format_adj_nbr(u8 *s, va_list *ap)
Format a neigbour (REWRITE) adjacency.
Definition: adj_nbr.c:1010
static int adj_index_is_special(adj_index_t adj_index)
Definition: adj.c:83
void adj_lock(adj_index_t adj_index)
An adjacency is a representation of an attached L3 peer.
Definition: adj.c:198
vnet_main_t * vnet_get_main(void)
Definition: misc.c:46
struct ip_adjacency_t_::@138::@139 nbr
IP_LOOKUP_NEXT_ARP/IP_LOOKUP_NEXT_REWRITE.
void fib_node_init(fib_node_t *node, fib_node_type_t type)
Definition: fib_node.c:183
const u8 * adj_get_rewrite(adj_index_t ai)
Return the link type of the adjacency.
Definition: adj.c:366
vnet_link_t adj_get_link_type(adj_index_t ai)
Return the link type of the adjacency.
Definition: adj.c:340
#define NULL
Definition: clib.h:55
IP unicast adjacency.
Definition: lookup.h:193
enum fib_node_back_walk_rc_t_ fib_node_back_walk_rc_t
Return code from a back walk function.
Combined counter to hold both packets and byte differences.
Definition: counter.h:139
void fib_node_deinit(fib_node_t *node)
Definition: fib_node.c:198
ip_lookup_main_t lookup_main
Definition: ip4.h:109
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:418
union ip_adjacency_t_::@138 sub_type
unformat_function_t unformat_vnet_sw_interface
u8 * format_adj_nbr_incomplete(u8 *s, va_list *ap)
Format aa incomplete neigbour (ARP) adjacency.
Definition: adj_nbr.c:989
void adj_child_remove(adj_index_t adj_index, u32 sibling_index)
Remove a child dependent.
Definition: adj.c:251
#define pool_get(P, E)
Allocate an object E from a pool P (unspecified alignment).
Definition: pool.h:200
Multicast Adjacency.
Definition: lookup.h:95
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
u32 fib_node_child_add(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_type_t type, fib_node_index_t index)
Definition: fib_node.c:96
void fib_node_register_type(fib_node_type_t type, const fib_node_vft_t *vft)
fib_node_register_type
Definition: fib_node.c:58
vnet_link_t ia_link
Definition: lookup.h:214
u8 output_feature_arc_index
Definition: lookup.h:352
static ip_adjacency_t * adj_get(adj_index_t adj_index)
Get a pointer to an adjacency object from its index.
Definition: adj.h:128
#define VLIB_INIT_FUNCTION(x)
Definition: init.h:111
#define always_inline
Definition: clib.h:84
ip_adjacency_flags_t ia_flags
Flags on the adjacency.
Definition: lookup.h:280
enum adj_walk_rc_t_ adj_walk_rc_t
return codes from a adjacency walker callback function
#define clib_error_return(e, args...)
Definition: error.h:111
void adj_unlock(adj_index_t adj_index)
Release a reference counting lock on the adjacency.
Definition: adj.c:215
static clib_error_t * adj_cli_counters_set(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
CLI invoked function to enable/disable per-adj counters.
Definition: adj.c:532
void adj_nbr_remove(adj_index_t ai, fib_protocol_t nh_proto, vnet_link_t link_type, const ip46_address_t *nh_addr, u32 sw_if_index)
Definition: adj_nbr.c:79
This packet matches an "interface route" and packets need to be passed to ARP to find rewrite string ...
Definition: lookup.h:78
u8 output_feature_arc_index
Definition: mpls.h:75
#define ADJ_DBG(_e, _fmt, _args...)
big switch to turn on Adjacency debugging
Definition: adj_internal.h:41
#define ADJ_INDEX_INVALID
Invalid ADJ index - used when no adj is known likewise blazoned capitals INVALID speak volumes where ...
Definition: adj_types.h:36
counter_t packets
packet counter
Definition: counter.h:141
u32 adj_get_sw_if_index(adj_index_t ai)
Return the sw interface index of the adjacency.
Definition: adj.c:353
void fib_node_lock(fib_node_t *node)
Definition: fib_node.c:204
void adj_midchain_module_init(void)
Module initialisation.
Definition: adj_midchain.c:580
struct _unformat_input_t unformat_input_t
#define ADJ_FROM_NODE(_node)
Definition: adj.c:389
static adj_index_t adj_get_index(ip_adjacency_t *adj)
Get a pointer to an adjacency object from its index.
Definition: adj_internal.h:85
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:241
int adj_per_adj_counters
Global Config for enabling per-adjacency counters.
Definition: adj.c:42
static fib_node_back_walk_rc_t adj_back_walk_notify(fib_node_t *node, fib_node_back_walk_ctx_t *ctx)
Definition: adj.c:399
An node in the FIB graph.
Definition: fib_node.h:277
void adj_nbr_module_init(void)
Module initialisation.
Definition: adj_nbr.c:1118
void fib_node_unlock(fib_node_t *node)
Definition: fib_node.c:210
vlib_combined_counter_main_t adjacency_counters
Adjacency packet counters.
Definition: adj.c:31
fib_node_t ia_node
Definition: lookup.h:275
void adj_mcast_remove(fib_protocol_t proto, u32 sw_if_index)
Definition: adj_mcast.c:124
void adj_glean_module_init(void)
Module initialisation.
Definition: adj_glean.c:282
static clib_error_t * adj_show(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: adj.c:440
#define UNFORMAT_END_OF_INPUT
Definition: format.h:143
fib_node_list_t fn_children
Vector of nodes that depend upon/use/share this node.
Definition: fib_node.h:294
mpls_main_t mpls_main
Definition: mpls.c:25
static void vlib_get_combined_counter(const vlib_combined_counter_main_t *cm, u32 index, vlib_counter_t *result)
Get the value of a combined counter, never called in the speed path Scrapes the entire set of per-thr...
Definition: counter.h:250
vlib_main_t * vm
Definition: buffer.c:276
static void adj_last_lock_gone(ip_adjacency_t *adj)
Definition: adj.c:151
fib_node_get_t fnv_get
Definition: fib_node.h:265
u8 * format_adj_glean(u8 *s, va_list *ap)
Format/display a glean adjacency.
Definition: adj_glean.c:223
void adj_mcast_module_init(void)
Module initialisation.
Definition: adj_mcast.c:341
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:28
adj_walk_rc_t(* adj_walk_cb_t)(adj_index_t ai, void *ctx)
Call back function when walking adjacencies.
Definition: adj_types.h:50
static void adj_poison(ip_adjacency_t *adj)
Definition: adj.c:45
#define pool_is_free_index(P, I)
Use free bitmap to query whether given index is free.
Definition: pool.h:238
void vlib_worker_thread_barrier_sync(vlib_main_t *vm)
Definition: threads.c:1199
u32 adj_index_t
An index for adjacencies.
Definition: adj_types.h:30
u8 * format_adj_mcast(u8 *s, va_list *ap)
Format/display a mcast adjacency.
Definition: adj_mcast.c:255
This packet matches an "incomplete adjacency" and packets need to be passed to ARP to find rewrite st...
Definition: lookup.h:73
void adj_nbr_walk(u32 sw_if_index, fib_protocol_t adj_nh_proto, adj_walk_cb_t cb, void *ctx)
Walk the neighbour Adjacencies on a given interface.
Definition: adj_nbr.c:569
Context passed between object during a back walk.
Definition: fib_node.h:190
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:154
void adj_walk(u32 sw_if_index, adj_walk_cb_t cb, void *ctx)
Walk the Adjacencies on a given interface.
Definition: adj.c:321
u8 * format_adj_midchain(u8 *s, va_list *ap)
Format a midchain adjacency.
Definition: adj_midchain.c:500
u32 fib_node_list_get_size(fib_node_list_t list)
#define ASSERT(truth)
unsigned int u32
Definition: types.h:88
static fib_node_t * adj_get_node(fib_node_index_t index)
Definition: adj.c:380
ip6_main_t ip6_main
Definition: ip6_forward.c:2846
ip_lookup_main_t lookup_main
Definition: ip6.h:151
enum vnet_link_t_ vnet_link_t
Link Type: A description of the protocol of packets on the link.
This packets follow a mid-chain adjacency.
Definition: lookup.h:89
struct ip_adjacency_t_::@138::@140 midchain
IP_LOOKUP_NEXT_MIDCHAIN.
void fib_node_child_remove(fib_node_type_t parent_type, fib_node_index_t parent_index, fib_node_index_t sibling_index)
Definition: fib_node.c:121
static vlib_main_t * vlib_get_main(void)
Definition: global_funcs.h:23
u16 n_adj
Number of adjecencies in block.
Definition: lookup.h:199
counter_t bytes
byte counter
Definition: counter.h:142
unsigned char u8
Definition: types.h:56
ip_lookup_next_t lookup_next_index
Definition: lookup.h:204
u32 fn_locks
Number of dependents on this node.
Definition: fib_node.h:300
u32 adj_child_add(adj_index_t adj_index, fib_node_type_t child_type, fib_node_index_t child_index)
Add a child dependent to an adjacency.
Definition: adj.c:234
u8 * format_ip_adjacency(u8 *s, va_list *args)
Pretty print helper function for formatting specific adjacencies.
Definition: adj.c:100
ip_adjacency_t * adj_alloc(fib_protocol_t proto)
Definition: adj.c:54
A collection of combined counters.
Definition: counter.h:180
#define FOR_EACH_FIB_IP_PROTOCOL(_item)
Definition: fib_types.h:62
static void adj_node_last_lock_gone(fib_node_t *node)
Definition: adj.c:393
A FIB graph nodes virtual function table.
Definition: fib_node.h:264
void vlib_worker_thread_barrier_release(vlib_main_t *vm)
Definition: threads.c:1231
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:1117
void adj_feature_update(u32 sw_if_index, u8 arc_index, u8 is_enable)
Notify the adjacency subsystem that the features settings for an interface have changed.
Definition: adj.c:302
This packet is to be rewritten and forwarded to the next processing node.
Definition: lookup.h:83
void dpo_reset(dpo_id_t *dpo)
reset a DPO ID The DPO will be unlocked.
Definition: dpo.c:194
static ip_adjacency_t * special_v4_miss_adj_with_index_zero
Definition: adj.c:28
static clib_error_t * adj_module_init(vlib_main_t *vm)
Definition: adj.c:420
#define pool_foreach_index(i, v, body)
Iterate pool by index.
Definition: pool.h:418
u8 * fib_node_children_format(fib_node_list_t list, u8 *s)
Definition: fib_node.c:174
struct adj_feature_update_t_ adj_feature_update_ctx_t
This adjacency/interface has output features configured.
Definition: rewrite.h:57
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:577
static adj_walk_rc_t adj_feature_update_walk_cb(adj_index_t ai, void *arg)
Definition: adj.c:274
static int adj_are_counters_enabled(void)
Get the global configuration option for enabling per-adj counters.
Definition: adj.h:137
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:971
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:169
enum format_ip_adjacency_flags_t_ format_ip_adjacency_flags_t
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:109