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

Function ixgbe_dev_clear_queues

dpdk/drivers/net/ixgbe/ixgbe_rxtx.c:3370–3406  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3368}
3369
3370void __rte_cold
3371ixgbe_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
3408void
3409ixgbe_dev_free_queues(struct rte_eth_dev *dev)

Callers 4

ixgbe_dev_startFunction · 0.85
ixgbe_dev_stopFunction · 0.85
ixgbevf_dev_startFunction · 0.85
ixgbevf_dev_stopFunction · 0.85

Calls 4

ixgbe_reset_rx_queueFunction · 0.85
resetMethod · 0.45

Tested by

no test coverage detected