ethdev: check if queue setup in queue-related APIs
authorWei Hu (Xavier) <xavier.huwei@huawei.com>
Tue, 13 Oct 2020 11:50:54 +0000 (19:50 +0800)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 16 Oct 2020 17:48:17 +0000 (19:48 +0200)
commit83e813ec2a719d8e4c00199acc3f13cb2ad3d838
tree78b6abb1a67d742ff342c9313a6d1ed8f8206c25
parent9b47c352e3d8131f980f973d8c9f399533b2d373
ethdev: check if queue setup in queue-related APIs

This patch adds checking whether the related Tx or Rx queue has been
setup in the queue-related API functions to avoid illegal address
access.

Signed-off-by: Chengchang Tang <tangchengchang@huawei.com>
Signed-off-by: Wei Hu (Xavier) <xavier.huwei@huawei.com>
Signed-off-by: Chengwen Feng <fengchengwen@huawei.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h