]> git.droids-corp.org - dpdk.git/commitdiff
net/mlx5: fix Tx queue completion on stop
authorViacheslav Ovsiienko <viacheslavo@nvidia.com>
Fri, 6 Nov 2020 16:58:03 +0000 (16:58 +0000)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 13 Nov 2020 18:43:25 +0000 (19:43 +0100)
The Tx queue completion production index was not reset
on Tx queue stop and there were completions remaining
from the previous queue run. This caused the wrong
completion queue operating and overall Tx queue malfunction
on queue restart.

Fixes: 161d103b231c ("net/mlx5: add queue start and stop")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
drivers/net/mlx5/mlx5_txq.c

index faf4e4549b2bc758d863edc593b9fe7349487ad9..d96abef8835146b8863bd093ea3699400ec06e7b 100644 (file)
@@ -154,6 +154,7 @@ txq_sync_cq(struct mlx5_txq_data *txq)
        /* Resync CQE and WQE (WQ in reset state). */
        rte_io_wmb();
        *txq->cq_db = rte_cpu_to_be_32(txq->cq_ci);
+       txq->cq_pi = txq->cq_ci;
        rte_io_wmb();
 }