[dpdk-dev,4/5] net/sfc: add Tx queue flush failed flag for sanity

Message ID 1495871734-12485-4-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Andrew Rybchenko May 27, 2017, 7:55 a.m. UTC
  Avoid usage of flushing state when Tx queue flush init failed.

Fixes: fed9aeb46c19 ("net/sfc: implement transmit path start / stop")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_tx.c | 2 +-
 drivers/net/sfc/sfc_tx.h | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)
  

Patch

diff --git a/drivers/net/sfc/sfc_tx.c b/drivers/net/sfc/sfc_tx.c
index d75fb84..9e426ca 100644
--- a/drivers/net/sfc/sfc_tx.c
+++ b/drivers/net/sfc/sfc_tx.c
@@ -503,7 +503,7 @@  sfc_tx_qstop(struct sfc_adapter *sa, unsigned int sw_index)
 	     (retry_count < SFC_TX_QFLUSH_ATTEMPTS);
 	     ++retry_count) {
 		if (efx_tx_qflush(txq->common) != 0) {
-			txq->state |= SFC_TXQ_FLUSHING;
+			txq->state |= SFC_TXQ_FLUSH_FAILED;
 			break;
 		}
 
diff --git a/drivers/net/sfc/sfc_tx.h b/drivers/net/sfc/sfc_tx.h
index 6c3ac3b..0c1c708 100644
--- a/drivers/net/sfc/sfc_tx.h
+++ b/drivers/net/sfc/sfc_tx.h
@@ -64,6 +64,8 @@  enum sfc_txq_state_bit {
 #define SFC_TXQ_FLUSHING	(1 << SFC_TXQ_FLUSHING_BIT)
 	SFC_TXQ_FLUSHED_BIT,
 #define SFC_TXQ_FLUSHED		(1 << SFC_TXQ_FLUSHED_BIT)
+	SFC_TXQ_FLUSH_FAILED_BIT,
+#define SFC_TXQ_FLUSH_FAILED	(1 << SFC_TXQ_FLUSH_FAILED_BIT)
 };
 
 /**