net/mlx5: fix crash when setting hairpin queues
authorTonghao Zhang <xiangxia.m.yue@gmail.com>
Wed, 27 Nov 2019 14:18:41 +0000 (22:18 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 17 Jan 2020 18:45:23 +0000 (19:45 +0100)
commitbf864e820558a8b001d5de6be437456e82ac3c81
tree2c4562d64e44c0dcb83548e12a0e98b773b8992b
parentddc7cb0d9453e0c0601a01eab1f388eae4c1fb65
net/mlx5: fix crash when setting hairpin queues

If configuring the number of tx/rx queue with rte_eth_dev_configure
to nr_queues + hairpin_nr_queues, and setting tx/rx queues to
nr_queues with rte_eth_tx/rx_queue_setup. But not configuring the
hairpin queues via rte_eth_tx/rx_hairpin_queue_setup.

When starting the netdev, there is a crash because of NULL accessing.

Fixes: cf5516696d77 ("ethdev: add hairpin queue")
Cc: stable@dpdk.org
Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Acked-by: Ori Kam <orika@mellanox.com>
drivers/net/mlx5/mlx5_ethdev.c
drivers/net/mlx5/mlx5_trigger.c