On 2/16/2023 12:29 AM, Mingxia Liu wrote:
> Add support for these device ops:
>  - rx_queue_stop
>  - tx_queue_stop
> 
> Signed-off-by: Mingxia Liu <mingxia....@intel.com>

<...>

> +int
> +cpfl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
> +{
> +     struct idpf_vport *vport = dev->data->dev_private;
> +     struct idpf_rx_queue *rxq;
> +     int err;
> +
> +     if (rx_queue_id >= dev->data->nb_rx_queues)
> +             return -EINVAL;
> +
> +     err = idpf_vc_queue_switch(vport, rx_queue_id, true, false);
> +     if (err != 0) {
> +             PMD_DRV_LOG(ERR, "Failed to switch RX queue %u off",
> +                         rx_queue_id);
> +             return err;
> +     }
> +
> +     rxq = dev->data->rx_queues[rx_queue_id];
> +     if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) {
> +             rxq->ops->release_mbufs(rxq);
> +             idpf_qc_single_rx_queue_reset(rxq);
> +     } else {
> +             rxq->bufq1->ops->release_mbufs(rxq->bufq1);
> +             rxq->bufq2->ops->release_mbufs(rxq->bufq2);

In this patch, queue ops (bufq1->ops) not set yet, it is set in next
patch, switching order with next one may help.

Reply via email to