FD.io VPP  v18.10-34-gcce845e
Vector Packet Processing
ip4_mfib.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/ip4_mfib.h>
17 
18 #include <vnet/mfib/mfib_table.h>
19 #include <vnet/mfib/mfib_entry.h>
20 
21 static const mfib_prefix_t ip4_specials[] = {
22  {
23  /* (*,*)/0 */
24  .fp_src_addr = {
25  .ip4.data_u32 = 0,
26  },
27  .fp_grp_addr = {
28  .ip4.data_u32 = 0,
29  },
30  .fp_len = 0,
31  .fp_proto = FIB_PROTOCOL_IP4,
32  },
33 };
34 
35 static u32
38 {
39  mfib_table_t *mfib_table;
40 
42  memset(mfib_table, 0, sizeof(*mfib_table));
43 
44  mfib_table->mft_proto = FIB_PROTOCOL_IP4;
45  mfib_table->mft_index =
46  mfib_table->v4.index =
47  (mfib_table - ip4_main.mfibs);
48 
50  table_id,
51  mfib_table->mft_index);
52 
53  mfib_table->mft_table_id =
54  mfib_table->v4.table_id =
55  table_id;
56 
57  mfib_table_lock(mfib_table->mft_index, FIB_PROTOCOL_IP4, src);
58 
59  /*
60  * add the special entries into the new FIB
61  */
62  int ii;
63 
64  for (ii = 0; ii < ARRAY_LEN(ip4_specials); ii++)
65  {
66  mfib_prefix_t prefix = ip4_specials[ii];
67 
68  prefix.fp_src_addr.ip4.data_u32 =
69  clib_host_to_net_u32(prefix.fp_src_addr.ip4.data_u32);
70  prefix.fp_grp_addr.ip4.data_u32 =
71  clib_host_to_net_u32(prefix.fp_grp_addr.ip4.data_u32);
72 
74  &prefix,
78  }
79 
80  return (mfib_table->mft_index);
81 }
82 
83 void
85 {
86  mfib_table_t *mfib_table = (mfib_table_t*)mfib;
87  int ii;
88 
89  /*
90  * remove all the specials we added when the table was created.
91  */
92  for (ii = 0; ii < ARRAY_LEN(ip4_specials); ii++)
93  {
94  fib_node_index_t mfei;
95  mfib_prefix_t prefix = ip4_specials[ii];
96 
97  prefix.fp_src_addr.ip4.data_u32 =
98  clib_host_to_net_u32(prefix.fp_src_addr.ip4.data_u32);
99  prefix.fp_grp_addr.ip4.data_u32 =
100  clib_host_to_net_u32(prefix.fp_grp_addr.ip4.data_u32);
101 
102  mfei = mfib_table_lookup(mfib_table->mft_index, &prefix);
104  }
105 
106  /*
107  * validate no more routes.
108  */
109  ASSERT(0 == mfib_table->mft_total_route_counts);
110  ASSERT(~0 != mfib_table->mft_table_id);
111 
113  pool_put(ip4_main.mfibs, mfib_table);
114 }
115 
116 u32
119 {
120  u32 index;
121 
122  index = ip4_mfib_index_from_table_id(table_id);
123  if (~0 == index)
124  return ip4_create_mfib_with_table_id(table_id, src);
125  mfib_table_lock(index, FIB_PROTOCOL_IP4, src);
126 
127  return (index);
128 }
129 
130 u32
132 {
133  if (sw_if_index >= vec_len(ip4_main.mfib_index_by_sw_if_index))
134  {
135  /*
136  * This is the case for interfaces that are not yet mapped to
137  * a IP table
138  */
139  return (~0);
140  }
141  return (ip4_main.mfib_index_by_sw_if_index[sw_if_index]);
142 }
143 
144 #define IPV4_MFIB_GRP_LEN(_len)\
145  (_len > 32 ? 32 : _len)
146 
147 #define IP4_MFIB_MK_KEY(_grp, _src, _len, _key) \
148 { \
149  _key = ((u64)(_grp->data_u32 & \
150  ip4_main.fib_masks[IPV4_MFIB_GRP_LEN(_len)])) << 32; \
151  _key |= _src->data_u32; \
152 }
153 #define IP4_MFIB_MK_GRP_KEY(_grp, _len, _key) \
154 { \
155  _key = ((u64)(_grp->data_u32 & \
156  ip4_main.fib_masks[IPV4_MFIB_GRP_LEN(_len)])) << 32; \
157 }
158 
159 /*
160  * ip4_fib_table_lookup_exact_match
161  *
162  * Exact match prefix lookup
163  */
166  const ip4_address_t *grp,
167  const ip4_address_t *src,
168  u32 len)
169 {
170  uword * hash, * result;
171  u64 key;
172 
173  hash = mfib->fib_entry_by_dst_address[len];
174  IP4_MFIB_MK_KEY(grp, src, len, key);
175 
176  result = hash_get(hash, key);
177 
178  if (NULL != result) {
179  return (result[0]);
180  }
181  return (FIB_NODE_INDEX_INVALID);
182 }
183 
184 /*
185  * ip4_fib_table_lookup
186  *
187  * Longest prefix match
188  */
191  const ip4_address_t *src,
192  const ip4_address_t *grp,
193  u32 len)
194 {
195  uword * hash, * result;
196  i32 mask_len;
197  u64 key;
198 
199  mask_len = len;
200 
201  if (PREDICT_TRUE(64 == mask_len))
202  {
203  hash = mfib->fib_entry_by_dst_address[mask_len];
204  IP4_MFIB_MK_KEY(grp, src, mask_len, key);
205 
206  result = hash_get (hash, key);
207 
208  if (NULL != result) {
209  return (result[0]);
210  }
211  }
212 
213  for (mask_len = 32; mask_len >= 0; mask_len--)
214  {
215  hash = mfib->fib_entry_by_dst_address[mask_len];
216  IP4_MFIB_MK_GRP_KEY(grp, mask_len, key);
217 
218  result = hash_get (hash, key);
219 
220  if (NULL != result) {
221  return (result[0]);
222  }
223  }
224  return (FIB_NODE_INDEX_INVALID);
225 }
226 
227 void
229  const ip4_address_t *grp,
230  const ip4_address_t *src,
231  u32 len,
232  fib_node_index_t fib_entry_index)
233 {
234  uword * hash, * result;
235  u64 key;
236 
237  IP4_MFIB_MK_KEY(grp, src, len, key);
238  hash = mfib->fib_entry_by_dst_address[len];
239  result = hash_get (hash, key);
240 
241  if (NULL == result) {
242  /*
243  * adding a new entry
244  */
245  if (NULL == hash) {
246  hash = hash_create (32 /* elts */, sizeof (uword));
248  }
249  hash = hash_set(hash, key, fib_entry_index);
250  mfib->fib_entry_by_dst_address[len] = hash;
251  }
252  else
253  {
254  ASSERT(0);
255  }
256 }
257 
258 void
260  const ip4_address_t *grp,
261  const ip4_address_t *src,
262  u32 len)
263 {
264  uword * hash, * result;
265  u64 key;
266 
267  IP4_MFIB_MK_KEY(grp, src, len, key);
268  hash = mfib->fib_entry_by_dst_address[len];
269  result = hash_get (hash, key);
270 
271  if (NULL == result)
272  {
273  /*
274  * removing a non-existant entry. i'll allow it.
275  */
276  }
277  else
278  {
279  hash_unset(hash, key);
280  }
281 
282  mfib->fib_entry_by_dst_address[len] = hash;
283 }
284 
285 void
288  void *ctx)
289 {
290  int i;
291 
292  for (i = 0; i < ARRAY_LEN (mfib->fib_entry_by_dst_address); i++)
293  {
294  uword * hash = mfib->fib_entry_by_dst_address[i];
295 
296  if (NULL != hash)
297  {
298  hash_pair_t * p;
299 
300  hash_foreach_pair (p, hash,
301  ({
302  fn(p->value[0], ctx);
303  }));
304  }
305  }
306 }
307 
308 u8 *
309 format_ip4_mfib_table_memory (u8 * s, va_list * args)
310 {
311  mfib_table_t *mfib_table;
312  u64 total_memory;
313 
314  total_memory = 0;
315 
316  pool_foreach (mfib_table, ip4_main.mfibs,
317  ({
318  ip4_mfib_t *mfib = &mfib_table->v4;
319  uword mfib_size;
320  int i;
321 
322  mfib_size = 0;
323 
324  for (i = 0; i < ARRAY_LEN (mfib->fib_entry_by_dst_address); i++)
325  {
326  uword * hash = mfib->fib_entry_by_dst_address[i];
327 
328  if (NULL != hash)
329  {
330  mfib_size += hash_bytes(hash);
331  }
332  }
333 
334  total_memory += mfib_size;
335  }));
336 
337  s = format(s, "%=30s %=6d %=8ld\n",
338  "IPv4 multicast",
339  pool_elts(ip4_main.mfibs), total_memory);
340 
341  return (s);
342 }
343 
344 static void
346  vlib_main_t * vm)
347 {
348  fib_node_index_t *mfib_entry_indicies;
349  fib_node_index_t *mfib_entry_index;
350  int i;
351 
352  mfib_entry_indicies = NULL;
353 
354  for (i = 0; i < ARRAY_LEN (mfib->fib_entry_by_dst_address); i++)
355  {
356  uword * hash = mfib->fib_entry_by_dst_address[i];
357 
358  if (NULL != hash)
359  {
360  hash_pair_t * p;
361 
362  hash_foreach_pair (p, hash,
363  ({
364  vec_add1(mfib_entry_indicies, p->value[0]);
365  }));
366  }
367  }
368 
369  vec_sort_with_function(mfib_entry_indicies, mfib_entry_cmp_for_sort);
370 
371  vec_foreach(mfib_entry_index, mfib_entry_indicies)
372  {
373  vlib_cli_output(vm, "%U",
375  *mfib_entry_index,
377  }
378 
379  vec_free(mfib_entry_indicies);
380 }
381 
382 static void
384  vlib_main_t * vm,
386  ip4_address_t *grp,
387  u32 mask_len)
388 {
389  vlib_cli_output(vm, "%U",
391  ip4_mfib_table_lookup(mfib, src, grp, mask_len),
393 }
394 
395 static clib_error_t *
397  unformat_input_t * input,
398  vlib_cli_command_t * cmd)
399 {
400  ip4_main_t * im4 = &ip4_main;
401  mfib_table_t *mfib_table;
402  int verbose, matching, memory;
403  ip4_address_t grp, src = {{0}};
404  u32 mask = 32;
405  u64 total_hash_memory;
406  int i, table_id = -1, fib_index = ~0;
407 
408  verbose = 1;
409  memory = matching = 0;
410  total_hash_memory = 0;
411 
413  {
414  if (unformat (input, "brief") || unformat (input, "summary")
415  || unformat (input, "sum"))
416  verbose = 0;
417  else if (unformat (input, "mem") || unformat (input, "memory"))
418  memory = 1;
419  else if (unformat (input, "%U %U",
420  unformat_ip4_address, &src,
421  unformat_ip4_address, &grp))
422  {
423  matching = 1;
424  mask = 64;
425  }
426  else if (unformat (input, "%U/%d", unformat_ip4_address, &grp, &mask))
427  {
428  memset(&src, 0, sizeof(src));
429  matching = 1;
430  }
431  else if (unformat (input, "%U", unformat_ip4_address, &grp))
432  {
433  memset(&src, 0, sizeof(src));
434  matching = 1;
435  mask = 32;
436  }
437  else if (unformat (input, "table %d", &table_id))
438  ;
439  else if (unformat (input, "index %d", &fib_index))
440  ;
441  else
442  break;
443  }
444 
445  pool_foreach (mfib_table, im4->mfibs,
446  ({
447  ip4_mfib_t *mfib = &mfib_table->v4;
448 
449  if (table_id >= 0 && table_id != (int)mfib->table_id)
450  continue;
451  if (fib_index != ~0 && fib_index != (int)mfib->index)
452  continue;
453 
454  if (memory)
455  {
456  uword hash_size;
457 
458  hash_size = 0;
459 
460  for (i = 0; i < ARRAY_LEN (mfib->fib_entry_by_dst_address); i++)
461  {
462  uword * hash = mfib->fib_entry_by_dst_address[i];
463  if (NULL != hash)
464  {
465  hash_size += hash_bytes(hash);
466  }
467  }
468  if (verbose)
469  vlib_cli_output (vm, "%U hash:%d",
470  format_mfib_table_name, mfib->index,
471  FIB_PROTOCOL_IP4,
472  hash_size);
473  total_hash_memory += hash_size;
474  continue;
475  }
476 
477  vlib_cli_output (vm, "%U, fib_index %d",
479  mfib->index);
480 
481  /* Show summary? */
482  if (! verbose)
483  {
484  vlib_cli_output (vm, "%=20s%=16s", "Prefix length", "Count");
485  for (i = 0; i < ARRAY_LEN (mfib->fib_entry_by_dst_address); i++)
486  {
487  uword * hash = mfib->fib_entry_by_dst_address[i];
488  uword n_elts = hash_elts (hash);
489  if (n_elts > 0)
490  vlib_cli_output (vm, "%20d%16d", i, n_elts);
491  }
492  continue;
493  }
494 
495  if (!matching)
496  {
497  ip4_mfib_table_show_all(mfib, vm);
498  }
499  else
500  {
501  ip4_mfib_table_show_one(mfib, vm, &src, &grp, mask);
502  }
503  }));
504  if (memory)
505  vlib_cli_output (vm, "totals: hash:%ld", total_hash_memory);
506 
507  return 0;
508 }
509 
510 /*?
511  * This command displays the IPv4 MulticasrFIB Tables (VRF Tables) and
512  * the route entries for each table.
513  *
514  * @note This command will run for a long time when the FIB tables are
515  * comprised of millions of entries. For those senarios, consider displaying
516  * a single table or summary mode.
517  *
518  * @cliexpar
519  * Example of how to display all the IPv4 Multicast FIB tables:
520  * @cliexstart{show ip fib}
521  * ipv4-VRF:0, fib_index 0
522  * (*, 0.0.0.0/0): flags:D,
523  * Interfaces:
524  * multicast-ip4-chain
525  * [@1]: dpo-drop ip4
526  * (*, 232.1.1.1/32):
527  * Interfaces:
528  * test-eth1: Forward,
529  * test-eth2: Forward,
530  * test-eth0: Accept,
531  * multicast-ip4-chain
532  * [@2]: dpo-replicate: [index:1 buckets:2 to:[0:0]]
533  * [0] [@1]: ipv4-mcast: test-eth1: IP4: d0:d1:d2:d3:d4:01 -> 01:00:05:00:00:00
534  * [1] [@1]: ipv4-mcast: test-eth2: IP4: d0:d1:d2:d3:d4:02 -> 01:00:05:00:00:00
535  *
536  * @cliexend
537  * Example of how to display a summary of all IPv4 FIB tables:
538  * @cliexstart{show ip fib summary}
539  * ipv4-VRF:0, fib_index 0, flow hash: src dst sport dport proto
540  * Prefix length Count
541  * 0 1
542  * 8 2
543  * 32 4
544  * ipv4-VRF:7, fib_index 1, flow hash: src dst sport dport proto
545  * Prefix length Count
546  * 0 1
547  * 8 2
548  * 24 2
549  * 32 4
550  * @cliexend
551  ?*/
552 /* *INDENT-OFF* */
553 VLIB_CLI_COMMAND (ip4_show_mfib_command, static) = {
554  .path = "show ip mfib",
555  .short_help = "show ip mfib [summary] [table <table-id>] [index <fib-id>] [<grp-addr>[/<mask>]] [<grp-addr>] [<src-addr> <grp-addr>]",
556  .function = ip4_show_mfib,
557 };
558 /* *INDENT-ON* */
#define MFIB_ENTRY_FORMAT_DETAIL
Definition: mfib_entry.h:88
static clib_error_t * ip4_show_mfib(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: ip4_mfib.c:396
ip46_address_t fp_src_addr
Definition: mfib_types.h:47
#define hash_set(h, key, value)
Definition: hash.h:255
fib_node_index_t mfib_table_lookup(u32 fib_index, const mfib_prefix_t *prefix)
Perfom a longest prefix match in the non-forwarding table.
Definition: mfib_table.c:65
vl_api_address_t src
Definition: vxlan_gbp.api:33
vhost_user_memory_t memory
Definition: vhost_user.h:122
#define hash_unset(h, key)
Definition: hash.h:261
u32 index
Definition: ip4.h:59
#define PREDICT_TRUE(x)
Definition: clib.h:108
unsigned long u64
Definition: types.h:89
u32 ip4_mfib_table_get_index_for_sw_if_index(u32 sw_if_index)
Definition: ip4_mfib.c:131
#define NULL
Definition: clib.h:57
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
Definition: vec.h:523
static void ip4_mfib_table_show_one(ip4_mfib_t *mfib, vlib_main_t *vm, ip4_address_t *src, ip4_address_t *grp, u32 mask_len)
Definition: ip4_mfib.c:383
int i
u32 mft_total_route_counts
Total route counters.
Definition: mfib_table.h:76
fib_node_index_t mfib_table_entry_update(u32 fib_index, const mfib_prefix_t *prefix, mfib_source_t source, fib_rpf_id_t rpf_id, mfib_entry_flags_t entry_flags)
Add a new (with no replication) or lock an existing entry.
Definition: mfib_table.c:165
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:419
#define MFIB_ENTRY_FORMAT_BRIEF
Definition: mfib_entry.h:87
unsigned char u8
Definition: types.h:56
uword value[0]
Definition: hash.h:165
enum mfib_source_t_ mfib_source_t
Possible [control plane] sources of MFIB entries.
memset(h->entries, 0, sizeof(h->entries[0])*entries)
u32 * mfib_index_by_sw_if_index
Table index indexed by software interface.
Definition: ip4.h:115
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:443
unformat_function_t unformat_ip4_address
Definition: format.h:70
#define MFIB_RPF_ID_NONE
Definition: fib_types.h:393
u32 sw_if_index
Definition: vxlan_gbp.api:39
fib_node_index_t mft_index
Index into FIB vector.
Definition: mfib_table.h:71
void mfib_table_entry_delete_index(fib_node_index_t mfib_entry_index, mfib_source_t source)
Delete a FIB entry.
Definition: mfib_table.c:380
#define IP4_MFIB_MK_GRP_KEY(_grp, _len, _key)
Definition: ip4_mfib.c:153
unsigned int u32
Definition: types.h:88
static void hash_set_flags(void *v, uword flags)
Definition: hash.h:153
struct mfib_table_t_ * mfibs
Vector of MFIBs.
Definition: ip4.h:107
void ip4_mfib_table_walk(ip4_mfib_t *mfib, mfib_table_walk_fn_t fn, void *ctx)
Walk the IP4 mfib table.
Definition: ip4_mfib.c:286
#define hash_get(h, key)
Definition: hash.h:249
void ip4_mfib_table_entry_remove(ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
Definition: ip4_mfib.c:259
long ctx[MAX_CONNS]
Definition: main.c:144
struct _unformat_input_t unformat_input_t
#define IP4_MFIB_MK_KEY(_grp, _src, _len, _key)
Definition: ip4_mfib.c:147
static u32 ip4_create_mfib_with_table_id(u32 table_id, mfib_source_t src)
Definition: ip4_mfib.c:36
#define pool_put(P, E)
Free an object E in pool P.
Definition: pool.h:274
Definition: ip4.h:50
int mfib_entry_cmp_for_sort(void *i1, void *i2)
Definition: mfib_entry.c:1078
void mfib_table_lock(u32 fib_index, fib_protocol_t proto, mfib_source_t source)
Release a reference counting lock on the table.
Definition: mfib_table.c:587
#define pool_get_aligned(P, E, A)
Allocate an object E from a pool P (general version).
Definition: pool.h:188
#define UNFORMAT_END_OF_INPUT
Definition: format.h:144
vlib_main_t * vm
Definition: buffer.c:294
fib_node_index_t ip4_mfib_table_lookup_exact_match(const ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len)
Definition: ip4_mfib.c:165
u8 * format_mfib_entry(u8 *s, va_list *args)
Definition: mfib_entry.c:171
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:339
u32 fib_node_index_t
A typedef of a node index.
Definition: fib_types.h:30
#define ARRAY_LEN(x)
Definition: clib.h:61
Aggregrate type for a prefix.
Definition: mfib_types.h:24
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:155
uword * fib_entry_by_dst_address[65]
Definition: ip4.h:53
signed int i32
Definition: types.h:77
#define hash_create(elts, value_bytes)
Definition: hash.h:696
static uword hash_elts(void *v)
Definition: hash.h:118
#define ASSERT(truth)
IPv4 main type.
Definition: ip4.h:96
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
void ip4_mfib_table_entry_insert(ip4_mfib_t *mfib, const ip4_address_t *grp, const ip4_address_t *src, u32 len, fib_node_index_t fib_entry_index)
Definition: ip4_mfib.c:228
fib_protocol_t mft_proto
Which protocol this table serves.
Definition: mfib_table.h:56
u32 mft_table_id
Table ID (hash key) for this FIB.
Definition: mfib_table.h:66
static void ip4_mfib_table_show_all(ip4_mfib_t *mfib, vlib_main_t *vm)
Definition: ip4_mfib.c:345
#define FIB_NODE_INDEX_INVALID
Definition: fib_types.h:31
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u32 ip4_mfib_table_find_or_create_and_lock(u32 table_id, mfib_source_t src)
Get or create an IPv4 fib.
Definition: ip4_mfib.c:117
#define hash_foreach_pair(p, v, body)
Iterate over hash pairs.
Definition: hash.h:373
u64 uword
Definition: types.h:112
#define vec_sort_with_function(vec, f)
Sort a vector using the supplied element comparison function.
Definition: vec.h:982
typedef prefix
Definition: ip_types.api:40
int(* mfib_table_walk_fn_t)(fib_node_index_t fei, void *ctx)
Call back function when walking entries in a FIB table.
Definition: mfib_table.h:416
ip4_mfib_t v4
Definition: mfib_table.h:49
A protocol Independent IP multicast FIB table.
Definition: mfib_table.h:35
ip4_main_t ip4_main
Global ip4 main structure.
Definition: ip4_forward.c:900
#define vec_foreach(var, vec)
Vector iterator.
u32 table_id
Definition: ip4.h:56
uword * mfib_index_by_table_id
Hash table mapping table id to multicast fib index.
Definition: ip4.h:126
#define CLIB_CACHE_LINE_BYTES
Definition: cache.h:59
static u32 ip4_mfib_index_from_table_id(u32 table_id)
Definition: ip4_mfib.h:80
#define HASH_FLAG_NO_AUTO_SHRINK
Definition: hash.h:64
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:725
u8 * format_mfib_table_name(u8 *s, va_list *ap)
Format the description/name of the table.
Definition: mfib_table.c:618
void ip4_mfib_table_destroy(ip4_mfib_t *mfib)
Definition: ip4_mfib.c:84
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:972
ip46_address_t fp_grp_addr
The address type is not deriveable from the fp_addr member.
Definition: mfib_types.h:46
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:170
u8 * format_ip4_mfib_table_memory(u8 *s, va_list *args)
format (display) the memory usage for IP4 mfibs
Definition: ip4_mfib.c:309
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:128