* Stop Receive Units for specified queue. */
| 5528 | * Stop Receive Units for specified queue. |
| 5529 | */ |
| 5530 | int __rte_cold |
| 5531 | ixgbe_dev_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
| 5532 | { |
| 5533 | struct ixgbe_hw *hw; |
| 5534 | struct ixgbe_adapter *adapter = dev->data->dev_private; |
| 5535 | struct ixgbe_rx_queue *rxq; |
| 5536 | uint32_t rxdctl; |
| 5537 | int poll_ms; |
| 5538 | |
| 5539 | PMD_INIT_FUNC_TRACE(); |
| 5540 | hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 5541 | |
| 5542 | rxq = dev->data->rx_queues[rx_queue_id]; |
| 5543 | |
| 5544 | rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx)); |
| 5545 | rxdctl &= ~IXGBE_RXDCTL_ENABLE; |
| 5546 | IXGBE_WRITE_REG(hw, IXGBE_RXDCTL(rxq->reg_idx), rxdctl); |
| 5547 | |
| 5548 | /* Wait until RX Enable bit clear */ |
| 5549 | poll_ms = RTE_IXGBE_REGISTER_POLL_WAIT_10_MS; |
| 5550 | do { |
| 5551 | rte_delay_ms(1); |
| 5552 | rxdctl = IXGBE_READ_REG(hw, IXGBE_RXDCTL(rxq->reg_idx)); |
| 5553 | } while (--poll_ms && (rxdctl & IXGBE_RXDCTL_ENABLE)); |
| 5554 | if (!poll_ms) |
| 5555 | PMD_INIT_LOG(ERR, "Could not disable Rx Queue %d", rx_queue_id); |
| 5556 | |
| 5557 | rte_delay_us(RTE_IXGBE_WAIT_100_US); |
| 5558 | |
| 5559 | ixgbe_rx_queue_release_mbufs(rxq); |
| 5560 | ixgbe_reset_rx_queue(adapter, rxq); |
| 5561 | dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 5562 | |
| 5563 | return 0; |
| 5564 | } |
| 5565 | |
| 5566 | |
| 5567 | /* |
nothing calls this directly
no test coverage detected