From: David Marchand Date: Thu, 9 May 2019 08:03:48 +0000 (+0200) Subject: net/virtio: remove useless check on mempool X-Git-Url: http://git.droids-corp.org/?a=commitdiff_plain;h=711b07ce6e2d6b2ac674fad909b5e2f7249bc7a3;p=dpdk.git net/virtio: remove useless check on mempool This .rx_queue_setup devop is called after ethdev already dereferenced the mempool pointer. No need to check and we can remove this rte_exit. Fixes: 48cec290a3d2 ("net/virtio: move queue configure code to proper place") Cc: stable@dpdk.org Signed-off-by: David Marchand Reviewed-by: Jens Freimann Reviewed-by: Maxime Coquelin --- diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c index 1de28540cd..4333c10a99 100644 --- a/drivers/net/virtio/virtio_rxtx.c +++ b/drivers/net/virtio/virtio_rxtx.c @@ -890,11 +890,6 @@ virtio_dev_rx_queue_setup(struct rte_eth_dev *dev, rxvq = &vq->rxq; rxvq->queue_id = queue_idx; rxvq->mpool = mp; - if (rxvq->mpool == NULL) { - rte_exit(EXIT_FAILURE, - "Cannot allocate mbufs for rx virtqueue"); - } - dev->data->rx_queues[queue_idx] = rxvq; return 0;