From: Viacheslav Ovsiienko Date: Fri, 6 Nov 2020 16:58:03 +0000 (+0000) Subject: net/mlx5: fix Tx queue completion on stop X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=27b095072b8c8d2dd39dd42923aa631e3ee95942;p=dpdk.git net/mlx5: fix Tx queue completion on stop 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 Acked-by: Matan Azrad --- diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c index faf4e4549b..d96abef883 100644 --- a/drivers/net/mlx5/mlx5_txq.c +++ b/drivers/net/mlx5/mlx5_txq.c @@ -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(); }