Lines Matching refs:s
18 test_stack_push_pop(struct rte_stack *s, void **obj_table, unsigned int bulk_sz) in test_stack_push_pop() argument
31 ret = rte_stack_push(s, &obj_table[i], bulk_sz); in test_stack_push_pop()
40 if (rte_stack_count(s) != i + bulk_sz) { in test_stack_push_pop()
42 __func__, __LINE__, rte_stack_count(s), in test_stack_push_pop()
48 if (rte_stack_free_count(s) != STACK_SIZE - i - bulk_sz) { in test_stack_push_pop()
50 __func__, __LINE__, rte_stack_count(s), in test_stack_push_pop()
58 ret = rte_stack_pop(s, &popped_objs[i], bulk_sz); in test_stack_push_pop()
67 if (rte_stack_count(s) != STACK_SIZE - i - bulk_sz) { in test_stack_push_pop()
69 __func__, __LINE__, rte_stack_count(s), in test_stack_push_pop()
75 if (rte_stack_free_count(s) != i + bulk_sz) { in test_stack_push_pop()
77 __func__, __LINE__, rte_stack_count(s), in test_stack_push_pop()
102 struct rte_stack *s = NULL; in test_stack_basic() local
116 s = rte_stack_create(__func__, STACK_SIZE, rte_socket_id(), flags); in test_stack_basic()
117 if (s == NULL) { in test_stack_basic()
123 if (rte_stack_lookup(__func__) != s) { in test_stack_basic()
129 if (rte_stack_count(s) != 0) { in test_stack_basic()
131 __func__, __LINE__, rte_stack_count(s)); in test_stack_basic()
135 if (rte_stack_free_count(s) != STACK_SIZE) { in test_stack_basic()
137 __func__, __LINE__, rte_stack_count(s), STACK_SIZE); in test_stack_basic()
141 ret = test_stack_push_pop(s, obj_table, 1); in test_stack_basic()
148 ret = test_stack_push_pop(s, obj_table, MAX_BULK); in test_stack_basic()
155 ret = rte_stack_push(s, obj_table, 2 * STACK_SIZE); in test_stack_basic()
162 ret = rte_stack_pop(s, obj_table, 1); in test_stack_basic()
172 rte_stack_free(s); in test_stack_basic()
182 struct rte_stack *s[2]; in test_stack_name_reuse() local
184 s[0] = rte_stack_create("test", STACK_SIZE, rte_socket_id(), flags); in test_stack_name_reuse()
185 if (s[0] == NULL) { in test_stack_name_reuse()
191 s[1] = rte_stack_create("test", STACK_SIZE, rte_socket_id(), flags); in test_stack_name_reuse()
192 if (s[1] != NULL) { in test_stack_name_reuse()
198 rte_stack_free(s[0]); in test_stack_name_reuse()
207 struct rte_stack *s; in test_stack_name_length() local
212 s = rte_stack_create(name, STACK_SIZE, rte_socket_id(), flags); in test_stack_name_length()
213 if (s != NULL) { in test_stack_name_length()
231 struct rte_stack *s = rte_stack_lookup("stack_not_found"); in test_lookup_null() local
233 if (s != NULL) { in test_lookup_null()
245 s = rte_stack_lookup(NULL); in test_lookup_null()
247 if (s != NULL) { in test_lookup_null()
274 struct rte_stack *s; member
290 if (rte_stack_push(thread_test_args.s, obj_table, num) != num) { in stack_thread_push_pop()
296 if (rte_stack_pop(thread_test_args.s, obj_table, num) != num) { in stack_thread_push_pop()
310 struct rte_stack *s; in test_stack_multithreaded() local
321 s = rte_stack_create("test", MAX_BULK * rte_lcore_count(), rte_socket_id(), flags); in test_stack_multithreaded()
322 if (s == NULL) { in test_stack_multithreaded()
328 thread_test_args.s = s; in test_stack_multithreaded()
338 rte_stack_free(s); in test_stack_multithreaded()