| 3368 | } |
| 3369 | |
| 3370 | void __rte_cold |
| 3371 | ixgbe_dev_clear_queues(struct rte_eth_dev *dev) |
| 3372 | { |
| 3373 | unsigned i; |
| 3374 | struct ixgbe_adapter *adapter = dev->data->dev_private; |
| 3375 | struct ixgbe_hw *hw = IXGBE_DEV_PRIVATE_TO_HW(dev->data->dev_private); |
| 3376 | |
| 3377 | PMD_INIT_FUNC_TRACE(); |
| 3378 | |
| 3379 | for (i = 0; i < dev->data->nb_tx_queues; i++) { |
| 3380 | struct ixgbe_tx_queue *txq = dev->data->tx_queues[i]; |
| 3381 | |
| 3382 | if (txq != NULL) { |
| 3383 | txq->ops->release_mbufs(txq); |
| 3384 | txq->ops->reset(txq); |
| 3385 | dev->data->tx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 3386 | } |
| 3387 | } |
| 3388 | |
| 3389 | for (i = 0; i < dev->data->nb_rx_queues; i++) { |
| 3390 | struct ixgbe_rx_queue *rxq = dev->data->rx_queues[i]; |
| 3391 | |
| 3392 | if (rxq != NULL) { |
| 3393 | ixgbe_rx_queue_release_mbufs(rxq); |
| 3394 | ixgbe_reset_rx_queue(adapter, rxq); |
| 3395 | dev->data->rx_queue_state[i] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 3396 | } |
| 3397 | } |
| 3398 | /* If loopback mode was enabled, reconfigure the link accordingly */ |
| 3399 | if (dev->data->dev_conf.lpbk_mode != 0) { |
| 3400 | if (hw->mac.type == ixgbe_mac_X540 || |
| 3401 | hw->mac.type == ixgbe_mac_X550 || |
| 3402 | hw->mac.type == ixgbe_mac_X550EM_x || |
| 3403 | hw->mac.type == ixgbe_mac_X550EM_a) |
| 3404 | ixgbe_setup_loopback_link_x540_x550(hw, false); |
| 3405 | } |
| 3406 | } |
| 3407 | |
| 3408 | void |
| 3409 | ixgbe_dev_free_queues(struct rte_eth_dev *dev) |
no test coverage detected