From patchwork Thu Jul 26 01:37:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tiwei Bie X-Patchwork-Id: 43391 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B3B083250; Thu, 26 Jul 2018 03:38:24 +0200 (CEST) Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) by dpdk.org (Postfix) with ESMTP id C0F1E1C01; Thu, 26 Jul 2018 03:38:21 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Jul 2018 18:38:19 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,403,1526367600"; d="scan'208";a="67576600" Received: from debian.sh.intel.com ([10.67.104.228]) by FMSMGA003.fm.intel.com with ESMTP; 25 Jul 2018 18:38:03 -0700 From: Tiwei Bie To: maxime.coquelin@redhat.com, zhihong.wang@intel.com, dev@dpdk.org Cc: lei.a.yao@intel.com, stable@dpdk.org Date: Thu, 26 Jul 2018 09:37:21 +0800 Message-Id: <20180726013721.30200-2-tiwei.bie@intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180726013721.30200-1-tiwei.bie@intel.com> References: <20180726013721.30200-1-tiwei.bie@intel.com> Subject: [dpdk-dev] [PATCH 2/2] vhost: release the locks when failed to make RARP packet X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Fixes: eefac9536a90 ("vhost: postpone device creation until rings are mapped") Cc: stable@dpdk.org Signed-off-by: Tiwei Bie Reviewed-by: Jens Freimann --- lib/librte_vhost/virtio_net.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c index 3b11b353c..b02651275 100644 --- a/lib/librte_vhost/virtio_net.c +++ b/lib/librte_vhost/virtio_net.c @@ -1626,7 +1626,8 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, if (rarp_mbuf == NULL) { RTE_LOG(ERR, VHOST_DATA, "Failed to make RARP packet.\n"); - return 0; + count = 0; + goto out; } count -= 1; }