ethdev: add a check on mempool during RxQ setup
authorDavid Marchand <david.marchand@redhat.com>
Fri, 17 May 2019 08:15:08 +0000 (10:15 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Thu, 13 Jun 2019 14:54:29 +0000 (23:54 +0900)
commitcd7bb0d442590ece3c493a7df263f7455a79b098
tree20757c707dea6b7f02c4d56b07995e3f37c8f84f
parentef74b5f7b69b9502ddab81121611243efcfe1dde
ethdev: add a check on mempool during RxQ setup

We currently have no check on the mempool pointer passed to
rte_eth_rx_queue_setup.
Let's avoid a plain crash when dereferencing it.

Suggested-by: Jens Freimann <jfreimann@redhat.com>
Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
lib/librte_ethdev/rte_ethdev.c
lib/librte_ethdev/rte_ethdev.h