[dpdk-stable] [PATCH] net/virtio: remove useless check on mempool

Maxime Coquelin maxime.coquelin at redhat.com
Fri May 17 17:08:50 CEST 2019



On 5/9/19 10:03 AM, David Marchand wrote:
> 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 at dpdk.org
> 
> Signed-off-by: David Marchand <david.marchand at redhat.com>
> ---
>   drivers/net/virtio/virtio_rxtx.c | 5 -----
>   1 file changed, 5 deletions(-)
> 
> diff --git a/drivers/net/virtio/virtio_rxtx.c b/drivers/net/virtio/virtio_rxtx.c
> index 8c56f23..4f44360 100644
> --- a/drivers/net/virtio/virtio_rxtx.c
> +++ b/drivers/net/virtio/virtio_rxtx.c
> @@ -889,11 +889,6 @@
>   	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;
> 

Reviewed-by: Maxime Coquelin <maxime.coquelin at redhat.com>

Thanks,
Maxime


More information about the stable mailing list