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

Function create_directed_qids

dpdk/drivers/event/sw/sw_evdev_selftest.c:247–277  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247static inline int
248create_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 */
280static inline int

Callers 4

test_priority_directedFunction · 0.85
parallel_basicFunction · 0.85

Calls 3

rte_event_queue_setupFunction · 0.85
rte_event_port_linkFunction · 0.85
printfFunction · 0.50

Tested by

no test coverage detected