| 2445 | } |
| 2446 | |
| 2447 | static void |
| 2448 | update_tx_queue_state(uint16_t port_id, uint16_t queue_id) |
| 2449 | { |
| 2450 | struct rte_eth_txq_info tx_qinfo; |
| 2451 | int32_t rc; |
| 2452 | |
| 2453 | rc = rte_eth_tx_queue_info_get(port_id, |
| 2454 | queue_id, &tx_qinfo); |
| 2455 | if (rc == 0) { |
| 2456 | ports[port_id].txq[queue_id].state = |
| 2457 | tx_qinfo.queue_state; |
| 2458 | } else if (rc == -ENOTSUP) { |
| 2459 | /* |
| 2460 | * Do not change the txq state for primary process |
| 2461 | * to ensure that the PMDs do not implement |
| 2462 | * rte_eth_tx_queue_info_get can forward as before. |
| 2463 | */ |
| 2464 | if (rte_eal_process_type() == RTE_PROC_PRIMARY) |
| 2465 | return; |
| 2466 | /* |
| 2467 | * Set the txq state to RTE_ETH_QUEUE_STATE_STARTED |
| 2468 | * to ensure that the PMDs do not implement |
| 2469 | * rte_eth_tx_queue_info_get can forward. |
| 2470 | */ |
| 2471 | ports[port_id].txq[queue_id].state = |
| 2472 | RTE_ETH_QUEUE_STATE_STARTED; |
| 2473 | } else { |
| 2474 | TESTPMD_LOG(WARNING, |
| 2475 | "Failed to get tx queue info\n"); |
| 2476 | } |
| 2477 | } |
| 2478 | |
| 2479 | static void |
| 2480 | update_queue_state(portid_t pid) |
no test coverage detected