| 660 | } |
| 661 | |
| 662 | int |
| 663 | idpf_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id) |
| 664 | { |
| 665 | struct idpf_vport *vport = dev->data->dev_private; |
| 666 | struct idpf_rx_queue *rxq; |
| 667 | int err; |
| 668 | |
| 669 | if (rx_queue_id >= dev->data->nb_rx_queues) |
| 670 | return -EINVAL; |
| 671 | |
| 672 | err = idpf_vc_queue_switch(vport, rx_queue_id, true, false); |
| 673 | if (err != 0) { |
| 674 | PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off", |
| 675 | rx_queue_id); |
| 676 | return err; |
| 677 | } |
| 678 | |
| 679 | rxq = dev->data->rx_queues[rx_queue_id]; |
| 680 | rxq->q_started = false; |
| 681 | if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) { |
| 682 | rxq->ops->release_mbufs(rxq); |
| 683 | idpf_qc_single_rx_queue_reset(rxq); |
| 684 | } else { |
| 685 | rxq->bufq1->ops->release_mbufs(rxq->bufq1); |
| 686 | rxq->bufq2->ops->release_mbufs(rxq->bufq2); |
| 687 | idpf_qc_split_rx_queue_reset(rxq); |
| 688 | } |
| 689 | dev->data->rx_queue_state[rx_queue_id] = RTE_ETH_QUEUE_STATE_STOPPED; |
| 690 | |
| 691 | return 0; |
| 692 | } |
| 693 | |
| 694 | int |
| 695 | idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id) |
no test coverage detected