net/cnxk: fix crash during hotplug detach operation
authorSunil Kumar Kori <skori@marvell.com>
Tue, 29 Mar 2022 10:28:57 +0000 (15:58 +0530)
committerJerin Jacob <jerinj@marvell.com>
Mon, 2 May 2022 17:42:38 +0000 (19:42 +0200)
commitd49bdfcf0db9f03131fa377f959c807524959b35
tree34948f1ae762546e842dcb74976d99c06d5fceed
parent7ae43d883d77c51ab00e4869329803107b9f2425
net/cnxk: fix crash during hotplug detach operation

hot_plug application does not perform any port setup
configuration via rte_eth_dev_configure() API. All the probed
Ethernet ports do not contain any Rx and Tx queues.

While detaching a device via rte_eal_hotplug_remove(), CNXK
driver expects Rx and Tx queues structures populated during
reset of PFC. So application gets crashed as data->rx_queues
and data->tx_queues are NULL.

Fixes: 9544713564f5 ("net/cnxk: support priority flow control")
Cc: stable@dpdk.org
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
drivers/net/cnxk/cnxk_ethdev_ops.c