* Stop Receive Units for specified queue. */
| 3161 | * Stop Receive Units for specified queue. |
| 3162 | */ |
| 3163 | int |
| 3164 | ngbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
| 3165 | { |
| 3166 | struct ngbe_hw *hw = ngbe_dev_hw(dev); |
| 3167 | struct ngbe_adapter *adapter = ngbe_dev_adapter(dev); |
| 3168 | struct ngbe_rx_queue *rxq; |
| 3169 | uint32_t rxdctl; |
| 3170 | int poll_ms; |
| 3171 | |
| 3172 | PMD_INIT_FUNC_TRACE(); |
| 3173 | |
| 3174 | rxq = dev->data->rx_queues[rx_queue_id]; |
| 3175 | |
| 3176 | ngbe_dev_save_rx_queue(hw, rxq->reg_idx); |
| 3177 | wr32m(hw, NGBE_RXCFG(rxq->reg_idx), NGBE_RXCFG_ENA, 0); |
| 3178 | |
| 3179 | /* Wait until Rx Enable bit clear */ |
| 3180 | poll_ms = RTE_NGBE_REGISTER_POLL_WAIT_10_MS; |
| 3181 | do { |
| 3182 | rte_delay_ms(1); |
| 3183 | rxdctl = rd32(hw, NGBE_RXCFG(rxq->reg_idx)); |
| 3184 | } while (--poll_ms && (rxdctl & NGBE_RXCFG_ENA)); |
| 3185 | if (poll_ms == 0) |
| 3186 | PMD_INIT_LOG(ERR, "Could not disable Rx Queue %d", rx_queue_id); |
| 3187 | |
| 3188 | rte_delay_us(RTE_NGBE_WAIT_100_US); |
| 3189 | ngbe_dev_store_rx_queue(hw, rxq->reg_idx); |
| 3190 | |
| 3191 | ngbe_rx_queue_release_mbufs(rxq); |
| 3192 | ngbe_reset_rx_queue(adapter, rxq); |
| 3193 | dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 3194 | |
| 3195 | return 0; |
| 3196 | } |
| 3197 | |
| 3198 | /* |
| 3199 | * Start Transmit Units for specified queue. |
nothing calls this directly
no test coverage detected