From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1D855A04DD; Wed, 28 Oct 2020 12:19:17 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 82CDFCB79; Wed, 28 Oct 2020 12:19:15 +0100 (CET) Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [216.205.24.124]) by dpdk.org (Postfix) with ESMTP id 60975CB4A for ; Wed, 28 Oct 2020 12:19:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1603883952; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=m/PY22xrypEYTGJs97Aay6oLmmh1QRZ1poHeP/Q91PA=; b=I+/BTmVhbV17aoaDXKutZyXew8cVci7JNvqRX2kMg1TFqtUL7dfddkhKHqLfWZMAZyupwI SJ92VupJ5htLoWuTfqWtws283Y1220B4uohJAgPwcWmizXkYDehpYhWVGgdyt3i9EToH48 1kUalOavPepgfkzTsjJtXMpPiTRztMM= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-169-zuOgUNAbO_mDSiOAK90Xjg-1; Wed, 28 Oct 2020 07:19:09 -0400 X-MC-Unique: zuOgUNAbO_mDSiOAK90Xjg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id D5DEB800C60; Wed, 28 Oct 2020 11:19:07 +0000 (UTC) Received: from [10.36.110.54] (unknown [10.36.110.54]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 0626E6266E; Wed, 28 Oct 2020 11:19:06 +0000 (UTC) To: Patrick Fu , dev@dpdk.org, chenbo.xia@intel.com References: <20201027085019.4146312-1-patrick.fu@intel.com> From: Maxime Coquelin Message-ID: <12b55520-474d-a356-f43e-ce34f2194209@redhat.com> Date: Wed, 28 Oct 2020 12:19:04 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.3.1 MIME-Version: 1.0 In-Reply-To: <20201027085019.4146312-1-patrick.fu@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=maxime.coquelin@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v1] vhost: fix uninitialized local variable 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" On 10/27/20 9:50 AM, Patrick Fu wrote: > This patch initializes a local parameter in async data path to avoid > compiler warnings. > > Fixes: cd6760da1076 ("vhost: introduce async enqueue for split ring") > > Signed-off-by: Patrick Fu > --- > lib/librte_vhost/virtio_net.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_vhost/virtio_net.c b/lib/librte_vhost/virtio_net.c > index 030795645..10dec5e54 100644 > --- a/lib/librte_vhost/virtio_net.c > +++ b/lib/librte_vhost/virtio_net.c > @@ -1491,7 +1491,7 @@ virtio_dev_rx_async_submit_split(struct virtio_net *dev, > struct iovec *dst_iovec = vec_pool + (VHOST_MAX_ASYNC_VEC >> 1); > struct rte_vhost_iov_iter *src_it = it_pool; > struct rte_vhost_iov_iter *dst_it = it_pool + 1; > - uint16_t n_free_slot, slot_idx; > + uint16_t n_free_slot, slot_idx = 0; > uint16_t pkt_err = 0; > uint16_t segs_await = 0; > struct async_inflight_info *pkts_info = vq->async_pkts_info; > Reviewed-by: Maxime Coquelin Thanks, Maxime