DPDK patches and discussions
 help / color / mirror / Atom feed
From: David Marchand <david.marchand@redhat.com>
To: dev@dpdk.org
Cc: stable@dpdk.org, Maxime Coquelin <maxime.coquelin@redhat.com>,
	Tiwei Bie <tiwei.bie@intel.com>,
	Zhihong Wang <zhihong.wang@intel.com>
Subject: [dpdk-dev] [PATCH] net/virtio: remove useless check on mempool
Date: Thu,  9 May 2019 10:03:48 +0200	[thread overview]
Message-ID: <1557389028-2462-1-git-send-email-david.marchand@redhat.com> (raw)
Message-ID: <20190509080348.5OxDdXwVB39ntXRv79o8Tz2h03d2BJu6Ev5GvchF2Rw@z> (raw)

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 <david.marchand@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;
-- 
1.8.3.1


             reply	other threads:[~2019-05-09  8:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-09  8:03 David Marchand [this message]
2019-05-09  8:03 ` David Marchand
2019-05-09 13:29 ` Jens Freimann
2019-05-09 13:29   ` Jens Freimann
2019-05-17  8:16   ` David Marchand
2019-05-17 15:08 ` Maxime Coquelin
2019-06-05 12:29 ` Maxime Coquelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1557389028-2462-1-git-send-email-david.marchand@redhat.com \
    --to=david.marchand@redhat.com \
    --cc=dev@dpdk.org \
    --cc=maxime.coquelin@redhat.com \
    --cc=stable@dpdk.org \
    --cc=tiwei.bie@intel.com \
    --cc=zhihong.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).