Skip to content

Commit

Permalink
net/virtio: remove useless check on mempool
Browse files Browse the repository at this point in the history
[ upstream commit 711b07c ]

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: 48cec29 ("net/virtio: move queue configure code to proper place")

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Jens Freimann <jfreimann@redhat.com>
Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com>
  • Loading branch information
david-marchand authored and kevintraynor committed Jun 24, 2019
1 parent a5d1ee7 commit 7bdd00e
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions drivers/net/virtio/virtio_rxtx.c
Original file line number Diff line number Diff line change
Expand Up @@ -573,11 +573,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;
Expand Down

0 comments on commit 7bdd00e

Please sign in to comment.