* Stop Receive Units for specified queue. */
| 4659 | * Stop Receive Units for specified queue. |
| 4660 | */ |
| 4661 | int __rte_cold |
| 4662 | txgbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
| 4663 | { |
| 4664 | struct txgbe_hw *hw = TXGBE_DEV_HW(dev); |
| 4665 | struct txgbe_adapter *adapter = TXGBE_DEV_ADAPTER(dev); |
| 4666 | struct txgbe_rx_queue *rxq; |
| 4667 | uint32_t rxdctl; |
| 4668 | int poll_ms; |
| 4669 | |
| 4670 | PMD_INIT_FUNC_TRACE(); |
| 4671 | |
| 4672 | rxq = dev->data->rx_queues[rx_queue_id]; |
| 4673 | |
| 4674 | txgbe_dev_save_rx_queue(hw, rxq->reg_idx); |
| 4675 | wr32m(hw, TXGBE_RXCFG(rxq->reg_idx), TXGBE_RXCFG_ENA, 0); |
| 4676 | |
| 4677 | /* Wait until RX Enable bit clear */ |
| 4678 | poll_ms = RTE_TXGBE_REGISTER_POLL_WAIT_10_MS; |
| 4679 | do { |
| 4680 | rte_delay_ms(1); |
| 4681 | rxdctl = rd32(hw, TXGBE_RXCFG(rxq->reg_idx)); |
| 4682 | } while (--poll_ms && (rxdctl & TXGBE_RXCFG_ENA)); |
| 4683 | if (!poll_ms) |
| 4684 | PMD_INIT_LOG(ERR, "Could not disable Rx Queue %d", rx_queue_id); |
| 4685 | |
| 4686 | rte_delay_us(RTE_TXGBE_WAIT_100_US); |
| 4687 | txgbe_dev_store_rx_queue(hw, rxq->reg_idx); |
| 4688 | |
| 4689 | txgbe_rx_queue_release_mbufs(rxq); |
| 4690 | txgbe_reset_rx_queue(adapter, rxq); |
| 4691 | dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 4692 | |
| 4693 | return 0; |
| 4694 | } |
| 4695 | |
| 4696 | /* |
| 4697 | * Start Transmit Units for specified queue. |
nothing calls this directly
no test coverage detected