Assign ring structures for packet exchanging. 8< */
| 858 | |
| 859 | /* Assign ring structures for packet exchanging. 8< */ |
| 860 | static void |
| 861 | assign_rings(void) |
| 862 | { |
| 863 | uint32_t i; |
| 864 | |
| 865 | for (i = 0; i < cfg.nb_ports; i++) { |
| 866 | char ring_name[RTE_RING_NAMESIZE]; |
| 867 | |
| 868 | snprintf(ring_name, sizeof(ring_name), "rx_to_tx_ring_%u", i); |
| 869 | /* Create ring for inter core communication */ |
| 870 | cfg.ports[i].rx_to_tx_ring = rte_ring_create( |
| 871 | ring_name, ring_size, |
| 872 | rte_socket_id(), RING_F_SP_ENQ | RING_F_SC_DEQ); |
| 873 | |
| 874 | if (cfg.ports[i].rx_to_tx_ring == NULL) |
| 875 | rte_exit(EXIT_FAILURE, "Ring create failed: %s\n", |
| 876 | rte_strerror(rte_errno)); |
| 877 | } |
| 878 | } |
| 879 | /* >8 End of assigning ring structures for packet exchanging. */ |
| 880 | |
| 881 | static uint32_t |
no test coverage detected