From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id BEEAEA0096 for ; Thu, 9 May 2019 10:07:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 9C6364CA0; Thu, 9 May 2019 10:07:26 +0200 (CEST) Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by dpdk.org (Postfix) with ESMTP id 268922082; Thu, 9 May 2019 10:07:23 +0200 (CEST) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 74415307EA8F; Thu, 9 May 2019 08:07:22 +0000 (UTC) Received: from dmarchan.remote.csb (unknown [10.40.205.200]) by smtp.corp.redhat.com (Postfix) with ESMTP id AA93C600C5; Thu, 9 May 2019 08:07:18 +0000 (UTC) From: David Marchand To: dev@dpdk.org Cc: stable@dpdk.org, Maxime Coquelin , Tiwei Bie , Zhihong Wang Date: Thu, 9 May 2019 10:03:48 +0200 Message-Id: <1557389028-2462-1-git-send-email-david.marchand@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Thu, 09 May 2019 08:07:22 +0000 (UTC) Subject: [dpdk-stable] [PATCH] net/virtio: remove useless check on mempool X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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 --- 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; -- 1.8.3.1