net/mlx5: fix Multi-Packet RQ mempool free
authorYongseok Koh <yskoh@mellanox.com>
Wed, 12 Dec 2018 11:11:32 +0000 (03:11 -0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 21 Dec 2018 15:22:41 +0000 (16:22 +0100)
When MPRQ mempool is freed, the pointer stored in priv structure must be
reset to null. Otherwise, the mempool can be freed again if the port is
restarted.

Fixes: 7d6bf6b866b8 ("net/mlx5: add Multi-Packet Rx support")
Cc: stable@dpdk.org
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
drivers/net/mlx5/mlx5_rxq.c

index 183da0e..34c8338 100644 (file)
@@ -1179,6 +1179,7 @@ mlx5_mprq_free_mp(struct rte_eth_dev *dev)
                        continue;
                rxq->mprq_mp = NULL;
        }
+       priv->mprq_mp = NULL;
        return 0;
 }