net/cpfl: reset queue flag when queue is stopped

Message ID 20230316081946.73937-1-beilei.xing@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Qi Zhang
Headers
Series net/cpfl: reset queue flag when queue is stopped |

Checks

Context Check Description
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK
ci/loongarch-compilation success Compilation OK
ci/loongarch-unit-testing success Unit Testing PASS
ci/github-robot: build success github build: passed
ci/iol-broadcom-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-broadcom-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-intel-Functional success Functional Testing PASS
ci/iol-x86_64-compile-testing success Testing PASS
ci/iol-aarch64-compile-testing success Testing PASS
ci/iol-aarch64-unit-testing success Testing PASS
ci/iol-abi-testing success Testing PASS
ci/intel-Testing success Testing PASS
ci/intel-Functional success Functional PASS

Commit Message

Xing, Beilei March 16, 2023, 8:19 a.m. UTC
  From: Beilei Xing <beilei.xing@intel.com>

Reset q_started flag when Rx/Tx queue is stopped.

Fixes: 994670642165 ("net/cpfl: support queue stop")

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
---
 drivers/net/cpfl/cpfl_rxtx.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Qi Zhang March 16, 2023, 10:24 a.m. UTC | #1
> -----Original Message-----
> From: beilei.xing@intel.com <beilei.xing@intel.com>
> Sent: Thursday, March 16, 2023 4:20 PM
> To: Zhang, Yuying <yuying.zhang@intel.com>
> Cc: dev@dpdk.org; Xing, Beilei <beilei.xing@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>
> Subject: [PATCH] net/cpfl: reset queue flag when queue is stopped
> 
> From: Beilei Xing <beilei.xing@intel.com>
> 
> Reset q_started flag when Rx/Tx queue is stopped.
> 
> Fixes: 994670642165 ("net/cpfl: support queue stop")
> 
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> Signed-off-by: Beilei Xing <beilei.xing@intel.com>

Acked-by: Qi Zhang <qi.z.zhang@intel.com>

Applied to dpdk-next-net-intel.

Thanks
Qi
  

Patch

diff --git a/drivers/net/cpfl/cpfl_rxtx.c b/drivers/net/cpfl/cpfl_rxtx.c
index 9e8767df72..de59b31b3d 100644
--- a/drivers/net/cpfl/cpfl_rxtx.c
+++ b/drivers/net/cpfl/cpfl_rxtx.c
@@ -675,6 +675,7 @@  cpfl_rx_queue_stop(struct rte_eth_dev *dev, uint16_t rx_queue_id)
 	}
 
 	rxq = dev->data->rx_queues[rx_queue_id];
+	rxq->q_started = false;
 	if (vport->rxq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) {
 		rxq->ops->release_mbufs(rxq);
 		idpf_qc_single_rx_queue_reset(rxq);
@@ -706,6 +707,7 @@  cpfl_tx_queue_stop(struct rte_eth_dev *dev, uint16_t tx_queue_id)
 	}
 
 	txq = dev->data->tx_queues[tx_queue_id];
+	txq->q_started = false;
 	txq->ops->release_mbufs(txq);
 	if (vport->txq_model == VIRTCHNL2_QUEUE_MODEL_SINGLE) {
 		idpf_qc_single_tx_queue_reset(txq);