FD.io VPP  v19.08-27-gf4dcae4
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
73  u32 rxf, txf;
74 
75  rxf = hasf ? svm_fifo_max_dequeue (ss->rx_fifo) : 0;
76  txf = hasf ? svm_fifo_max_dequeue (ss->tx_fifo) : 0;
77  str = format (0, "%-10u%-10u", rxf, txf);
78  }
79 
82  {
83  s = format (s, "%U", format_transport_connection, tp,
84  ss->connection_index, ss->thread_index, verbose);
85  if (verbose == 1)
86  s = format (s, "%v", str);
87  if (verbose > 1)
88  s = format (s, "%U", format_session_fifos, ss, verbose);
89  }
90  else if (ss->session_state == SESSION_STATE_LISTENING)
91  {
93  tp, ss->connection_index, ss->thread_index, verbose, str);
94  if (verbose > 1)
95  s = format (s, "\n%U", format_session_fifos, ss, verbose);
96  }
98  {
100  tp, ss->connection_index, ss->thread_index, str);
101  }
102  else
103  {
104  clib_warning ("Session in state: %d!", ss->session_state);
105  }
106  vec_free (str);
107 
108  return s;
109 }
110 
111 uword
113 {
114  u8 *proto = va_arg (*args, u8 *);
115  u32 *fib_index = va_arg (*args, u32 *);
116  ip46_address_t *lcl = va_arg (*args, ip46_address_t *);
117  ip46_address_t *rmt = va_arg (*args, ip46_address_t *);
118  u16 *lcl_port = va_arg (*args, u16 *);
119  u16 *rmt_port = va_arg (*args, u16 *);
120  u8 *is_ip4 = va_arg (*args, u8 *);
121  u8 tuple_is_set = 0;
122  u32 vrf = ~0;
123 
124  clib_memset (lcl, 0, sizeof (*lcl));
125  clib_memset (rmt, 0, sizeof (*rmt));
126 
127  if (unformat (input, "tcp"))
128  {
129  *proto = TRANSPORT_PROTO_TCP;
130  }
131  else if (unformat (input, "udp"))
132  {
133  *proto = TRANSPORT_PROTO_UDP;
134  }
135  else
136  return 0;
137 
138  if (unformat (input, "vrf %u", &vrf))
139  ;
140 
141  if (unformat (input, "%U:%d->%U:%d", unformat_ip4_address, &lcl->ip4,
142  lcl_port, unformat_ip4_address, &rmt->ip4, rmt_port))
143  {
144  *is_ip4 = 1;
145  tuple_is_set = 1;
146  }
147  else if (unformat (input, "%U:%d->%U:%d", unformat_ip6_address, &lcl->ip6,
148  lcl_port, unformat_ip6_address, &rmt->ip6, rmt_port))
149  {
150  *is_ip4 = 0;
151  tuple_is_set = 1;
152  }
153 
154  if (vrf != ~0)
155  {
156  fib_protocol_t fib_proto;
157  fib_proto = *is_ip4 ? FIB_PROTOCOL_IP4 : FIB_PROTOCOL_IP6;
158  *fib_index = fib_table_find (fib_proto, vrf);
159  }
160 
161  return tuple_is_set;
162 }
163 
164 uword
165 unformat_session (unformat_input_t * input, va_list * args)
166 {
167  session_t **result = va_arg (*args, session_t **);
168  u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
169  ip46_address_t lcl, rmt;
170  session_t *s;
171  u8 proto = ~0;
172  u8 is_ip4 = 0;
173 
174  if (!unformat (input, "%U", unformat_stream_session_id, &proto, &fib_index,
175  &lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
176  return 0;
177 
178  if (is_ip4)
179  s = session_lookup_safe4 (fib_index, &lcl.ip4, &rmt.ip4,
180  clib_host_to_net_u16 (lcl_port),
181  clib_host_to_net_u16 (rmt_port), proto);
182  else
183  s = session_lookup_safe6 (fib_index, &lcl.ip6, &rmt.ip6,
184  clib_host_to_net_u16 (lcl_port),
185  clib_host_to_net_u16 (rmt_port), proto);
186  if (s)
187  {
188  *result = s;
190  return 1;
191  }
192  return 0;
193 }
194 
195 uword
197 {
198  transport_connection_t **result = va_arg (*args, transport_connection_t **);
199  u32 suggested_proto = va_arg (*args, u32);
201  u8 proto = ~0;
202  ip46_address_t lcl, rmt;
203  u32 lcl_port = 0, rmt_port = 0, fib_index = 0;
204  u8 is_ip4 = 0;
205 
206  if (!unformat (input, "%U", unformat_stream_session_id, &fib_index, &proto,
207  &lcl, &rmt, &lcl_port, &rmt_port, &is_ip4))
208  return 0;
209 
210  proto = (proto == (u8) ~ 0) ? suggested_proto : proto;
211  if (proto == (u8) ~ 0)
212  return 0;
213  if (is_ip4)
214  tc = session_lookup_connection4 (fib_index, &lcl.ip4, &rmt.ip4,
215  clib_host_to_net_u16 (lcl_port),
216  clib_host_to_net_u16 (rmt_port), proto);
217  else
218  tc = session_lookup_connection6 (fib_index, &lcl.ip6, &rmt.ip6,
219  clib_host_to_net_u16 (lcl_port),
220  clib_host_to_net_u16 (rmt_port), proto);
221 
222  if (tc)
223  {
224  *result = tc;
225  return 1;
226  }
227  return 0;
228 }
229 
230 static clib_error_t *
232  vlib_cli_command_t * cmd)
233 {
234  u8 one_session = 0, do_listeners = 0, sst, do_elog = 0;
236  u32 transport_proto = ~0, track_index;
237  session_t *pool, *s;
239  app_worker_t *app_wrk;
240  int verbose = 0, i;
241  const u8 *app_name;
242 
243  if (!smm->is_enabled)
244  {
245  return clib_error_return (0, "session layer is not enabled");
246  }
247 
249  {
250  if (unformat (input, "verbose %d", &verbose))
251  ;
252  else if (unformat (input, "verbose"))
253  verbose = 1;
254  else if (unformat (input, "listeners %U", unformat_transport_proto,
255  &transport_proto))
256  do_listeners = 1;
257  else if (unformat (input, "%U", unformat_session, &s))
258  {
259  one_session = 1;
260  }
261  else if (unformat (input, "elog"))
262  do_elog = 1;
263  else
264  return clib_error_return (0, "unknown input `%U'",
265  format_unformat_error, input);
266  }
267 
268  if (one_session)
269  {
270  u8 *str = format (0, "%U", format_session, s, 3);
271  if (do_elog && s->session_state != SESSION_STATE_LISTENING)
272  {
273  elog_main_t *em = &vm->elog_main;
274  f64 dt;
275 
276  tc = session_get_transport (s);
277  track_index = transport_elog_track_index (tc);
278  dt = (em->init_time.cpu - vm->clib_time.init_cpu_time)
280  if (track_index != ~0)
281  str = format (str, " session elog:\n%U", format_elog_track, em,
282  dt, track_index);
283  }
284  vlib_cli_output (vm, "%v", str);
285  vec_free (str);
286  return 0;
287  }
288 
289  if (do_listeners)
290  {
291  sst = session_type_from_proto_and_ip (transport_proto, 1);
292  vlib_cli_output (vm, "%-50s%-24s", "Listener", "App");
293  /* *INDENT-OFF* */
294  pool_foreach (s, smm->wrk[0].sessions, ({
295  if (s->session_state != SESSION_STATE_LISTENING
296  || s->session_type != sst)
297  continue;
298  app_wrk = app_worker_get (s->app_wrk_index);
299  app_name = application_name_from_index (app_wrk->app_index);
300  vlib_cli_output (vm, "%U%-25v%", format_session, s, 0,
301  app_name);
302  }));
303  /* *INDENT-ON* */
304  return 0;
305  }
306 
307  for (i = 0; i < vec_len (smm->wrk); i++)
308  {
309  u32 once_per_pool = 1, n_closed = 0;
310 
311  pool = smm->wrk[i].sessions;
312  if (!pool_elts (pool))
313  {
314  vlib_cli_output (vm, "Thread %d: no sessions", i);
315  continue;
316  }
317 
318  if (!verbose)
319  {
320  vlib_cli_output (vm, "Thread %d: %d sessions", i, pool_elts (pool));
321  continue;
322  }
323 
324  if (once_per_pool && verbose == 1)
325  {
326  vlib_cli_output (vm, "%s%-50s%-15s%-10s%-10s", i ? "\n" : "",
327  "Connection", "State", "Rx-f", "Tx-f");
328  once_per_pool = 0;
329  }
330 
331  /* *INDENT-OFF* */
332  pool_foreach (s, pool, ({
334  {
335  n_closed += 1;
336  continue;
337  }
338  vlib_cli_output (vm, "%U", format_session, s, verbose);
339  }));
340  /* *INDENT-ON* */
341 
342  if (!n_closed)
343  vlib_cli_output (vm, "Thread %d: active sessions %u", i,
344  pool_elts (pool) - n_closed);
345  else
346  vlib_cli_output (vm, "Thread %d: active sessions %u closed %u", i,
347  pool_elts (pool) - n_closed, n_closed);
348  }
349 
350  return 0;
351 }
352 
353 /* *INDENT-OFF* */
354 VLIB_CLI_COMMAND (vlib_cli_show_session_command) =
355 {
356  .path = "show session",
357  .short_help = "show session [verbose [n]] [listeners <proto>] "
358  "[<session-id> [elog]]",
359  .function = show_session_command_fn,
360 };
361 /* *INDENT-ON* */
362 
363 static int
365 {
366  app_worker_t *server_wrk = app_worker_get (s->app_wrk_index);
367  app_worker_close_notify (server_wrk, s);
368  return 0;
369 }
370 
371 static clib_error_t *
373  vlib_cli_command_t * cmd)
374 {
376  u32 thread_index = 0, clear_all = 0;
377  session_worker_t *wrk;
378  u32 session_index = ~0;
379  session_t *session;
380 
381  if (!smm->is_enabled)
382  {
383  return clib_error_return (0, "session layer is not enabled");
384  }
385 
387  {
388  if (unformat (input, "thread %d", &thread_index))
389  ;
390  else if (unformat (input, "session %d", &session_index))
391  ;
392  else if (unformat (input, "all"))
393  clear_all = 1;
394  else
395  return clib_error_return (0, "unknown input `%U'",
396  format_unformat_error, input);
397  }
398 
399  if (!clear_all && session_index == ~0)
400  return clib_error_return (0, "session <nn> required, but not set.");
401 
402  if (session_index != ~0)
403  {
404  session = session_get_if_valid (session_index, thread_index);
405  if (!session)
406  return clib_error_return (0, "no session %d on thread %d",
407  session_index, thread_index);
408  clear_session (session);
409  }
410 
411  if (clear_all)
412  {
413  /* *INDENT-OFF* */
414  vec_foreach (wrk, smm->wrk)
415  {
416  pool_foreach(session, wrk->sessions, ({
417  clear_session (session);
418  }));
419  };
420  /* *INDENT-ON* */
421  }
422 
423  return 0;
424 }
425 
426 /* *INDENT-OFF* */
427 VLIB_CLI_COMMAND (clear_session_command, static) =
428 {
429  .path = "clear session",
430  .short_help = "clear session thread <thread> session <index>",
431  .function = clear_session_command_fn,
432 };
433 /* *INDENT-ON* */
434 
435 static clib_error_t *
437  unformat_input_t * input,
438  vlib_cli_command_t * cmd)
439 {
440  session_t *s = 0;
441  u8 is_rx = 0, *str = 0;
442 
444  {
445  if (unformat (input, "%U", unformat_session, &s))
446  ;
447  else if (unformat (input, "rx"))
448  is_rx = 1;
449  else if (unformat (input, "tx"))
450  is_rx = 0;
451  else
452  return clib_error_return (0, "unknown input `%U'",
453  format_unformat_error, input);
454  }
455 
456  if (!SVM_FIFO_TRACE)
457  {
458  vlib_cli_output (vm, "fifo tracing not enabled");
459  return 0;
460  }
461 
462  if (!s)
463  {
464  vlib_cli_output (vm, "could not find session");
465  return 0;
466  }
467 
468  str = is_rx ?
469  svm_fifo_dump_trace (str, s->rx_fifo) :
470  svm_fifo_dump_trace (str, s->tx_fifo);
471 
472  vlib_cli_output (vm, "%v", str);
473  return 0;
474 }
475 
476 /* *INDENT-OFF* */
477 VLIB_CLI_COMMAND (show_session_fifo_trace_command, static) =
478 {
479  .path = "show session fifo trace",
480  .short_help = "show session fifo trace <session>",
482 };
483 /* *INDENT-ON* */
484 
485 static clib_error_t *
487  vlib_cli_command_t * cmd)
488 {
489  session_t *s = 0;
490  u8 is_rx = 0, *str = 0;
491 
493  {
494  if (unformat (input, "%U", unformat_session, &s))
495  ;
496  else if (unformat (input, "rx"))
497  is_rx = 1;
498  else
499  return clib_error_return (0, "unknown input `%U'",
500  format_unformat_error, input);
501  }
502 
503  if (!SVM_FIFO_TRACE)
504  {
505  vlib_cli_output (vm, "fifo tracing not enabled");
506  return 0;
507  }
508 
509  if (!s)
510  {
511  vlib_cli_output (vm, "could not find session");
512  return 0;
513  }
514 
515  str = is_rx ?
516  svm_fifo_replay (str, s->rx_fifo, 0, 1) :
517  svm_fifo_replay (str, s->tx_fifo, 0, 1);
518 
519  vlib_cli_output (vm, "%v", str);
520  return 0;
521 }
522 
523 /* *INDENT-OFF* */
524 VLIB_CLI_COMMAND (session_replay_fifo_trace_command, static) =
525 {
526  .path = "session replay fifo",
527  .short_help = "session replay fifo <session>",
528  .function = session_replay_fifo_command_fn,
529 };
530 /* *INDENT-ON* */
531 
532 static clib_error_t *
534  vlib_cli_command_t * cmd)
535 {
536  unformat_input_t _line_input, *line_input = &_line_input;
537  u8 is_en = 1;
538  clib_error_t *error;
539 
540  if (!unformat_user (input, unformat_line_input, line_input))
541  return clib_error_return (0, "expected enable | disable");
542 
543  while (unformat_check_input (line_input) != UNFORMAT_END_OF_INPUT)
544  {
545  if (unformat (line_input, "enable"))
546  is_en = 1;
547  else if (unformat (line_input, "disable"))
548  is_en = 0;
549  else
550  {
551  error = clib_error_return (0, "unknown input `%U'",
552  format_unformat_error, line_input);
553  unformat_free (line_input);
554  return error;
555  }
556  }
557 
558  unformat_free (line_input);
559  return vnet_session_enable_disable (vm, is_en);
560 }
561 
562 /* *INDENT-OFF* */
563 VLIB_CLI_COMMAND (session_enable_disable_command, static) =
564 {
565  .path = "session",
566  .short_help = "session [enable|disable]",
567  .function = session_enable_disable_fn,
568 };
569 /* *INDENT-ON* */
570 
571 /*
572  * fd.io coding-style-patch-verification: ON
573  *
574  * Local Variables:
575  * eval: (c-set-style "gnu")
576  * End:
577  */
u32 connection_index
Index of the transport connection associated to the session.
u8 * format_transport_connection(u8 *s, va_list *args)
Definition: transport.c:123
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
format_function_t format_svm_fifo
Definition: svm_fifo.h:480
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.
transport_connection_t * session_get_transport(session_t *s)
Definition: session.c:1398
svm_fifo_t * rx_fifo
Pointers to rx/tx buffers.
session_worker_t * wrk
Worker contexts.
Definition: session.h:130
static session_t * session_get_if_valid(u64 si, u32 thread_index)
Definition: session.h:265
static transport_proto_t session_get_transport_proto(session_t *s)
int i
static int clear_session(session_t *s)
Definition: session_cli.c:364
uword unformat_user(unformat_input_t *input, unformat_function_t *func,...)
Definition: unformat.c:989
clib_memset(h->entries, 0, sizeof(h->entries[0])*entries)
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:372
static void session_pool_remove_peeker(u32 thread_index)
Definition: session.h:316
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:76
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)
Fifo max bytes to dequeue.
Definition: svm_fifo.h:518
#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:231
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:1075
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:283
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:151
uword unformat_transport_connection(unformat_input_t *input, va_list *args)
Definition: session_cli.c:196
f64 seconds_per_clock
Definition: time.h:57
uword unformat_session(unformat_input_t *input, va_list *args)
Definition: session_cli.c:165
u8 * svm_fifo_replay(u8 *s, svm_fifo_t *f, u8 no_read, u8 verbose)
Definition: svm_fifo.c:1192
clib_error_t * vnet_session_enable_disable(vlib_main_t *vm, u8 is_en)
Definition: session.c:1543
uword unformat_stream_session_id(unformat_input_t *input, va_list *args)
Definition: session_cli.c:112
unformat_function_t unformat_ip6_address
Definition: format.h:91
#define UNFORMAT_END_OF_INPUT
Definition: format.h:145
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:160
#define VLIB_CLI_COMMAND(x,...)
Definition: cli.h:155
#define SVM_FIFO_TRACE
Definition: svm_fifo.h:37
uword unformat_transport_proto(unformat_input_t *input, va_list *args)
Definition: transport.c:179
u64 cpu
CPU cycle counter.
Definition: elog.h:126
u8 * format_transport_half_open_connection(u8 *s, va_list *args)
Definition: transport.c:164
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:1168
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:163
connectionless service
u8 * format_transport_listen_connection(u8 *s, va_list *args)
Definition: transport.c:150
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:486
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:436
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:533
int app_worker_close_notify(app_worker_t *app_wrk, session_t *s)
static transport_service_type_t session_transport_service_type(session_t *s)
void vlib_cli_output(vlib_main_t *vm, char *fmt,...)
Definition: cli.c:768
uword unformat(unformat_input_t *i, const char *fmt,...)
Definition: unformat.c:978
vl_api_fib_path_nh_proto_t proto
Definition: fib_types.api:125
static uword unformat_check_input(unformat_input_t *i)
Definition: format.h:171
static uword pool_elts(void *v)
Number of active elements in a pool.
Definition: pool.h:128