| 439 | } |
| 440 | |
| 441 | static int |
| 442 | test_app_register_callbacks(struct test_app *app) |
| 443 | { |
| 444 | int i; |
| 445 | |
| 446 | app->never_match_reg_id = |
| 447 | rte_dispatcher_register(app->dispatcher, never_match, |
| 448 | &app->never_match_count, |
| 449 | test_app_never_process, |
| 450 | &app->never_process_count); |
| 451 | |
| 452 | TEST_ASSERT(app->never_match_reg_id >= 0, "Unable to register " |
| 453 | "never-match handler"); |
| 454 | |
| 455 | for (i = 0; i < NUM_QUEUES; i++) { |
| 456 | struct app_queue *app_queue = &app->queues[i]; |
| 457 | uintptr_t queue_id = app_queue->queue_id; |
| 458 | int reg_id; |
| 459 | |
| 460 | reg_id = rte_dispatcher_register(app->dispatcher, |
| 461 | match_queue, (void *)queue_id, |
| 462 | test_app_process_queue, |
| 463 | app_queue); |
| 464 | |
| 465 | TEST_ASSERT(reg_id >= 0, "Unable to register consumer " |
| 466 | "callback for queue %d", i); |
| 467 | |
| 468 | app_queue->dispatcher_reg_id = reg_id; |
| 469 | } |
| 470 | |
| 471 | app->finalize_reg_id = |
| 472 | rte_dispatcher_finalize_register(app->dispatcher, |
| 473 | finalize, |
| 474 | &app->finalize_count); |
| 475 | TEST_ASSERT_SUCCESS(app->finalize_reg_id, "Error registering " |
| 476 | "finalize callback"); |
| 477 | |
| 478 | return TEST_SUCCESS; |
| 479 | } |
| 480 | |
| 481 | static int |
| 482 | test_app_unregister_callback(struct test_app *app, uint8_t queue_id) |
no test coverage detected