[dpdk-dev,v2] net/sfc: fix crash on Tx queue release
Checks
Commit Message
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(-)
Comments
On 3/29/2017 5:53 PM, Andrew Rybchenko wrote:
> 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.
In next-net, squashed on top of relevant commit, thanks.
@@ -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);