| 396 | } |
| 397 | |
| 398 | static struct rte_ring * |
| 399 | create_ring(const char *name, unsigned count, int socket_id, unsigned flags) |
| 400 | { |
| 401 | struct rte_ring *ring; |
| 402 | |
| 403 | if (name == NULL) { |
| 404 | rte_exit(EXIT_FAILURE, "create ring failed, no name!\n"); |
| 405 | } |
| 406 | |
| 407 | if (rte_eal_process_type() == RTE_PROC_PRIMARY) { |
| 408 | ring = rte_ring_create(name, count, socket_id, flags); |
| 409 | } else { |
| 410 | ring = rte_ring_lookup(name); |
| 411 | } |
| 412 | |
| 413 | if (ring == NULL) { |
| 414 | rte_exit(EXIT_FAILURE, "create ring:%s failed!\n", name); |
| 415 | } |
| 416 | |
| 417 | return ring; |
| 418 | } |
| 419 | |
| 420 | static int |
| 421 | init_dispatch_ring(void) |
no test coverage detected