for a given number of core, launch all test cases */
| 287 | |
| 288 | /* for a given number of core, launch all test cases */ |
| 289 | static int |
| 290 | do_one_mempool_test(struct rte_mempool *mp, unsigned int cores) |
| 291 | { |
| 292 | unsigned int bulk_tab_get[] = { 1, 4, CACHE_LINE_BURST, 32, 0 }; |
| 293 | unsigned int bulk_tab_put[] = { 1, 4, CACHE_LINE_BURST, 32, 0 }; |
| 294 | unsigned int keep_tab[] = { 32, 128, 512, 0 }; |
| 295 | unsigned *get_bulk_ptr; |
| 296 | unsigned *put_bulk_ptr; |
| 297 | unsigned *keep_ptr; |
| 298 | int ret; |
| 299 | |
| 300 | for (get_bulk_ptr = bulk_tab_get; *get_bulk_ptr; get_bulk_ptr++) { |
| 301 | for (put_bulk_ptr = bulk_tab_put; *put_bulk_ptr; put_bulk_ptr++) { |
| 302 | for (keep_ptr = keep_tab; *keep_ptr; keep_ptr++) { |
| 303 | |
| 304 | use_constant_values = 0; |
| 305 | n_get_bulk = *get_bulk_ptr; |
| 306 | n_put_bulk = *put_bulk_ptr; |
| 307 | n_keep = *keep_ptr; |
| 308 | ret = launch_cores(mp, cores); |
| 309 | if (ret < 0) |
| 310 | return -1; |
| 311 | |
| 312 | /* replay test with constant values */ |
| 313 | if (n_get_bulk == n_put_bulk) { |
| 314 | use_constant_values = 1; |
| 315 | ret = launch_cores(mp, cores); |
| 316 | if (ret < 0) |
| 317 | return -1; |
| 318 | } |
| 319 | } |
| 320 | } |
| 321 | } |
| 322 | return 0; |
| 323 | } |
| 324 | |
| 325 | static int |
| 326 | test_mempool_perf(void) |
no test coverage detected