Skip to content

Commit

Permalink
net/dpaa: fix event queue detach
Browse files Browse the repository at this point in the history
[ upstream commit ee6647e ]

Calling the correct qman queue free APIs to de-attach the queue.

Fixes: 5e74559 ("net/dpaa: support Rx queue configurations with eventdev")

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
  • Loading branch information
Gagandeep Singh authored and kevintraynor committed May 24, 2022
1 parent d24d639 commit 82ccc27
Showing 1 changed file with 4 additions and 10 deletions.
14 changes: 4 additions & 10 deletions drivers/net/dpaa/dpaa_ethdev.c
Expand Up @@ -1201,23 +1201,17 @@ int
dpaa_eth_eventq_detach(const struct rte_eth_dev *dev,
int eth_rx_queue_id)
{
struct qm_mcc_initfq opts;
struct qm_mcc_initfq opts = {0};
int ret;
u32 flags = 0;
struct dpaa_if *dpaa_intf = dev->data->dev_private;
struct qman_fq *rxq = &dpaa_intf->rx_queues[eth_rx_queue_id];

dpaa_poll_queue_default_config(&opts);

if (dpaa_intf->cgr_rx) {
opts.we_mask |= QM_INITFQ_WE_CGID;
opts.fqd.cgid = dpaa_intf->cgr_rx[eth_rx_queue_id].cgrid;
opts.fqd.fq_ctrl |= QM_FQCTRL_CGE;
}

qman_retire_fq(rxq, NULL);
qman_oos_fq(rxq);
ret = qman_init_fq(rxq, flags, &opts);
if (ret) {
DPAA_PMD_ERR("init rx fqid %d failed with ret: %d",
DPAA_PMD_ERR("detach rx fqid %d failed with ret: %d",
rxq->fqid, ret);
}

Expand Down

0 comments on commit 82ccc27

Please sign in to comment.