| 245 | } |
| 246 | |
| 247 | static inline int |
| 248 | create_directed_qids(struct test *t, int num_qids, const uint8_t ports[]) |
| 249 | { |
| 250 | int i; |
| 251 | |
| 252 | /* Q creation */ |
| 253 | static const struct rte_event_queue_conf conf = { |
| 254 | .priority = RTE_EVENT_DEV_PRIORITY_NORMAL, |
| 255 | .event_queue_cfg = RTE_EVENT_QUEUE_CFG_SINGLE_LINK, |
| 256 | }; |
| 257 | |
| 258 | for (i = t->nb_qids; i < t->nb_qids + num_qids; i++) { |
| 259 | if (rte_event_queue_setup(evdev, i, &conf) < 0) { |
| 260 | printf("%d: error creating qid %d\n", __LINE__, i); |
| 261 | return -1; |
| 262 | } |
| 263 | t->qid[i] = i; |
| 264 | |
| 265 | if (rte_event_port_link(evdev, ports[i - t->nb_qids], |
| 266 | &t->qid[i], NULL, 1) != 1) { |
| 267 | printf("%d: error creating link for qid %d\n", |
| 268 | __LINE__, i); |
| 269 | return -1; |
| 270 | } |
| 271 | } |
| 272 | t->nb_qids += num_qids; |
| 273 | if (t->nb_qids > MAX_QIDS) |
| 274 | return -1; |
| 275 | |
| 276 | return 0; |
| 277 | } |
| 278 | |
| 279 | /* destruction */ |
| 280 | static inline int |
no test coverage detected