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

Function test_eventdev_unlink

dpdk/app/test/test_eventdev.c:1020–1046  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1018}
1019
1020static int
1021test_eventdev_unlink(void)
1022{
1023 int ret, nb_queues, i;
1024 uint8_t queues[RTE_EVENT_MAX_QUEUES_PER_DEV];
1025
1026 ret = rte_event_port_unlink(TEST_DEV_ID, 0, NULL, 0);
1027 TEST_ASSERT(ret >= 0, "Failed to unlink with NULL device%d",
1028 TEST_DEV_ID);
1029
1030 uint32_t queue_count;
1031 TEST_ASSERT_SUCCESS(rte_event_dev_attr_get(TEST_DEV_ID,
1032 RTE_EVENT_DEV_ATTR_QUEUE_COUNT, &queue_count),
1033 "Queue count get failed");
1034 nb_queues = queue_count;
1035 for (i = 0; i < nb_queues; i++)
1036 queues[i] = i;
1037
1038 ret = rte_event_port_link(TEST_DEV_ID, 0, NULL, NULL, 0);
1039 TEST_ASSERT(ret >= 0, "Failed to link with NULL device%d",
1040 TEST_DEV_ID);
1041
1042 ret = rte_event_port_unlink(TEST_DEV_ID, 0, queues, nb_queues);
1043 TEST_ASSERT(ret == nb_queues, "Failed to unlink(device%d) ret=%d",
1044 TEST_DEV_ID, ret);
1045 return TEST_SUCCESS;
1046}
1047
1048static int
1049test_eventdev_link_get(void)

Callers

nothing calls this directly

Calls 3

rte_event_port_unlinkFunction · 0.85
rte_event_dev_attr_getFunction · 0.85
rte_event_port_linkFunction · 0.85

Tested by

no test coverage detected