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

Function idpf_rx_queue_stop

dpdk/drivers/net/idpf/idpf_rxtx.c:662–692  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

660}
661
662int
663idpf_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
694int
695idpf_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)

Callers 1

idpf_stop_queuesFunction · 0.85

Calls 3

idpf_vc_queue_switchFunction · 0.85

Tested by

no test coverage detected