ethdev: check if queue setup when getting queue info
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Mon, 24 Aug 2020 11:01:30 +0000 (19:01 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 18 Sep 2020 16:55:06 +0000 (18:55 +0200)
commitba2fb4f022fc29b838a64778e520c32ea724ccdc
treeac5895a06a00ac882ef5e315deef629bd3b853d6
parent091a0f95b5cd7f1159a6b23ac8fda97b53088b06
ethdev: check if queue setup when getting queue info

This patch adds checking whether the related Tx or Rx queue has been
setup in the rte_eth_rx_queue_info_get and rte_eth_tx_queue_info_get
API function to avoid illegal address access.

Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ethdev/rte_ethdev.c