MCPcopy Create free account
hub / github.com/F-Stack/f-stack / test_app_register_callbacks

Function test_app_register_callbacks

dpdk/app/test/test_dispatcher.c:441–479  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

439}
440
441static int
442test_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
481static int
482test_app_unregister_callback(struct test_app *app, uint8_t queue_id)

Callers 1

test_setupFunction · 0.85

Calls 2

rte_dispatcher_registerFunction · 0.85

Tested by

no test coverage detected