| 1183 | } |
| 1184 | |
| 1185 | int |
| 1186 | rte_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 | |
| 1217 | int |
| 1218 | rte_event_port_profile_links_get(uint8_t dev_id, uint8_t port_id, uint8_t queues[], |