[dpdk-dev] [PATCH] net/mlx5: fix Tx queue completions on stop
    Viacheslav Ovsiienko 
    viacheslavo at nvidia.com
       
    Fri Nov  6 17:58:03 CET 2020
    
    
  
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 at dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo at nvidia.com>
---
 drivers/net/mlx5/mlx5_txq.c | 1 +
 1 file changed, 1 insertion(+)
diff --git a/drivers/net/mlx5/mlx5_txq.c b/drivers/net/mlx5/mlx5_txq.c
index faf4e45..d96abef 100644
--- a/drivers/net/mlx5/mlx5_txq.c
+++ b/drivers/net/mlx5/mlx5_txq.c
@@ -154,6 +154,7 @@
 	/* 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();
 }
 
-- 
1.8.3.1
    
    
More information about the dev
mailing list