FD.io VPP  v21.06
Vector Packet Processing
vpp_echo_common.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 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  */
15 
16 #ifndef __included_vpp_echo_common_h__
17 #define __included_vpp_echo_common_h__
18 
20 #include <vpp/api/vpe_msg_enum.h>
21 
22 #define vl_typedefs /* define message structures */
23 #include <vpp/api/vpe_all_api_h.h>
24 #undef vl_typedefs
25 
26 /* declare message handlers for each api */
27 
28 #define vl_endianfun /* define message structures */
29 #include <vpp/api/vpe_all_api_h.h>
30 #undef vl_endianfun
31 
32 /* instantiate all the print functions we know about */
33 #define vl_print(handle, ...)
34 #define vl_printfun
35 #include <vpp/api/vpe_all_api_h.h>
36 #undef vl_printfun
37 
38 #define TIMEOUT 10.0
39 #define LOGGING_BATCH (100)
40 #define LOG_EVERY_N_IDLE_CYCLES (1e8)
41 #define ECHO_MQ_SEG_HANDLE ((u64) ~0 - 1)
42 
43 #define foreach_echo_fail_code \
44  _(ECHO_FAIL_NONE, "ECHO_FAIL_NONE") \
45  _(ECHO_FAIL_USAGE, "ECHO_FAIL_USAGE") \
46  _(ECHO_FAIL_SEND_IO_EVT, "ECHO_FAIL_SEND_IO_EVT") \
47  _(ECHO_FAIL_SOCKET_CONNECT, "ECHO_FAIL_SOCKET_CONNECT") \
48  _(ECHO_FAIL_INIT_SHM_API, "ECHO_FAIL_INIT_SHM_API") \
49  _(ECHO_FAIL_SHMEM_CONNECT, "ECHO_FAIL_SHMEM_CONNECT") \
50  _(ECHO_FAIL_TEST_BYTES_ERR, "ECHO_FAIL_TEST_BYTES_ERR") \
51  _(ECHO_FAIL_BIND, "ECHO_FAIL_BIND") \
52  _(ECHO_FAIL_SESSION_ACCEPTED_BAD_LISTENER, \
53  "ECHO_FAIL_SESSION_ACCEPTED_BAD_LISTENER") \
54  _(ECHO_FAIL_ACCEPTED_WAIT_FOR_SEG_ALLOC, \
55  "ECHO_FAIL_ACCEPTED_WAIT_FOR_SEG_ALLOC") \
56  _(ECHO_FAIL_SESSION_CONNECT, "ECHO_FAIL_SESSION_CONNECT") \
57  _(ECHO_FAIL_CONNECTED_WAIT_FOR_SEG_ALLOC, \
58  "ECHO_FAIL_CONNECTED_WAIT_FOR_SEG_ALLOC") \
59  _(ECHO_FAIL_APP_ATTACH, "ECHO_FAIL_APP_ATTACH") \
60  _(ECHO_FAIL_SERVER_DISCONNECT_TIMEOUT, \
61  "ECHO_FAIL_SERVER_DISCONNECT_TIMEOUT") \
62  _(ECHO_FAIL_INVALID_URI, "ECHO_FAIL_INVALID_URI") \
63  _(ECHO_FAIL_PROTOCOL_NOT_SUPPORTED, \
64  "ECHO_FAIL_PROTOCOL_NOT_SUPPORTED") \
65  _(ECHO_FAIL_CONNECT_TO_VPP, "ECHO_FAIL_CONNECT_TO_VPP") \
66  _(ECHO_FAIL_ATTACH_TO_VPP, "ECHO_FAIL_ATTACH_TO_VPP") \
67  _(ECHO_FAIL_1ST_PTHREAD_CREATE, "ECHO_FAIL_1ST_PTHREAD_CREATE") \
68  _(ECHO_FAIL_PTHREAD_CREATE, "ECHO_FAIL_PTHREAD_CREATE") \
69  _(ECHO_FAIL_DETACH, "ECHO_FAIL_DETACH") \
70  _(ECHO_FAIL_DEL_CERT_KEY, "ECHO_FAIL_DEL_CERT_KEY") \
71  _(ECHO_FAIL_MQ_PTHREAD, "ECHO_FAIL_MQ_PTHREAD") \
72  _(ECHO_FAIL_VL_API_APP_ATTACH, "ECHO_FAIL_VL_API_APP_ATTACH") \
73  _(ECHO_FAIL_VL_API_MISSING_SEGMENT_NAME, \
74  "ECHO_FAIL_VL_API_MISSING_SEGMENT_NAME") \
75  _(ECHO_FAIL_VL_API_NULL_APP_MQ, "ECHO_FAIL_VL_API_NULL_APP_MQ") \
76  _(ECHO_FAIL_VL_API_RECV_FD_MSG, "ECHO_FAIL_VL_API_RECV_FD_MSG") \
77  _(ECHO_FAIL_VL_API_SVM_FIFO_SEG_ATTACH, \
78  "ECHO_FAIL_VL_API_SVM_FIFO_SEG_ATTACH") \
79  _(ECHO_FAIL_VL_API_FIFO_SEG_ATTACH, \
80  "ECHO_FAIL_VL_API_FIFO_SEG_ATTACH") \
81  _(ECHO_FAIL_VL_API_DETACH_REPLY, "ECHO_FAIL_VL_API_DETACH_REPLY") \
82  _(ECHO_FAIL_VL_API_BIND_URI_REPLY, "ECHO_FAIL_VL_API_BIND_URI_REPLY") \
83  _(ECHO_FAIL_VL_API_UNBIND_REPLY, "ECHO_FAIL_VL_API_UNBIND_REPLY") \
84  _(ECHO_FAIL_SESSION_DISCONNECT, "ECHO_FAIL_SESSION_DISCONNECT") \
85  _(ECHO_FAIL_SESSION_RESET, "ECHO_FAIL_SESSION_RESET") \
86  _(ECHO_FAIL_VL_API_CERT_KEY_ADD_REPLY, \
87  "ECHO_FAIL_VL_API_CERT_KEY_ADD_REPLY") \
88  _(ECHO_FAIL_VL_API_CERT_KEY_DEL_REPLY, \
89  "ECHO_FAIL_VL_API_CERT_KEY_DEL_REPLY") \
90  _(ECHO_FAIL_GET_SESSION_FROM_HANDLE, \
91  "ECHO_FAIL_GET_SESSION_FROM_HANDLE") \
92  _(ECHO_FAIL_QUIC_WRONG_CONNECT, "ECHO_FAIL_QUIC_WRONG_CONNECT") \
93  _(ECHO_FAIL_QUIC_WRONG_ACCEPT, "ECHO_FAIL_QUIC_WRONG_ACCEPT") \
94  _(ECHO_FAIL_TCP_BAPI_CONNECT, "ECHO_FAIL_TCP_BAPI_CONNECT") \
95  _(ECHO_FAIL_UDP_BAPI_CONNECT, "ECHO_FAIL_UDP_BAPI_CONNECT") \
96  _(ECHO_FAIL_MISSING_START_EVENT, "ECHO_FAIL_MISSING_START_EVENT") \
97  _(ECHO_FAIL_MISSING_END_EVENT, "ECHO_FAIL_MISSING_END_EVENT") \
98  _(ECHO_FAIL_TEST_ASSERT_RX_TOTAL, "ECHO_FAIL_TEST_ASSERT_RX_TOTAL") \
99  _(ECHO_FAIL_UNIDIRECTIONAL, "ECHO_FAIL_UNIDIRECTIONAL") \
100  _(ECHO_FAIL_TEST_ASSERT_TX_TOTAL, "ECHO_FAIL_TEST_ASSERT_TX_TOTAL") \
101  _(ECHO_FAIL_TEST_ASSERT_ALL_SESSIONS_CLOSED, \
102  "ECHO_FAIL_TEST_ASSERT_ALL_SESSIONS_CLOSED") \
103  _(ECHO_FAIL_RPC_SIZE, "ECHO_FAIL_RPC_SIZE")
104 
105 typedef enum
106 {
107 #define _(sym, str) sym,
109 #undef _
110 } echo_fail_t;
111 
112 extern char *echo_fail_code_str[];
113 
114 #define CHECK_SAME(fail, expected, result, _fmt, _args...) \
115 do { \
116  if ((expected) != (result)) \
117  ECHO_FAIL ((fail), "expected same (%lld, got %lld) : "_fmt, \
118  (u64)(expected), (u64)(result), ##_args); \
119 } while (0)
120 
121 #define CHECK_DIFF(fail, expected, result, _fmt, _args...) \
122 do { \
123  if ((expected) == (result)) \
124  ECHO_FAIL ((fail), "expected different (both %lld) : "_fmt, \
125  (u64)(expected), ##_args); \
126 } while (0)
127 
128 #define ECHO_FAIL(fail, _fmt, _args...) \
129 do { \
130  echo_main_t *em = &echo_main; \
131  em->has_failed = (fail); \
132  if (vec_len(em->fail_descr)) \
133  em->fail_descr = format(em->fail_descr, " | %s (%u): "_fmt, \
134  echo_fail_code_str[fail], fail, ##_args); \
135  else \
136  em->fail_descr = format(0, "%s (%u): "_fmt, \
137  echo_fail_code_str[fail], fail, ##_args); \
138  em->time_to_stop = 1; \
139  if (em->log_lvl > 0) \
140  clib_warning ("%v", em->fail_descr); \
141 } while (0)
142 
143 #define ECHO_LOG(lvl, _fmt,_args...) \
144  { \
145  echo_main_t *em = &echo_main; \
146  if (em->log_lvl > lvl) \
147  clib_warning (_fmt, ##_args); \
148  }
149 
150 #define ECHO_REGISTER_PROTO(proto, vft) \
151  static void __clib_constructor \
152  vpp_echo_init_##proto () \
153  { \
154  echo_main_t *em = &echo_main; \
155  vec_validate (em->available_proto_cb_vft, proto); \
156  em->available_proto_cb_vft[proto] = &vft; \
157  }
158 
159 typedef struct
160 {
161  CLIB_CACHE_LINE_ALIGN_MARK (cacheline0);
162 #define _(type, name) type name;
164 #undef _
168  volatile u64 bytes_received;
171  u32 listener_index; /* listener index in echo session pool */
172  u32 idle_cycles; /* consecutive enq/deq with no data */
173  volatile u64 accepted_session_count; /* sessions we accepted (as a listener) */
175 
176 typedef enum
177 {
182 } data_source_t;
183 
185 {
187  ECHO_CLOSE_F_PASSIVE, /* wait for close msg */
188  ECHO_CLOSE_F_ACTIVE, /* send close msg */
189  ECHO_CLOSE_F_NONE, /* don't bother sending close msg */
190 };
191 
193 {
197 };
198 
200 {
203  ECHO_SESSION_STATE_AWAIT_CLOSING, /* Data transfer is done, wait for close evt */
204  ECHO_SESSION_STATE_AWAIT_DATA, /* Peer closed, wait for outstanding data */
205  ECHO_SESSION_STATE_CLOSING, /* told vpp to close */
206  ECHO_SESSION_STATE_CLOSED, /* closed in vpp */
207 };
208 
209 typedef enum
210 {
221 
222 typedef enum echo_test_evt_
223 {
224  ECHO_EVT_START = 1, /* app starts */
225  ECHO_EVT_FIRST_QCONNECT = (1 << 1), /* First connect Quic session sent */
226  ECHO_EVT_LAST_QCONNECTED = (1 << 2), /* All Quic session are connected */
227  ECHO_EVT_FIRST_SCONNECT = (1 << 3), /* First connect Stream session sent */
228  ECHO_EVT_LAST_SCONNECTED = (1 << 4), /* All Stream session are connected */
229  ECHO_EVT_LAST_BYTE = (1 << 5), /* Last byte received */
230  ECHO_EVT_EXIT = (1 << 6), /* app exits */
232 
234 {
237 
238 typedef struct echo_proto_cb_vft_
239 {
240  void (*connected_cb) (session_connected_bundled_msg_t * mp, u32 session_index, u8 is_failed); /* Session is connected */
241  void (*accepted_cb) (session_accepted_msg_t * mp, echo_session_t * session); /* Session got accepted */
242  void (*bound_uri_cb) (session_bound_msg_t * mp, echo_session_t * session); /* Session got bound */
243  void (*reset_cb) (session_reset_msg_t * mp, echo_session_t * s); /* Received RESET on session */
244  void (*disconnected_cb) (session_disconnected_msg_t * mp, echo_session_t * s); /* Received DISCONNECT on session */
245  void (*sent_disconnect_cb) (echo_session_t * s); /* ACK disconnect we sent to vpp */
246  void (*cleanup_cb) (echo_session_t * s, u8 parent_died); /* Session should be cleaned up (parent listener may be dead) */
247  /* Add CLI options */
248  int (*process_opts_cb) (unformat_input_t * a);
249  void (*set_defaults_before_opts_cb) (void);
250  void (*set_defaults_after_opts_cb) (void);
251  void (*print_usage_cb) (void);
253 
254 typedef enum
255 {
260 
261 typedef struct teardown_stat_
262 {
263  u32 q; /* quic sessions */
264  u32 s; /* stream sessions */
266 
267 typedef struct echo_stats_
268 {
273  teardown_stat_t reset_count; /* received reset from vpp */
274  teardown_stat_t close_count; /* received close from vpp */
275  teardown_stat_t active_count; /* sent close to vpp */
276  teardown_stat_t clean_count; /* cleaned up stale session */
277  teardown_stat_t connected_count; /* connected sessions count */
278  teardown_stat_t accepted_count; /* connected sessions count */
279 } echo_stats_t;
280 
281 typedef struct
282 {
283  svm_queue_t *vl_input_queue; /* vpe input queue */
284  u32 my_client_index; /* API client handle */
285  u8 *uri; /* The URI we're playing with */
286  u32 n_uris; /* Cycle through adjacent ips */
287  ip46_address_t lcl_ip; /* Local ip for client */
289  echo_session_t *sessions; /* Session pool */
290  svm_msg_q_t *app_mq; /* Our receiveing event queue */
291  svm_msg_q_t *ctrl_mq; /* Our control queue (towards vpp) */
292  clib_time_t clib_time; /* For deadman timers */
295  u32 *listen_session_indexes; /* vec of vpp listener sessions */
297 
298  uword *session_index_by_vpp_handles; /* Hash table : quic_echo s_id -> vpp s_handle */
299  clib_spinlock_t sid_vpp_handles_lock; /* Hash table lock */
300 
301  uword *shared_segment_handles; /* Hash table : segment_names -> 1 */
302  clib_spinlock_t segment_handles_lock; /* Hash table lock */
304  svm_msg_q_t rpc_msq_queue; /* MQ between quic_echo threads */
306 
307  /* State of the connection, shared between msg RX thread and main thread */
308  volatile connection_state_t state;
309  volatile u8 time_to_stop; /* Signal variables */
310  u8 rx_results_diff; /* Rx results will be different than cfg */
311  u8 tx_results_diff; /* Tx results will be different than cfg */
312  u8 has_failed; /* stores the exit code */
313  u8 *fail_descr; /* vector containing fail description */
314 
315  /** Flag that decides if socket, instead of svm, api is used to connect to
316  * vpp. If sock api is used, shm binary api is subsequently bootstrapped
317  * and all other messages are exchanged using shm IPC. */
319 
322  u64 bytes_to_send; /* target per stream */
323  u64 bytes_to_receive; /* target per stream */
328  data_source_t data_source; /* Use no/placeholder/mirrored data */
329  u8 send_stream_disconnects; /* actively send disconnect */
330  u8 output_json; /* Output stats as JSON */
331  volatile u8 wait_for_gdb; /* Wait for gdb to attach */
332  u8 log_lvl; /* Verbosity of the logging */
333  int max_test_msg; /* Limit the number of incorrect data messages */
334  u32 evt_q_size; /* Size of the vpp MQ (app<->vpp events) */
335  u32 ckpair_index; /* Cert key pair used */
336  u8 crypto_engine; /* crypto engine used */
337  u8 connect_flag; /* flags to pass to mq connect */
338  u32 periodic_stats_delta; /* seconds between periodic stats */
339 
343 
344  pthread_t *data_thread_handles; /* vec of data thread handles */
345  pthread_t mq_thread_handle; /* Message queue thread handle */
347 
348  u32 n_connects; /* Target number of connects to send */
349  u32 n_sessions; /* Number of sessions to prealloc */
350  u32 n_clients; /* Target number of clients doing RX/TX */
351  u32 n_rx_threads; /* Number of data threads */
352 
353  volatile u32 n_clients_connected; /* Number of STREAM sessions connected */
354  volatile u32 nxt_available_sidx; /* next unused prealloced session_index */
355 
356  volatile int max_sim_connects;
357 
358  /* VNET_API_ERROR_FOO -> "Foo" hash table */
361 
363  echo_stats_t last_stat_sampling; /* copy of stats at last sampling */
365 
366  struct /* Event based timing : start & end depend on CLI specified events */
367  {
373  } timing;
374 
375  struct
376  {
378  ip46_address_t ip;
381  } uri_elts;
382 } echo_main_t;
383 
384 extern echo_main_t echo_main;
385 
386 
387 typedef struct echo_connect_args_
388 {
391  ip46_address_t ip;
392  ip46_address_t lcl_ip;
394 
395 typedef struct echo_disconnect_args_
396 {
399 
400 typedef union
401 {
405 
406 typedef void (*echo_rpc_t) (echo_main_t * em, echo_rpc_args_t * arg);
407 
408 typedef struct
409 {
410  void *fp;
413 
414 
415 u8 *format_ip4_address (u8 * s, va_list * args);
416 u8 *format_ip6_address (u8 * s, va_list * args);
417 u8 *format_ip46_address (u8 * s, va_list * args);
418 u8 *format_api_error (u8 * s, va_list * args);
420 u8 *echo_format_session (u8 * s, va_list * args);
421 u8 *echo_format_session_type (u8 * s, va_list * args);
422 u8 *echo_format_session_state (u8 * s, va_list * args);
423 u8 *echo_format_app_state (u8 * s, va_list * args);
424 uword echo_unformat_close (unformat_input_t * input, va_list * args);
425 uword echo_unformat_timing_event (unformat_input_t * input, va_list * args);
426 u8 *echo_format_timing_event (u8 * s, va_list * args);
427 uword unformat_transport_proto (unformat_input_t * input, va_list * args);
428 u8 *format_transport_proto (u8 * s, va_list * args);
429 uword unformat_ip4_address (unformat_input_t * input, va_list * args);
430 uword unformat_ip6_address (unformat_input_t * input, va_list * args);
431 
432 void echo_session_handle_add_del (echo_main_t * em, u64 handle, u32 sid);
434 int echo_send_rpc (echo_main_t * em, void *fp, echo_rpc_args_t * args);
436 int wait_for_state_change (echo_main_t * em, connection_state_t state,
437  f64 timeout);
440 u8 *echo_format_crypto_engine (u8 * s, va_list * args);
441 uword echo_unformat_crypto_engine (unformat_input_t * input, va_list * args);
442 u8 *echo_format_bytes_per_sec (u8 * s, va_list * args);
443 int echo_segment_attach (u64 segment_handle, char *name,
444  ssvm_segment_type_t type, int fd);
445 u32 echo_segment_lookup (u64 segment_handle);
446 void echo_segment_detach (u64 segment_handle);
447 int echo_attach_session (uword segment_handle, uword rxf_offset,
448  uword mq_offset, uword txf_offset, echo_session_t *s);
449 int echo_segment_attach_mq (uword segment_handle, uword mq_offset,
450  u32 mq_index, svm_msg_q_t **mq);
452  u32 slice_index, u32 size,
453  uword *offset);
454 
455 /* Binary API */
456 
457 void echo_send_attach (echo_main_t * em);
458 void echo_send_detach (echo_main_t * em);
459 void echo_send_listen (echo_main_t * em, ip46_address_t * ip);
461 void echo_send_connect (echo_main_t * em, void *args);
462 void echo_send_disconnect_session (echo_main_t * em, void *args);
463 void echo_api_hookup (echo_main_t * em);
466 
467 #endif /* __included_vpp_echo_common_h__ */
468 
469 /*
470  * fd.io coding-style-patch-verification: ON
471  *
472  * Local Variables:
473  * eval: (c-set-style "gnu")
474  * End:
475  */
volatile u32 listen_session_cnt
echo_proto_cb_vft_t ** available_proto_cb_vft
svm_msg_q_t * ctrl_mq
#define foreach_app_session_field
flag for dgram mode
volatile u64 accepted_session_count
echo_disconnect_args_t disconnect
clib_time_t clib_time
int echo_segment_attach_mq(uword segment_handle, uword mq_offset, u32 mq_index, svm_msg_q_t **mq)
echo_stats_t last_stat_sampling
#define CLIB_CACHE_LINE_ALIGN_MARK(mark)
Definition: cache.h:60
teardown_stat_t clean_count
u8 * format_ip46_address(u8 *s, va_list *args)
Definition: ip6_format.c:395
a
Definition: bitmap.h:544
echo_session_t * sessions
clib_spinlock_t sid_vpp_handles_lock
u8 use_sock_api
Flag that decides if socket, instead of svm, api is used to connect to vpp.
svm_queue_t * vl_input_queue
unsigned long u64
Definition: types.h:89
ip46_address_t ip
uword unformat_ip6_address(unformat_input_t *input, va_list *args)
Definition: ip6_format.c:138
echo_fail_t
ip46_address_t lcl_ip
u8 * echo_format_bytes_per_sec(u8 *s, va_list *args)
echo_session_t * echo_session_new(echo_main_t *em)
quic_session_type_t
svm_fifo_chunk_t * echo_segment_alloc_chunk(uword segment_handle, u32 slice_index, u32 size, uword *offset)
void echo_send_disconnect_session(echo_main_t *em, void *args)
ip46_address_t lcl_ip
u8 * echo_format_timing_event(u8 *s, va_list *args)
int wait_for_state_change(echo_main_t *em, connection_state_t state, f64 timeout)
void echo_send_attach(echo_main_t *em)
Definition: vpp_echo_bapi.c:28
volatile connection_state_t state
string name[64]
Definition: fib.api:25
void echo_send_connect(echo_main_t *em, void *args)
void echo_send_detach(echo_main_t *em)
Definition: vpp_echo_bapi.c:55
volatile int max_sim_connects
echo_session_t * echo_get_session_from_handle(echo_main_t *em, u64 handle)
unsigned char u8
Definition: types.h:56
foreach_app_session_field u64 vpp_session_handle
uword echo_unformat_crypto_engine(unformat_input_t *input, va_list *args)
struct echo_disconnect_args_ echo_disconnect_args_t
double f64
Definition: types.h:142
unsigned int u32
Definition: types.h:88
u8 * connect_test_data
echo_main_t echo_main
Definition: vpp_echo.c:24
enum ssvm_segment_type_ ssvm_segment_type_t
volatile u32 n_clients_connected
void echo_segment_detach(u64 segment_handle)
connection_state_t
volatile u64 bytes_received
void echo_api_hookup(echo_main_t *em)
#define foreach_echo_fail_code
u8 * format_api_error(u8 *s, va_list *args)
clib_spinlock_t segment_handles_lock
struct teardown_stat_ teardown_stat_t
void init_error_string_table()
int echo_segment_attach(u64 segment_handle, char *name, ssvm_segment_type_t type, int fd)
void(* echo_rpc_t)(echo_main_t *em, echo_rpc_args_t *arg)
data_source_t
vl_api_fib_path_type_t type
Definition: fib_types.api:123
u8 * echo_format_session_state(u8 *s, va_list *args)
void echo_send_add_cert_key(echo_main_t *em)
Definition: vpp_echo_bapi.c:69
struct _unformat_input_t unformat_input_t
echo_connect_args_t connect
teardown_stat_t accepted_count
u32 size
Definition: vhost_user.h:125
pthread_t mq_thread_handle
uword echo_unformat_timing_event(unformat_input_t *input, va_list *args)
uword unformat_ip4_address(unformat_input_t *input, va_list *args)
Definition: ip4_format.c:76
uword echo_unformat_close(unformat_input_t *input, va_list *args)
u8 * format_transport_proto(u8 *s, va_list *args)
Definition: transport.c:52
uword * error_string_by_error_number
uword unformat_transport_proto(unformat_input_t *input, va_list *args)
Definition: transport.c:155
fifo_segment_main_t segment_main
svm_msg_q_t * app_mq
data_source_t data_source
u32 periodic_stats_delta
u8 * format_ip4_address(u8 *s, va_list *args)
enum echo_test_evt_ echo_test_evt_t
void echo_send_del_cert_key(echo_main_t *em)
Definition: vpp_echo_bapi.c:90
u8 * format_ip6_address(u8 *s, va_list *args)
Definition: ip6_format.c:44
void echo_send_listen(echo_main_t *em, ip46_address_t *ip)
uword * shared_segment_handles
struct echo_stats_ echo_stats_t
u8 * echo_format_session_type(u8 *s, va_list *args)
u32 *volatile data_thread_args
volatile u8 time_to_stop
void echo_session_handle_add_del(echo_main_t *em, u64 handle, u32 sid)
union session_connected_bundled_msg_ session_connected_bundled_msg_t
void echo_notify_event(echo_main_t *em, echo_test_evt_t e)
volatile u32 nxt_available_sidx
echo_close_f_t
char * echo_fail_code_str[]
int echo_send_rpc(echo_main_t *em, void *fp, echo_rpc_args_t *args)
struct echo_proto_cb_vft_ echo_proto_cb_vft_t
teardown_stat_t close_count
u8 * echo_format_session(u8 *s, va_list *args)
template key/value backing page structure
Definition: bihash_doc.h:44
vl_api_address_t ip
Definition: l2.api:558
volatile u64 bytes_to_receive
void echo_session_print_stats(echo_main_t *em, echo_session_t *session)
void echo_send_unbind(echo_main_t *em, echo_session_t *s)
ip46_address_t ip
u8 * echo_format_crypto_engine(u8 *s, va_list *args)
u64 uword
Definition: types.h:112
struct echo_connect_args_ echo_connect_args_t
teardown_stat_t active_count
echo_stats_t stats
int echo_attach_session(uword segment_handle, uword rxf_offset, uword mq_offset, uword txf_offset, echo_session_t *s)
u32 * listen_session_indexes
uword * session_index_by_vpp_handles
svm_msg_q_t rpc_msq_queue
echo_test_evt_
struct _svm_queue svm_queue_t
u32 echo_segment_lookup(u64 segment_handle)
volatile u8 wait_for_gdb
vl_api_dhcp_client_state_t state
Definition: dhcp.api:201
echo_proto_cb_vft_t * proto_cb_vft
teardown_stat_t connected_count
pthread_t * data_thread_handles
test_return_packets_t
f64 last_stat_sampling_ts
session_connected_msg_t * mp
teardown_stat_t reset_count
u8 send_stream_disconnects
u8 * echo_format_app_state(u8 *s, va_list *args)
echo_rpc_args_t args
quic_session_state_t