DPDK patches and discussions
 help / color / mirror / Atom feed
From: Andrew Rybchenko <arybchenko@solarflare.com>
To: <dev@dpdk.org>
Cc: Ferruh Yigit <ferruh.yigit@intel.com>
Subject: [dpdk-dev] [PATCH v2] net/sfc: fix crash on Tx queue release
Date: Wed, 29 Mar 2017 17:53:55 +0100	[thread overview]
Message-ID: <1490806435-16945-1-git-send-email-arybchenko@solarflare.com> (raw)
In-Reply-To: <1490800132-1833-1-git-send-email-arybchenko@solarflare.com>

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@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

  parent reply	other threads:[~2017-03-29 16:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-29 15:08 [dpdk-dev] [PATCH] " Andrew Rybchenko
2017-03-29 16:25 ` Ferruh Yigit
2017-03-29 16:37   ` Andrew Rybchenko
2017-03-29 16:59     ` Ferruh Yigit
2017-03-29 16:53 ` Andrew Rybchenko [this message]
2017-03-31 12:31   ` [dpdk-dev] [PATCH v2] " Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1490806435-16945-1-git-send-email-arybchenko@solarflare.com \
    --to=arybchenko@solarflare.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).