|
FD.io VPP
v21.06-3-gbb25fbf28
Vector Packet Processing
|
Go to the documentation of this file.
22 #include <sys/types.h>
23 #include <sys/socket.h>
26 #include <netinet/in.h>
50 #define M_NOALLOC(T,t) \
53 clib_memset (mp, 0, sizeof (*mp)); \
54 mp->_vl_msg_id = ntohs (VL_API_##T); \
55 mp->client_index = am->my_client_index; \
73 printf(
"Connect failed: %d\n",
rv);
91 printf(
"Connect failed: %d\n",
rv);
102 long int no_msgs = 10000;
105 for (
i = 0;
i < no_msgs;
i++) {
126 printf(
"\nTook %.2f msec, %.0f msgs/msec \n", (timestamp_end - timestamp_start),
127 no_msgs/(timestamp_end - timestamp_start));
128 printf(
"Exiting...\n");
152 switch (res[
i].
type) {
154 if (res[
i].name_vector == 0)
156 for (k = 0; k <
vec_len (res[
i].name_vector); k++)
157 if (res[
i].name_vector[k])
158 fformat (stdout,
"[%d]: %s %s\n", k, res[
i].name_vector[k],
162 for (j = 0; j <
vec_len (res[
i].error_vector); j++)
163 fformat (stdout,
"%llu %s\n", res[
i].error_vector[j],
179 printf(
"%s", leak_report);
184 int main (
int argc,
char ** argv)
191 for (
i = 0;
i < 1000;
i++) {
volatile u16 result_msg_id
@ STAT_DIR_TYPE_NAME_VECTOR
u8 * format_clib_mem_heap(u8 *s, va_list *va)
volatile u32 result_ready
#define STAT_SEGMENT_SOCKET_FILE
void wrap_vac_callback(unsigned char *data, int len)
uword clib_mem_trace_enable_disable(uword enable)
uint32_t * stat_segment_ls(uint8_t **patterns)
void stat_segment_disconnect(void)
static void test_connect()
#define vec_len(v)
Number of elements in vector (rvalue-only, NULL tolerant)
void stat_segment_data_free(stat_segment_data_t *res)
#define vec_add1(V, E)
Add 1 element to end of vector (unspecified alignment).
int stat_segment_connect(const char *socket_name)
volatile int sigterm_received
static u64 unix_time_now_nsec(void)
static api_main_t * vlibapi_get_main(void)
sll srl srl sll sra u16x4 i
static void test_stats(void)
API main structure, used by both vpp and binary API clients.
#define vec_free(V)
Free vector's memory (no header).
Control ping from client to api server request.
description fragment has unexpected format
static void test_messages(void)
void * clib_mem_init(void *base, uword size)
int vac_write(char *p, int l)
stat_segment_data_t * stat_segment_dump(uint32_t *stats)
@ STAT_DIR_TYPE_ERROR_INDEX
void clib_mem_trace(int enable)
vl_api_fib_path_type_t type
int vac_connect(char *name, char *chroot_prefix, vac_callback_t cb, int rx_qlen)