[dpdk-dev] [PATCH v2] net/sfc: fix crash on Tx queue release

Andrew Rybchenko arybchenko at solarflare.com
Wed Mar 29 18:53:55 CEST 2017


Datapath TxQ handle is passed to release function, not control path.

Fixes: 19f92f3ec37c ("net/sfc: factor out libefx-based Tx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko at solarflare.com>
---
Please, squash the patch into 19f92f3ec37c.

 drivers/net/sfc/sfc_ethdev.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index b745714..bba8b01 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -485,13 +485,15 @@ sfc_tx_queue_setup(struct rte_eth_dev *dev, uint16_t tx_queue_id,
 static void
 sfc_tx_queue_release(void *queue)
 {
-	struct sfc_txq *txq = queue;
+	struct sfc_dp_txq *dp_txq = queue;
+	struct sfc_txq *txq;
 	unsigned int sw_index;
 	struct sfc_adapter *sa;
 
-	if (txq == NULL)
+	if (dp_txq == NULL)
 		return;
 
+	txq = sfc_txq_by_dp_txq(dp_txq);
 	sw_index = sfc_txq_sw_index(txq);
 
 	SFC_ASSERT(txq->evq != NULL);
-- 
2.9.3



More information about the dev mailing list