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

Function rte_event_port_links_get

dpdk/lib/eventdev/rte_eventdev.c:1185–1215  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1183}
1184
1185int
1186rte_event_port_links_get(uint8_t dev_id, uint8_t port_id,
1187 uint8_t queues[], uint8_t priorities[])
1188{
1189 struct rte_eventdev *dev;
1190 uint16_t *links_map;
1191 int i, count = 0;
1192
1193 RTE_EVENTDEV_VALID_DEVID_OR_ERR_RET(dev_id, -EINVAL);
1194 dev = &rte_eventdevs[dev_id];
1195 if (!is_valid_port(dev, port_id)) {
1196 RTE_EDEV_LOG_ERR("Invalid port_id=%" PRIu8, port_id);
1197 return -EINVAL;
1198 }
1199
1200 /* Use the default profile_id. */
1201 links_map = dev->data->links_map[0];
1202 /* Point links_map to this port specific area */
1203 links_map += (port_id * RTE_EVENT_MAX_QUEUES_PER_DEV);
1204 for (i = 0; i < dev->data->nb_queues; i++) {
1205 if (links_map[i] != EVENT_QUEUE_SERVICE_PRIORITY_INVALID) {
1206 queues[count] = i;
1207 priorities[count] = (uint8_t)links_map[i];
1208 ++count;
1209 }
1210 }
1211
1212 rte_eventdev_trace_port_links_get(dev_id, port_id, count);
1213
1214 return count;
1215}
1216
1217int
1218rte_event_port_profile_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[],

Callers 3

handle_queue_linksFunction · 0.85
test_eventdev_link_getFunction · 0.85
tx_adapter_serviceFunction · 0.85

Calls 1

is_valid_portFunction · 0.85

Tested by 2

test_eventdev_link_getFunction · 0.68
tx_adapter_serviceFunction · 0.68