| 140 | } |
| 141 | |
| 142 | static struct rte_node_ethdev_config * |
| 143 | graph_rxtx_node_config_get(uint32_t *num_conf, uint32_t *num_graphs) |
| 144 | { |
| 145 | uint32_t n_tx_queue, nb_conf = 0, lcore_id; |
| 146 | uint16_t queueid, portid, nb_graphs = 0; |
| 147 | uint8_t nb_rx_queue, queue; |
| 148 | struct lcore_conf *qconf; |
| 149 | |
| 150 | n_tx_queue = graph_worker_count_get(); |
| 151 | if (n_tx_queue > RTE_MAX_ETHPORTS) |
| 152 | n_tx_queue = RTE_MAX_ETHPORTS; |
| 153 | |
| 154 | RTE_ETH_FOREACH_DEV(portid) { |
| 155 | /* Skip ports that are not enabled */ |
| 156 | if ((enabled_port_mask & (1 << portid)) == 0) { |
| 157 | printf("\nSkipping disabled port %d\n", portid); |
| 158 | continue; |
| 159 | } |
| 160 | |
| 161 | nb_rx_queue = ethdev_rx_num_rx_queues_get(portid); |
| 162 | |
| 163 | /* Setup ethdev node config */ |
| 164 | ethdev_conf[nb_conf].port_id = portid; |
| 165 | ethdev_conf[nb_conf].num_rx_queues = nb_rx_queue; |
| 166 | ethdev_conf[nb_conf].num_tx_queues = n_tx_queue; |
| 167 | ethdev_conf[nb_conf].mp = ethdev_mempool_list_by_portid(portid); |
| 168 | ethdev_conf[nb_conf].mp_count = 1; /* Check with pools */ |
| 169 | |
| 170 | nb_conf++; |
| 171 | } |
| 172 | |
| 173 | for (lcore_id = 0; lcore_id < RTE_MAX_LCORE; lcore_id++) { |
| 174 | if (rte_lcore_is_enabled(lcore_id) == 0) |
| 175 | continue; |
| 176 | |
| 177 | qconf = &lcore_conf[lcore_id]; |
| 178 | printf("\nInitializing rx queues on lcore %u ... ", lcore_id); |
| 179 | fflush(stdout); |
| 180 | |
| 181 | /* Init RX queues */ |
| 182 | for (queue = 0; queue < qconf->n_rx_queue; ++queue) { |
| 183 | portid = qconf->rx_queue_list[queue].port_id; |
| 184 | queueid = qconf->rx_queue_list[queue].queue_id; |
| 185 | |
| 186 | /* Add this queue node to its graph */ |
| 187 | snprintf(qconf->rx_queue_list[queue].node_name, RTE_NODE_NAMESIZE, |
| 188 | "ethdev_rx-%u-%u", portid, queueid); |
| 189 | } |
| 190 | if (qconf->n_rx_queue) |
| 191 | nb_graphs++; |
| 192 | } |
| 193 | |
| 194 | printf("\n"); |
| 195 | |
| 196 | ethdev_start(); |
| 197 | check_all_ports_link_status(enabled_port_mask); |
| 198 | |
| 199 | *num_conf = nb_conf; |
no test coverage detected