Searched refs:tm (Results 1 - 25 of 92) sorted by relevance

1234

/vpp/extras/deprecated/vppinfra/
H A Dtest_qhash.c54 test_qhash_main_t _tm, *tm = &_tm; local
57 clib_memset (tm, 0, sizeof (tm[0]));
58 tm->n_iter = 10;
59 tm->seed = 1;
60 tm->n_keys = 10;
61 tm->max_vector = 1;
65 if (unformat (input, "iter %d", &tm->n_iter))
67 else if (unformat (input, "seed %d", &tm->seed))
69 else if (unformat (input, "keys %d", &tm
[all...]
H A Dtest_flowhash_template.c49 test_flowhash (test_main_t * tm) argument
56 tm->hash = flowhash_alloc_8_8 (tm->fixed_entries, tm->collision_buckets);
57 if (tm->hash == NULL)
61 flowhash_memory_size (tm->hash));
64 tm->nitems, tm->non_random_keys ? "non-random" : "random");
66 for (i = 0; i < tm->nitems; i++)
69 if (tm
183 test_flowhash_main(test_main_t * tm) argument
220 test_main_t *tm = &test_main; local
[all...]
H A Dtest_vhash.c89 test_vhash_main_t *tm = _tm; local
90 ASSERT (n_key_u32s == tm->n_key_u32);
92 vi = vec_elt (tm->vhash_key_indices, vi);
93 return vec_elt (tm->keys, vi * n_key_u32s + wi);
99 test_vhash_main_t *tm = _tm; local
103 ASSERT (n_key_u32s == tm->n_key_u32);
106 p = vec_elt_at_index (tm->vhash_key_indices, vi + 0);
107 x.as_u32[0] = tm->keys[p[0] * n_key_u32s + wi];
108 x.as_u32[1] = tm->keys[p[1] * n_key_u32s + wi];
109 x.as_u32[2] = tm
118 test_vhash_main_t *tm = _tm; local
128 test_vhash_main_t *tm = _tm; local
138 test_vhash_main_t *tm = _tm; local
148 test_vhash_main_t *tm = _tm; local
303 test_vhash_op(test_vhash_main_t * tm, u32 * key_indices, u32 * results, uword n_keys, test_vhash_op_t op) argument
470 test_vhash_main_t _tm, *tm = &_tm; local
[all...]
H A Dtest_slist.c44 run_test (test_main_t * tm) argument
57 for (i = 0; i < tm->iter; i++)
59 pool_get (tm->random_pool, tv);
60 *tv = random_u32 (&tm->seed);
61 clib_slist_add (&tm->slist, tv, tv - tm->random_pool);
64 for (i = 0; i < tm->iter; i++)
67 tv = pool_elt_at_index (tm->random_pool, i);
69 search_result = clib_slist_search (&tm->slist, tv, &ncompares);
78 fformat (stdout, "%U\n", format_slist, &tm
156 initialize_slist(test_main_t * tm) argument
165 test_main_t *tm = &test_main; local
[all...]
H A Dtest_timing_wheel.c66 set_event (test_timing_wheel_main_t * tm, uword i) argument
68 timing_wheel_t *w = &tm->timing_wheel;
72 if (tm->synthetic_time)
73 cpu_time += random_u32 (&tm->seed) % tm->n_iter;
76 random_f64 (&tm->seed) * tm->max_time * tm->time.clocks_per_second;
80 tm->events[i] = cpu_time;
96 test_timing_wheel_main_t _tm, *tm local
[all...]
H A Dtest_cuckoo_bihash.c44 void *tm; member in struct:__anon35
90 test_main_t *tm = v; \
94 u64 deadline = tm->deadline; \
97 for (counter = 0; counter < vec_len (tm->key_add_del_sequence); \
100 u64 idx = tm->key_add_del_sequence[counter]; \
101 u8 op = tm->key_op_sequence[counter]; \
118 tm->nadds = nadds; \
119 tm->ndels = ndels; \
126 kv.key = tm->keys[idx];
127 kv.value = *hash_get (tm
286 test_cuckoo_bihash(test_main_t * tm) argument
374 test_cuckoo_bihash_main(test_main_t * tm) argument
415 test_main_t *tm = &test_main; local
[all...]
H A Dtest_cuckoo_template.c61 do_search (test_main_t * tm, CVT (clib_cuckoo) * h) argument
65 for (j = 0; j < tm->search_iter; j++)
67 for (i = 0; i < tm->nitems; i++)
69 kv.key = tm->keys[i];
73 i, tm->keys[i]);
77 tm->keys[i], kv.value, (u64) (i + 1));
98 test_cuckoo (test_main_t * tm) argument
107 h = &tm->hash;
109 CV (clib_cuckoo_init) (h, "test", tm->nbuckets, cb, NULL);
111 fformat (stdout, "Pick %lld unique %s keys...\n", tm
245 test_cuckoo_main(test_main_t * tm) argument
284 test_main_t *tm = &test_main; local
[all...]
/vpp/src/vppinfra/
H A Dtest_tw_timer.c128 tw_timer_test_main_t *tm = &tw_timer_test_main; local
137 e = pool_elt_at_index (tm->test_elts, pool_index);
139 if (e->expected_to_expire != tm->single_wheel.current_tick)
142 e - tm->test_elts, tm->single_wheel.current_tick,
145 pool_put (tm->test_elts, e);
155 tw_timer_test_main_t *tm = &tw_timer_test_main; local
164 e = pool_elt_at_index (tm->test_elts, pool_index);
166 if (e->expected_to_expire != tm->double_wheel.current_tick)
169 e - tm
182 tw_timer_test_main_t *tm = &tw_timer_test_main; local
209 tw_timer_test_main_t *tm = &tw_timer_test_main; local
236 tw_timer_test_main_t *tm = &tw_timer_test_main; local
255 test2_single(tw_timer_test_main_t * tm) argument
392 test2_double(tw_timer_test_main_t * tm) argument
530 get_expiration_time(tw_timer_test_main_t * tm) argument
542 test2_double_updates(tw_timer_test_main_t * tm) argument
641 test2_triple(tw_timer_test_main_t * tm) argument
781 test2_triple_ov(tw_timer_test_main_t * tm) argument
926 test1_single(tw_timer_test_main_t * tm) argument
995 test1_double(tw_timer_test_main_t * tm) argument
1053 test1_two_timer_double(tw_timer_test_main_t * tm) argument
1111 test3_triple_double(tw_timer_test_main_t * tm) argument
1186 test4_double_double(tw_timer_test_main_t * tm) argument
1270 test5_double(tw_timer_test_main_t * tm) argument
1354 timer_test_command_fn(tw_timer_test_main_t * tm, unformat_input_t * input) argument
1454 tw_timer_test_main_t *tm = &tw_timer_test_main; local
[all...]
H A Dtest_pmalloc.c40 test_palloc (test_main_t * tm) argument
42 clib_pmalloc_main_t *pm = &tm->pmalloc_main;
50 fformat (stdout, "Allocate %d items...\n", tm->nitems);
52 for (i = 0; i < tm->nitems; i++)
54 u32 size = tm->item_size ? tm->item_size : 64 + 64 * (i % 8);
55 u32 align = tm->align ? tm->align : 64 << (i % 5);
56 u32 numa = i % (tm->max_numa + 1);
67 vec_add1 (tm
105 test_main_t *tm = &test_main; local
[all...]
H A Dtest_valloc.c51 test_valloc (test_main_t * tm) argument
63 clib_valloc_init (&tm->valloc_main, ip, 1 /* lock */ );
67 clib_valloc_add_chunk (&tm->valloc_main, ip);
69 fformat (stdout, "Allocate %d items...\n", tm->nitems);
70 for (i = 0; i < tm->nitems; i++)
72 baseva = clib_valloc_alloc (&tm->valloc_main, 1024,
74 vec_add1 (tm->basevas, baseva);
75 vec_add1 (tm->item_in_table, 1);
78 fformat (stdout, "Perform %d random add/delete operations...\n", tm->niter);
80 for (i = 0; i < tm
204 test_main_t *tm = &test_main; local
[all...]
H A Dtest_bihash_vec88.c51 test_bihash (test_main_t * tm) argument
60 h = &tm->hash;
62 BV (clib_bihash_init) (h, "test", tm->nbuckets, 3ULL << 30);
65 tm->nitems, tm->non_random_keys ? "non-random" : "random");
67 for (i = 0; i < tm->nitems; i++)
71 if (tm->non_random_keys == 0)
78 len = random_u32 (&tm->seed);
83 random_vec8 = random_string (&tm->seed, len);
86 p = hash_get_mem (tm
214 test_bihash_main(test_main_t * tm) argument
268 test_main_t *tm = &test_main; local
[all...]
H A Dtest_bihash_template.c63 test_bihash_vec64 (test_main_t * tm) argument
73 h = &tm->hash;
83 before = clib_time_now (&tm->clib_time);
95 vec_add1 (cum_times, clib_time_now (&tm->clib_time) - before);
108 test_main_t *tm = ctx; local
110 tm->noverwritten++;
116 test_bihash_stale_overwrite (test_main_t * tm) argument
121 tm->noverwritten = 0;
123 h = &tm->hash;
126 BV (clib_bihash_master_init_svm) (h, "test", tm
154 test_main_t *tm = &test_main; local
201 test_bihash_threads(test_main_t * tm) argument
252 test_bihash(test_main_t * tm) argument
476 test_bihash_main(test_main_t * tm) argument
559 test_main_t *tm = &test_main; local
[all...]
H A Dtest_serialize.c143 test_serialize_main_t _tm, *tm = &_tm; local
144 serialize_main_t *sm = &tm->serialize_main;
145 serialize_main_t *um = &tm->unserialize_main;
148 clib_memset (tm, 0, sizeof (tm[0]));
149 tm->n_iter = 100;
150 tm->seed = 1;
151 tm->max_len = 128;
152 tm->verbose = 0;
153 tm
[all...]
H A Dtest_dlist.c29 test_main_t *tm = &test_main; local
35 pool_get (tm->test_pool, head);
36 head_index = head - tm->test_pool;
37 clib_dlist_init (tm->test_pool, head - tm->test_pool);
41 pool_get (tm->test_pool, elt);
42 elt_index = elt - tm->test_pool;
44 clib_dlist_init (tm->test_pool, elt_index);
46 clib_dlist_addtail (tm->test_pool, head_index, elt_index);
49 head = pool_elt_at_index (tm
[all...]
H A Dmem_dlmalloc.c68 mheap_trace_main_t *tm = &mheap_trace_main; local
74 if (tm->enabled == 0 || (clib_mem_get_heap () != tm->current_traced_mheap))
85 clib_spinlock_lock (&tm->lock);
88 save_enabled = tm->enabled;
89 tm->enabled = 0;
91 if (!tm->trace_by_callers)
92 tm->trace_by_callers =
95 p = hash_get_mem (tm->trace_by_callers, &trace.callers);
99 t = tm
152 mheap_trace_main_t *tm = &mheap_trace_main; local
192 mheap_trace_main_free(mheap_trace_main_t * tm) argument
320 mheap_trace_main_t *tm = va_arg (*va, mheap_trace_main_t *); local
392 mheap_trace_main_t *tm = &mheap_trace_main; local
455 mheap_trace_main_t *tm = &mheap_trace_main; local
477 mheap_trace_main_t *tm = &mheap_trace_main; local
[all...]
H A Dtest_elf.c144 elf_test_main_t _tm, *tm = &_tm; local
145 elf_main_t *em = &tm->elf_main;
149 clib_memset (tm, 0, sizeof (tm[0]));
154 if (unformat (&i, "in %s", &tm->input_file))
156 else if (unformat (&i, "out %s", &tm->output_file))
158 else if (unformat (&i, "set-interpreter %s", &tm->set_interpreter))
161 tm->verbose = ~0;
163 tm->verbose |= FORMAT_ELF_MAIN_SYMBOLS;
165 tm
[all...]
/vpp/src/plugins/unittest/
H A Dbihash_test.c117 test_bihash_vec64 (bihash_test_main_t * tm) argument
127 h = &tm->hash;
130 BV (clib_bihash_set_stats_callback) (h, inc_stats_callback, &tm->stats);
132 before = clib_time_now (&tm->clib_time);
144 vec_add1 (cum_times, clib_time_now (&tm->clib_time) - before);
159 bihash_test_main_t *tm = &bihash_test_main; local
163 while (tm->thread_barrier)
166 h = &tm->hash;
168 for (i = 0; i < tm->ncycles; i++)
170 for (j = 0; j < tm
194 test_bihash_threads(bihash_test_main_t * tm) argument
256 test_bihash(bihash_test_main_t * tm) argument
464 bihash_test_main_t *tm = &bihash_test_main; local
550 bihash_test_main_t *tm = &bihash_test_main; local
[all...]
/vpp/extras/deprecated/elftool/
H A Delftool.c65 elf_tool_main_t * tm)
70 char * interp = tm->set_interpreter;
78 if (tm->allow_elf_shared)
221 set_interpreter_rpath (elf_tool_main_t * tm) argument
233 if (!strcmp (tm->input_file, tm->output_file))
236 ifd = open (tm->input_file, O_RDWR);
239 error = clib_error_return_unix (0, "open `%s'", tm->input_file);
245 error = clib_error_return_unix (0, "fstat `%s'", tm->input_file);
251 error = clib_error_return (0, "%s is not a regular file", tm
64 elf_set_interpreter(elf_main_t * em, elf_tool_main_t * tm) argument
373 elf_tool_main_t _tm, * tm = &_tm; local
[all...]
/vpp/src/examples/vlib/
H A Dmc_test.c37 choose_msg_size (mc_test_main_t * tm) argument
39 u32 r = tm->min_n_msg_bytes;
40 if (tm->max_n_msg_bytes > tm->min_n_msg_bytes)
42 random_u32 (&tm->seed) % (1 + tm->max_n_msg_bytes -
43 tm->min_n_msg_bytes);
52 mc_test_main_t *tm = &mc_test_main; local
53 u32 n_bytes = choose_msg_size (tm);
59 msg[i] = i + tm
66 mc_test_main_t *tm = &mc_test_main; local
156 mc_test_main_t *tm = &mc_test_main; local
322 mc_test_main_t *tm = &mc_test_main; local
[all...]
/vpp/src/vnet/unix/
H A Dtuntap.c151 tuntap_main_t *tm = &tuntap_main; local
166 if (tm->is_ether && (!tm->have_normal_interface))
169 clib_memcpy_fast (vlib_buffer_get_current (b), tm->ether_dst_mac,
174 if (tm->threads[thread_index].iovecs)
175 _vec_len (tm->threads[thread_index].iovecs) = 0;
178 vec_add2 (tm->threads[thread_index].iovecs, iov, 1);
188 vec_add2 (tm->threads[thread_index].iovecs, iov, 1);
197 if (writev (tm->dev_net_tun_fd, tm
243 tuntap_main_t *tm = &tuntap_main; local
438 tuntap_main_t *tm = &tuntap_main; local
488 tuntap_main_t *tm = &tuntap_main; local
705 tuntap_main_t *tm = &tuntap_main; local
820 tuntap_main_t *tm = &tuntap_main; local
984 tuntap_main_t *tm = &tuntap_main; local
1019 tuntap_main_t *tm = &tuntap_main; local
[all...]
/vpp/src/vpp/api/
H A Dtest_client.c654 link_up_down_enable_disable (test_main_t * tm, int enable) argument
662 mp->client_index = tm->my_client_index;
666 vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
667 tm->link_events_on = enable;
671 stats_enable_disable (test_main_t * tm, int enable) argument
678 mp->client_index = tm->my_client_index;
682 vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
683 tm->stats_on = enable;
687 oam_events_enable_disable (test_main_t * tm, int enable) argument
694 mp->client_index = tm
703 oam_add_del(test_main_t * tm, int is_add) argument
726 dump(test_main_t * tm) argument
741 add_del_ip4_route(test_main_t * tm, int enable_disable) argument
770 add_del_ip6_route(test_main_t * tm, int enable_disable) argument
802 add_del_interface_address(test_main_t * tm, int enable_disable) argument
823 add_del_v6_interface_address(test_main_t * tm, int enable_disable) argument
848 del_all_interface_addresses(test_main_t * tm) argument
864 set_interface_table(test_main_t * tm, int is_ipv6, u32 vrf_id) argument
881 connect_unix_tap(test_main_t * tm, char *name) argument
896 create_vlan_subif(test_main_t * tm, u32 vlan_id) argument
912 add_del_proxy_arp(test_main_t * tm, int is_add) argument
936 proxy_arp_intfc_enable_disable(test_main_t * tm, int enable_disable) argument
952 add_ip4_neighbor(test_main_t * tm, int add_del) argument
974 add_ip6_neighbor(test_main_t * tm, int add_del) argument
1000 reset_fib(test_main_t * tm, u8 is_ip6) argument
1016 dhcpv6_set_vss(test_main_t * tm) argument
1033 dhcpv4_set_vss(test_main_t * tm) argument
1050 dhcp_set_vss(test_main_t * tm) argument
1057 dhcp_set_proxy(test_main_t * tm, int ipv6) argument
1094 set_ip_flow_hash(test_main_t * tm, u8 is_ip6) argument
1112 ip6nd_ra_config(test_main_t * tm, int is_no) argument
1132 ip6nd_ra_prefix(test_main_t * tm, int is_no) argument
1163 ip6_enable_disable(test_main_t * tm, int enable) argument
1180 loop_create(test_main_t * tm) argument
1194 ip6_set_link_local_address(test_main_t * tm) argument
1218 set_flags(test_main_t * tm, int up_down) argument
1235 l2_patch_add_del(test_main_t * tm, int is_add) argument
1252 l2_xconnect(test_main_t * tm) argument
1269 l2_bridge(test_main_t * tm) argument
1291 test_main_t *tm = &test_main; local
[all...]
H A Dtest_ha.c92 test_main_t *tm = &test_main; local
95 tm->pings_replied++;
111 ping (test_main_t * tm) argument
118 mp->client_index = tm->my_client_index;
121 vl_msg_api_send_shmem (tm->vl_input_queue, (u8 *) & mp);
133 test_main_t *tm = &test_main; local
151 tm->vl_input_queue = shmem_hdr->vl_input_queue;
152 tm->my_client_index = am->my_client_index;
167 test_main_t *tm = &test_main; local
169 tm
176 test_main_t *tm = &test_main; local
[all...]
/vpp/src/vlib/
H A Dtrace.c117 vlib_trace_main_t *tm; local
122 tm = &this_vlib_main->trace_main;
124 tm->trace_enable = 0;
126 for (i = 0; i < vec_len (tm->trace_buffer_pool); i++)
127 if (! pool_is_free_index (tm->trace_buffer_pool, i))
128 vec_free (tm->trace_buffer_pool[i]);
129 pool_free (tm->trace_buffer_pool);
191 filter_accept (vlib_trace_main_t * tm, vlib_trace_header_t * h) argument
195 if (tm->filter_flag == 0)
198 if (tm
228 vlib_trace_main_t *tm = &vm->trace_main; local
272 vlib_trace_main_t *tm; local
366 vlib_trace_main_t *tm; local
484 vlib_trace_main_t *tm = &vm->trace_main; local
[all...]
H A Dtrace_funcs.h46 vlib_validate_trace (vlib_trace_main_t * tm, vlib_buffer_t * b) argument
48 ASSERT (!pool_is_free_index (tm->trace_buffer_pool,
59 vlib_trace_main_t *tm = &vm->trace_main; local
68 if (PREDICT_FALSE (tm->add_trace_callback != 0))
70 return tm->add_trace_callback ((struct vlib_main_t *) vm,
75 else if (PREDICT_FALSE (tm->trace_enable == 0))
85 vlib_validate_trace (tm, b);
89 vec_add2_aligned (tm->trace_buffer_pool[vlib_buffer_get_trace_index (b)], h,
113 vlib_trace_main_t *tm = &vm->trace_main; local
115 vlib_validate_trace (tm,
140 vlib_trace_main_t *tm = &vm->trace_main; local
195 vlib_trace_main_t *tm = &vm->trace_main; local
211 vlib_trace_main_t *tm = &vm->trace_main; local
[all...]
/vpp/src/plugins/gbp/
H A Dgbp_learn.c46 vlib_thread_main_t *tm = &vlib_thread_main; local
58 tm->n_vlib_mains, GBP_ENDPOINT_HASH_LEARN_RATE);
61 tm->n_vlib_mains, GBP_ENDPOINT_HASH_LEARN_RATE);

Completed in 15 milliseconds

1234