MCPcopy Create free account
hub / github.com/F-Stack/f-stack / update_tx_queue_state

Function update_tx_queue_state

dpdk/app/test-pmd/testpmd.c:2447–2477  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2445}
2446
2447static void
2448update_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
2479static void
2480update_queue_state(portid_t pid)

Callers 1

update_queue_stateFunction · 0.85

Calls 2

rte_eal_process_typeFunction · 0.85

Tested by

no test coverage detected