| 2413 | } |
| 2414 | |
| 2415 | static void |
| 2416 | update_rx_queue_state(uint16_t port_id, uint16_t queue_id) |
| 2417 | { |
| 2418 | struct rte_eth_rxq_info rx_qinfo; |
| 2419 | int32_t rc; |
| 2420 | |
| 2421 | rc = rte_eth_rx_queue_info_get(port_id, |
| 2422 | queue_id, &rx_qinfo); |
| 2423 | if (rc == 0) { |
| 2424 | ports[port_id].rxq[queue_id].state = |
| 2425 | rx_qinfo.queue_state; |
| 2426 | } else if (rc == -ENOTSUP) { |
| 2427 | /* |
| 2428 | * Do not change the rxq state for primary process |
| 2429 | * to ensure that the PMDs do not implement |
| 2430 | * rte_eth_rx_queue_info_get can forward as before. |
| 2431 | */ |
| 2432 | if (rte_eal_process_type() == RTE_PROC_PRIMARY) |
| 2433 | return; |
| 2434 | /* |
| 2435 | * Set the rxq state to RTE_ETH_QUEUE_STATE_STARTED |
| 2436 | * to ensure that the PMDs do not implement |
| 2437 | * rte_eth_rx_queue_info_get can forward. |
| 2438 | */ |
| 2439 | ports[port_id].rxq[queue_id].state = |
| 2440 | RTE_ETH_QUEUE_STATE_STARTED; |
| 2441 | } else { |
| 2442 | TESTPMD_LOG(WARNING, |
| 2443 | "Failed to get rx queue info\n"); |
| 2444 | } |
| 2445 | } |
| 2446 | |
| 2447 | static void |
| 2448 | update_tx_queue_state(uint16_t port_id, uint16_t queue_id) |
no test coverage detected