From patchwork Tue Oct 27 08:50:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Patrick Fu X-Patchwork-Id: 82281 X-Patchwork-Delegate: maxime.coquelin@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id D06F5A04B5; Tue, 27 Oct 2020 10:02:40 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id B35492BD3; Tue, 27 Oct 2020 10:02:39 +0100 (CET) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id 314312B9D for ; Tue, 27 Oct 2020 10:02:38 +0100 (CET) IronPort-SDR: rj5vWDeXCAUG5Emlm3PfbelV0jg9bxI81Vk5GR/kHY1IliXEjOH/ww+ZnH6ftASLTp4wbYybc4 xs7AJH2OKRtg== X-IronPort-AV: E=McAfee;i="6000,8403,9786"; a="185787224" X-IronPort-AV: E=Sophos;i="5.77,423,1596524400"; d="scan'208";a="185787224" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by fmsmga101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Oct 2020 02:02:36 -0700 IronPort-SDR: oAuThWJmPpkioLkYYu5lLQbPfOj5CMNK+TLQGR0n7QeWCRFMHNIyCMO046/QFXNha9ye1IX6Zi gVn3ehvW3TKg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,423,1596524400"; d="scan'208";a="524618667" Received: from npg-dpdk-patrickfu-casc2.sh.intel.com ([10.67.119.92]) by fmsmga006.fm.intel.com with ESMTP; 27 Oct 2020 02:02:35 -0700 From: Patrick Fu To: dev@dpdk.org, maxime.coquelin@redhat.com, chenbo.xia@intel.com Cc: patrick.fu@intel.com Date: Tue, 27 Oct 2020 16:50:19 +0800 Message-Id: <20201027085019.4146312-1-patrick.fu@intel.com> X-Mailer: git-send-email 2.18.4 Subject: [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" 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 Reviewed-by: Maxime Coquelin --- 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;