Dekel Peled 09ba4c58e5 net/mlx5: fix init with zero Rx queue
Recent patch [1] added, at the end of mlx5_dev_configure(), a call to
mlx5_proc_priv_init(), initializing process_private data of eth_dev.
This call is not reached if PMD is started with zero Rx queues.
In this case mlx5_dev_configure() returns earlier due to the check:
	if (rxqs_n == priv->rxqs_n)
		return 0;
In such a scenario, later references to uninitialized process_private
data will result in segmentation fault.
For example see in function txq_uar_init().

This patch changes the check logic. The following code is executed
if (rxqs_n != priv->rxqs_n), and skipped otherwise.
Function mlx5_proc_priv_init() is always invoked, to ensure
process_private data is initialized.

[1] http://patches.dpdk.org/patch/52629/

Fixes: 120dc4a7dcd3 ("net/mlx5: remove device register remap")
Cc: stable@dpdk.org

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2019-05-08 17:29:31 +02:00
..
2019-05-03 18:45:23 +02:00
2019-05-03 18:45:23 +02:00
2019-05-03 18:45:23 +02:00
2019-05-03 18:45:23 +02:00
2019-05-03 18:45:23 +02:00
2019-03-01 18:17:35 +01:00
2019-04-19 14:51:55 +02:00
2019-03-01 18:17:35 +01:00
2019-05-03 18:45:23 +02:00
2018-11-14 00:35:53 +01:00
2019-05-03 18:45:23 +02:00
2019-05-03 18:45:23 +02:00