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

Function update_rx_queue_state

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

Source from the content-addressed store, hash-verified

2413}
2414
2415static void
2416update_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
2447static void
2448update_tx_queue_state(uint16_t port_id, uint16_t queue_id)

Callers 1

update_queue_stateFunction · 0.85

Calls 2

rte_eal_process_typeFunction · 0.85

Tested by

no test coverage detected