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

Function test_app_bind_ports

dpdk/app/test/test_dispatcher.c:249–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

247}
248
249static int
250test_app_bind_ports(struct test_app *app)
251{
252 int i;
253
254 app->never_process_count.expected_event_dev_id =
255 app->event_dev_id;
256 app->finalize_count.expected_event_dev_id =
257 app->event_dev_id;
258
259 for (i = 0; i < NUM_WORKERS; i++) {
260 unsigned int lcore_id = app->service_lcores[i];
261 uint8_t port_id = WORKER_PORT_ID(i);
262
263 int rc = rte_dispatcher_bind_port_to_lcore(
264 app->dispatcher, port_id, DEQUEUE_BURST_SIZE, 0,
265 lcore_id
266 );
267
268 TEST_ASSERT_SUCCESS(rc, "Unable to bind event device port %d "
269 "to lcore %d", port_id, lcore_id);
270
271 app->never_process_count.expected_event_port_id[lcore_id] =
272 port_id;
273 app->finalize_count.expected_event_port_id[lcore_id] = port_id;
274 }
275
276
277 return TEST_SUCCESS;
278}
279
280static int
281test_app_unbind_ports(struct test_app *app)

Callers 1

test_setupFunction · 0.85

Calls 1

Tested by

no test coverage detected