FD.io VPP  v19.04.4-rc0-5-ge88582fac
Vector Packet Processing
session_cli.c
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017-2019 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  */
16 #include <vnet/session/session.h>
17 
18 u8 *
19 format_session_fifos (u8 * s, va_list * args)
20 {
21  session_t *ss = va_arg (*args, session_t *);
22  int verbose = va_arg (*args, int);
23  session_event_t _e, *e = &_e;
24  u8 found;
25 
26  if (!ss->rx_fifo || !ss->tx_fifo)
27  return s;
28 
29  s = format (s, " Rx fifo: %U", format_svm_fifo, ss->rx_fifo, verbose);
30  if (verbose > 2 && ss->rx_fifo->has_event)
31  {
32  found = session_node_lookup_fifo_event (ss->rx_fifo, e);
33  s = format (s, " session node event: %s\n",
34  found ? "found" : "not found");
35  }
36  s = format (s, " Tx fifo: %U", format_svm_fifo, ss->tx_fifo, verbose);
37  if (verbose > 2 && ss->tx_fifo->has_event)
38  {
39  found = session_node_lookup_fifo_event (ss->tx_fifo, e);
40  s = format (s, " session node event: %s\n",
41  found ? "found" : "not found");
42  }
43  return s;
44 }
45 
46 /**
47  * Format stream session as per the following format
48  *
49  * verbose:
50  * "Connection", "Rx fifo", "Tx fifo", "Session Index"
51  * non-verbose:
52  * "Connection"
53  */
54 u8 *
55 format_session (u8 * s, va_list * args)
56 {
57  session_t *ss = va_arg (*args, session_t *);
58  int verbose = va_arg (*args, int);
60  u8 *str = 0;
61 
63  {
64  s = format (s, "[%u:%u] CLOSED", ss->thread_index, ss->session_index);
65  return s;
66  }
67 
68  if (verbose == 1)
69  {
70  u8 post_accept = ss->session_state >= SESSION_STATE_ACCEPTING;
71  u8 hasf = post_accept | session_tx_is_dgram (ss);
72  u32 rxf, txf;
73 
74  rxf = hasf ? svm_fifo_max_dequeue (ss->rx_fifo) : 0;
75  txf = hasf ? svm_fifo_max_dequeue (ss->tx_fifo) : 0;
76  str = format (0, "%-10u%-10u", rxf, txf);
77  }
78 
81  {
82  s = format (s, "%U", format_transport_connection, tp,
83  ss->connection_index, ss->thread_index, verbose);
84  if (verbose == 1)
85  s = format (s, "%v", str);
86  if (verbose > 1)
87  s = format (s, "%U", format_session_fifos, ss, verbose);
88  }
89  else if (ss->session_state == SESSION_STATE_LISTENING)
90  {
92  tp, ss->connection_index, verbose, str);
93  if (verbose > 1)
94  s = format (s, "\n%U", format_session_fifos, ss, verbose);
95  }
97  {
99  tp, ss->connection_index, str);
100  }
101  else
102  {
103  clib_warning ("Session in state: %d!", ss->session_state);
104  }
105  vec_free (str);
106 
107  return s;
108 }
109 
110 uword
112 {
113  u8 *proto = va_arg (*args, u8 *);
114  u32 *fib_index = va_arg (*args, u32 *);
115  ip46_address_t *lcl = va_arg (*args, ip46_address_t *);
116  ip46_address_t *rmt = va_arg (*args, ip46_address_t *);
117  u16 *lcl_port = va_arg (*args, u16 *);
118  u16 *rmt_port = va_arg (*args, u16 *);
119  u8 *is_ip4 = va_arg (*args, u8 *);
120  u8 tuple_is_set = 0;
121  u32 vrf = ~0;
122 
123  clib_memset (lcl, 0, sizeof (*lcl));
124  clib_memset (rmt, 0, sizeof (*rmt));
125 
126  if (unformat (input, "tcp"))
127  {
128  *proto = TRANSPORT_PROTO_TCP;
129  }
130  else if (unformat (input, "udp"))
131  {
132  *proto = TRANSPORT_PROTO_UDP;
133  }
134  else
135  return 0;
136 
137  if (unformat (input, "vrf %u", &vrf))
138  ;
139 
140  if (unformat (input, "%U:%d->%U:%d", unformat_ip4_address, &lcl->ip4,
141  lcl_port, unformat_ip4_address, &rmt->ip4, rmt_port))
142  {
143  *is_ip4 = 1;
144  tuple_is_set = 1;
145  }
146  else if (unformat (input, "%U:%d->%U:%d", unformat_ip6_address, &lcl->ip6,
147  lcl_port, unformat_ip6_address, &rmt->ip6, rmt_port))
148  {
149  *is_ip4 = 0;
150  tuple_is_set = 1;
151  }
152 
153  if (vrf != ~0)
154  {
155  fib_protocol_t fib_proto;
156  fib_proto = *is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
157  *fib_index = fib_table_find (fib_proto, vrf);
158  }
159 
160  return tuple_is_set;
161 }
162 
163 uword
164 unformat_session (unformat_input_t * input, va_list * args)
165 {
166  session_t **result = va_arg (*args, session_t **);
167  u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
168  ip46_address_t lcl, rmt;
169  session_t *s;
170  u8 proto = ~0;
171  u8 is_ip4 = 0;
172 
173  if (!unformat (input, "%U", unformat_stream_session_id, &proto, &fib_index,
174  &lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
175  return 0;
176 
177  if (is_ip4)
178  s = session_lookup_safe4 (fib_index, &lcl.ip4, &rmt.ip4,
179  clib_host_to_net_u16 (lcl_port),
180  clib_host_to_net_u16 (rmt_port), proto);
181  else
182  s = session_lookup_safe6 (fib_index, &lcl.ip6, &rmt.ip6,
183  clib_host_to_net_u16 (lcl_port),
184  clib_host_to_net_u16 (rmt_port), proto);
185  if (s)
186  {
187  *result = s;
189  return 1;
190  }
191  return 0;
192 }
193 
194 uword
196 {
197  transport_connection_t **result = va_arg (*args, transport_connection_t **);
198  u32 suggested_proto = va_arg (*args, u32);
200  u8 proto = ~0;
201  ip46_address_t lcl, rmt;
202  u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
203  u8 is_ip4 = 0;
204 
205  if (!unformat (input, "%U", unformat_stream_session_id, &fib_index, &proto,
206  &lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
207  return 0;
208 
209  proto = (proto == (u8) ~ 0) ? suggested_proto : proto;
210  if (proto == (u8) ~ 0)
211  return 0;
212  if (is_ip4)
213  tc = session_lookup_connection4 (fib_index, &lcl.ip4, &rmt.ip4,
214  clib_host_to_net_u16 (lcl_port),
215  clib_host_to_net_u16 (rmt_port), proto);
216  else
217  tc = session_lookup_connection6 (fib_index, &lcl.ip6, &rmt.ip6,
218  clib_host_to_net_u16 (lcl_port),
219  clib_host_to_net_u16 (rmt_port), proto);
220 
221  if (tc)
222  {
223  *result = tc;
224  return 1;
225  }
226  return 0;
227 }
228 
229 static clib_error_t *
231  vlib_cli_command_t * cmd)
232 {
233  u8 one_session = 0, do_listeners = 0, sst, do_elog = 0;
235  u32 transport_proto = ~0, track_index;
236  session_t *pool, *s;
238  app_worker_t *app_wrk;
239  int verbose = 0, i;
240  const u8 *app_name;
241 
242  if (!smm->is_enabled)
243  {
244  return clib_error_return (0, "session layer is not enabled");
245  }
246 
248  {
249  if (unformat (input, "verbose %d", &verbose))
250  ;
251  else if (unformat (input, "verbose"))
252  verbose = 1;
253  else if (unformat (input, "listeners %U", unformat_transport_proto,
254  &transport_proto))
255  do_listeners = 1;
256  else if (unformat (input, "%U", unformat_session, &s))
257  {
258  one_session = 1;
259  }
260  else if (unformat (input, "elog"))
261  do_elog = 1;
262  else
263  return clib_error_return (0, "unknown input `%U'",
264  format_unformat_error, input);
265  }
266 
267  if (one_session)
268  {
269  u8 *str = format (0, "%U", format_session, s, 3);
270  if (do_elog && s->session_state != SESSION_STATE_LISTENING)
271  {
272  elog_main_t *em = &vm->elog_main;
273  f64 dt;
274 
275  tc = session_get_transport (s);
276  track_index = transport_elog_track_index (tc);
277  dt = (em->init_time.cpu - vm->clib_time.init_cpu_time)
279  if (track_index != ~0)
280  str = format (str, " session elog:\n%U", format_elog_track, em,
281  dt, track_index);
282  }
283  vlib_cli_output (vm, "%v", str);
284  vec_free (str);
285  return 0;
286  }
287 
288  if (do_listeners)
289  {
290  sst = session_type_from_proto_and_ip (transport_proto, 1);
291  vlib_cli_output (vm, "%-50s%-24s", "Listener", "App");
292  /* *INDENT-OFF* */
293  pool_foreach (s, smm->wrk[0].sessions, ({
294  if (s->session_state != SESSION_STATE_LISTENING
295  || s->session_type != sst)
296  continue;
297  app_wrk = app_worker_get (s->app_wrk_index);
298  app_name = application_name_from_index (app_wrk->app_index);
299  vlib_cli_output (vm, "%U%-25v%", format_session, s, 0,
300  app_name);
301  }));
302  /* *INDENT-ON* */
303  return 0;
304  }
305 
306  for (i = 0; i < vec_len (smm->wrk); i++)
307  {
308  u32 once_per_pool = 1, n_closed = 0;
309 
310  pool = smm->wrk[i].sessions;
311  if (!pool_elts (pool))
312  {
313  vlib_cli_output (vm, "Thread %d: no sessions", i);
314  continue;
315  }
316 
317  if (!verbose)
318  {
319  vlib_cli_output (vm, "Thread %d: %d sessions", i, pool_elts (pool));
320  continue;
321  }
322 
323  if (once_per_pool && verbose == 1)
324  {
325  vlib_cli_output (vm, "%s%-50s%-15s%-10s%-10s", i ? "\n" : "",
326  "Connection", "State", "Rx-f", "Tx-f");
327  once_per_pool = 0;
328  }
329 
330  /* *INDENT-OFF* */
331  pool_foreach (s, pool, ({
333  {
334  n_closed += 1;
335  continue;
336  }
337  vlib_cli_output (vm, "%U", format_session, s, verbose);
338  }));
339  /* *INDENT-ON* */
340 
341  if (!n_closed)
342  vlib_cli_output (vm, "Thread %d: active sessions %u", i,
343  pool_elts (pool) - n_closed);
344  else
345  vlib_cli_output (vm, "Thread %d: active sessions %u closed %u", i,
346  pool_elts (pool) - n_closed, n_closed);
347  }
348 
349  return 0;
350 }
351 
352 /* *INDENT-OFF* */
353 VLIB_CLI_COMMAND (vlib_cli_show_session_command) =
354 {
355  .path = "show session",
356  .short_help = "show session [verbose [n]] [listeners <proto>] "
357  "[<session-id> [elog]]",
358  .function = show_session_command_fn,
359 };
360 /* *INDENT-ON* */
361 
362 static int
364 {
365  app_worker_t *server_wrk = app_worker_get (s->app_wrk_index);
366  app_worker_close_notify (server_wrk, s);
367  return 0;
368 }
369 
370 static clib_error_t *
372  vlib_cli_command_t * cmd)
373 {
375  u32 thread_index = 0, clear_all = 0;
376  session_worker_t *wrk;
377  u32 session_index = ~0;
378  session_t *session;
379 
380  if (!smm->is_enabled)
381  {
382  return clib_error_return (0, "session layer is not enabled");
383  }
384 
386  {
387  if (unformat (input, "thread %d", &thread_index))
388  ;
389  else if (unformat (input, "session %d", &session_index))
390  ;
391  else if (unformat (input, "all"))
392  clear_all = 1;
393  else
394  return clib_error_return (0, "unknown input `%U'",
395  format_unformat_error, input);
396  }
397 
398  if (!clear_all && session_index == ~0)
399  return clib_error_return (0, "session <nn> required, but not set.");
400 
401  if (session_index != ~0)
402  {
403  session = session_get_if_valid (session_index, thread_index);
404  if (!session)
405  return clib_error_return (0, "no session %d on thread %d",
406  session_index, thread_index);
407  clear_session (session);
408  }
409 
410  if (clear_all)
411  {
412  /* *INDENT-OFF* */
413  vec_foreach (wrk, smm->wrk)
414  {
415  pool_foreach(session, wrk->sessions, ({
416  clear_session (session);
417  }));
418  };
419  /* *INDENT-ON* */
420  }
421 
422  return 0;
423 }
424 
425 /* *INDENT-OFF* */
426 VLIB_CLI_COMMAND (clear_session_command, static) =
427 {
428  .path = "clear session",
429  .short_help = "clear session thread <thread> session <index>",
430  .function = clear_session_command_fn,
431 };
432 /* *INDENT-ON* */
433 
434 static clib_error_t *
436  unformat_input_t * input,
437  vlib_cli_command_t * cmd)
438 {
439  session_t *s = 0;
440  u8 is_rx = 0, *str = 0;
441 
443  {
444  if (unformat (input, "%U", unformat_session, &s))
445  ;
446  else if (unformat (input, "rx"))
447  is_rx = 1;
448  else if (unformat (input, "tx"))
449  is_rx = 0;
450  else
451  return clib_error_return (0, "unknown input `%U'",
452  format_unformat_error, input);
453  }
454 
455  if (!SVM_FIFO_TRACE)
456  {
457  vlib_cli_output (vm, "fifo tracing not enabled");
458  return 0;
459  }
460 
461  if (!s)
462  {
463  vlib_cli_output (vm, "could not find session");
464  return 0;
465  }
466 
467  str = is_rx ?
468  svm_fifo_dump_trace (str, s->rx_fifo) :
469  svm_fifo_dump_trace (str, s->tx_fifo);
470 
471  vlib_cli_output (vm, "%v", str);
472  return 0;
473 }
474 
475 /* *INDENT-OFF* */
476 VLIB_CLI_COMMAND (show_session_fifo_trace_command, static) =
477 {
478  .path = "show session fifo trace",
479  .short_help = "show session fifo trace <session>",
481 };
482 /* *INDENT-ON* */
483 
484 static clib_error_t *
486  vlib_cli_command_t * cmd)
487 {
488  session_t *s = 0;
489  u8 is_rx = 0, *str = 0;
490 
492  {
493  if (unformat (input, "%U", unformat_session, &s))
494  ;
495  else if (unformat (input, "rx"))
496  is_rx = 1;
497  else
498  return clib_error_return (0, "unknown input `%U'",
499  format_unformat_error, input);
500  }
501 
502  if (!SVM_FIFO_TRACE)
503  {
504  vlib_cli_output (vm, "fifo tracing not enabled");
505  return 0;
506  }
507 
508  if (!s)
509  {
510  vlib_cli_output (vm, "could not find session");
511  return 0;
512  }
513 
514  str = is_rx ?
515  svm_fifo_replay (str, s->rx_fifo, 0, 1) :
516  svm_fifo_replay (str, s->tx_fifo, 0, 1);
517 
518  vlib_cli_output (vm, "%v", str);
519  return 0;
520 }
521 
522 /* *INDENT-OFF* */
523 VLIB_CLI_COMMAND (session_replay_fifo_trace_command, static) =
524 {
525  .path = "session replay fifo",
526  .short_help = "session replay fifo <session>",
527  .function = session_replay_fifo_command_fn,
528 };
529 /* *INDENT-ON* */
530 
531 static clib_error_t *
533  vlib_cli_command_t * cmd)
534 {
535  unformat_input_t _line_input, *line_input = &_line_input;
536  u8 is_en = 1;
537  clib_error_t *error;
538 
539  if (!unformat_user (input, unformat_line_input, line_input))
540  return clib_error_return (0, "expected enable | disable");
541 
542  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
543  {
544  if (unformat (line_input, "enable"))
545  is_en = 1;
546  else if (unformat (line_input, "disable"))
547  is_en = 0;
548  else
549  {
550  error = clib_error_return (0, "unknown input `%U'",
551  format_unformat_error, line_input);
552  unformat_free (line_input);
553  return error;
554  }
555  }
556 
557  unformat_free (line_input);
558  return vnet_session_enable_disable (vm, is_en);
559 }
560 
561 /* *INDENT-OFF* */
562 VLIB_CLI_COMMAND (session_enable_disable_command, static) =
563 {
564  .path = "session",
565  .short_help = "session [enable|disable]",
566  .function = session_enable_disable_fn,
567 };
568 /* *INDENT-ON* */
569 
570 /*
571  * fd.io coding-style-patch-verification: ON
572  *
573  * Local Variables:
574  * eval: (c-set-style "gnu")
575  * End:
576  */
u32 connection_index
Index of the transport connection associated to the session.
u8 * format_transport_connection(u8 *s, va_list *args)
Definition: transport.c:105
u8 * format_session_fifos(u8 *s, va_list *args)
Definition: session_cli.c:19
svm_fifo_t * tx_fifo
session_main_t session_main
Definition: session.c:26
static u8 session_tx_is_dgram(session_t *s)
format_function_t format_svm_fifo
Definition: svm_fifo.h:208
u32 session_index
Index in thread pool where session was allocated.
elog_time_stamp_t init_time
Timestamps.
Definition: elog.h:172
session_t * session_lookup_safe4(u32 fib_index, ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
Lookup session with ip4 and transport layer information.
clib_memset(h->entries, 0, sizeof(h->entries[0]) *entries)
transport_connection_t * session_get_transport(session_t *s)
Definition: session.c:1283
svm_fifo_t * rx_fifo
Pointers to rx/tx buffers.
session_worker_t * wrk
Worker contexts.
Definition: session.h:122
static session_t * session_get_if_valid(u64 si, u32 thread_index)
Definition: session.h:214
static transport_proto_t session_get_transport_proto(session_t *s)
int i
static int clear_session(session_t *s)
Definition: session_cli.c:363
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:983
static clib_error_t * clear_session_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: session_cli.c:371
static void session_pool_remove_peeker(u32 thread_index)
Definition: session.h:265
u8 * format(u8 *s, const char *fmt,...)
Definition: format.c:424
clib_time_t clib_time
Definition: main.h:72
session_t * session_lookup_safe6(u32 fib_index, ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
Lookup session with ip6 and transport layer information.
unsigned char u8
Definition: types.h:56
enum fib_protocol_t_ fib_protocol_t
Protocol Type.
session_t * sessions
Worker session pool.
Definition: session.h:69
double f64
Definition: types.h:142
transport_connection_t * session_lookup_connection6(u32 fib_index, ip6_address_t *lcl, ip6_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
Lookup connection with ip6 and transport layer information.
#define pool_foreach(VAR, POOL, BODY)
Iterate through pool.
Definition: pool.h:493
unformat_function_t unformat_ip4_address
Definition: format.h:70
static u32 svm_fifo_max_dequeue(svm_fifo_t *f)
Definition: svm_fifo.h:129
#define clib_error_return(e, args...)
Definition: error.h:99
static clib_error_t * show_session_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: session_cli.c:230
unsigned int u32
Definition: types.h:88
u32 fib_table_find(fib_protocol_t proto, u32 table_id)
Get the index of the FIB for a Table-ID.
Definition: fib_table.c:1064
transport_connection_t * session_lookup_connection4(u32 fib_index, ip4_address_t *lcl, ip4_address_t *rmt, u16 lcl_port, u16 rmt_port, u8 proto)
Lookup connection with ip4 and transport layer information.
unformat_function_t unformat_line_input
Definition: format.h:282
static session_type_t session_type_from_proto_and_ip(transport_proto_t proto, u8 is_ip4)
struct _unformat_input_t unformat_input_t
unsigned short u16
Definition: types.h:57
u8 is_enabled
Session manager is enabled.
Definition: session.h:143
uword unformat_transport_connection(unformat_input_t *input, va_list *args)
Definition: session_cli.c:195
f64 seconds_per_clock
Definition: time.h:57
uword unformat_session(unformat_input_t *input, va_list *args)
Definition: session_cli.c:164
u8 * svm_fifo_replay(u8 *s, svm_fifo_t *f, u8 no_read, u8 verbose)
Definition: svm_fifo.c:92
clib_error_t * vnet_session_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: session.c:1426
uword unformat_stream_session_id(unformat_input_t *input, va_list *args)
Definition: session_cli.c:111
unformat_function_t unformat_ip6_address
Definition: format.h:91
#define UNFORMAT_END_OF_INPUT
Definition: format.h:144
vlib_main_t * vm
Definition: buffer.c:312
#define vec_free(V)
Free vector&#39;s memory (no header).
Definition: vec.h:341
#define clib_warning(format, args...)
Definition: error.h:59
elog_main_t elog_main
Definition: main.h:172
struct _transport_connection transport_connection_t
static u32 transport_elog_track_index(transport_connection_t *tc)
Definition: transport.h:129
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:155
#define SVM_FIFO_TRACE
Definition: svm_fifo.h:39
uword unformat_transport_proto(unformat_input_t *input, va_list *args)
Definition: transport.c:161
u64 cpu
CPU cycle counter.
Definition: elog.h:126
u8 * format_transport_half_open_connection(u8 *s, va_list *args)
Definition: transport.c:146
u8 thread_index
Index of the thread that allocated the session.
u8 * format_session(u8 *s, va_list *args)
Format stream session as per the following format.
Definition: session_cli.c:55
u8 * svm_fifo_dump_trace(u8 *s, svm_fifo_t *f)
Definition: svm_fifo.c:68
app_worker_t * app_worker_get(u32 wrk_index)
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
u8 * format_elog_track(u8 *s, va_list *args)
Definition: elog.c:408
volatile u8 session_state
State in session layer state machine.
u64 uword
Definition: types.h:112
static void unformat_free(unformat_input_t *i)
Definition: format.h:162
u8 * format_transport_listen_connection(u8 *s, va_list *args)
Definition: transport.c:132
static clib_error_t * session_replay_fifo_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: session_cli.c:485
static clib_error_t * show_session_fifo_trace_command_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: session_cli.c:435
u8 * format_unformat_error(u8 *s, va_list *va)
Definition: unformat.c:91
u64 init_cpu_time
Definition: time.h:62
#define vec_foreach(var, vec)
Vector iterator.
u32 app_wrk_index
Index of the app worker that owns the session.
u8 session_node_lookup_fifo_event(svm_fifo_t *f, session_event_t *e)
static clib_error_t * session_enable_disable_fn(vlib_main_t *vm, unformat_input_t *input, vlib_cli_command_t *cmd)
Definition: session_cli.c:532
int app_worker_close_notify(app_worker_t *app_wrk, session_t *s)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:762
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:972
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:170
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:128