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 7AFEAA0352; Mon, 4 Nov 2019 15:06:05 +0100 (CET) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE1FA37A2; Mon, 4 Nov 2019 15:06:04 +0100 (CET) Received: from mail-lf1-f67.google.com (mail-lf1-f67.google.com [209.85.167.67]) by dpdk.org (Postfix) with ESMTP id 0FBAE378E for ; Mon, 4 Nov 2019 15:06:03 +0100 (CET) Received: by mail-lf1-f67.google.com with SMTP id j14so12334819lfb.8 for ; Mon, 04 Nov 2019 06:06:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=XVIAPob3XWLppzsgKgamPusIy9JZn4LNLEwvnVNfyB4=; b=xaKY5TtOfCSkT1INJ389JT7JhCS4pIEBiput8CPSFhlYL2jFCal4U1ZYyzrDnT0sA5 twZcQ7RyIMoPpuS35D3W5NEPRgrJco7K2oDNENRGg9UXLax2l3YYeAlekx6XILRKpHTD Ey3Vy0d91yMAi7UpgDqJmKnbTlOWkVYwAPT8wyTbxyQU0POmpanRu6+HBT6iNbJ8EvNh fRq10LtTQHNjcMQMog7iVx2VOQZD11q3NeD2rDadrKwD8kVl0tcjLXmlbsbdnDg6BjjB 3GBc/XJMSE86rsVbm9zHdeLfdZ0s9IB0+1ZPQZLToW4QezMqdZ06AHx7ovo4CyiPuqQA eIfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=XVIAPob3XWLppzsgKgamPusIy9JZn4LNLEwvnVNfyB4=; b=Oj5B8RV3hx0j5rvO6XFbX2r8mr+gqoerw1QQUM5QY99lgmjLchmRR/dcSVJ8TNW8AU ZHfbk3GychSnb1ZEOSWrwqZUt3R/Gn5MXkF5g0DsLTu5JXXHd+drU03zjwq4Y08Swuik sKXX2C+FWOL0+l2eN2q0JvIVakb5KtSoGJrKk48FzhyGbHENrgmIgTIE6mePJuE3vrlf CqzFbLHSPfIGgAiHKWooQarN9XpzXAWb7ZCrojm2EO5hikDCuDJmqnEHRi9ut63CYOOc RjOBDN6vkTFNa9fRNF71P4OJi/YFLEic1tMXHEkwfsjD/la6SoyFfyo7Q29BEwtawxHh HEug== X-Gm-Message-State: APjAAAXeNtOdf1AvTXXfxGmx8uBR8oDG1AeN/59cgvWX3Kjvn2fq6Fq8 Wp3yypIOE0+AnOyj++SyPsIfsw== X-Google-Smtp-Source: APXvYqzHlQ1/FC6u451DFAxihvfERVsARxrj495/oeCfZt8l1hDCO8efnOvAMaVTS/ihQ5wHBFwGnQ== X-Received: by 2002:a19:6d19:: with SMTP id i25mr16961649lfc.178.1572876362519; Mon, 04 Nov 2019 06:06:02 -0800 (PST) Received: from [10.0.0.72] (31-172-191-173.noc.fibertech.net.pl. [31.172.191.173]) by smtp.gmail.com with ESMTPSA id e27sm8121069lfb.79.2019.11.04.06.06.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 04 Nov 2019 06:06:01 -0800 (PST) To: "Xing, Beilei" , "dev@dpdk.org" , "Zhang, Qi Z" Cc: "mattias.ronnblom@ericsson.com" , "stephen@networkplumber.org" References: <20191028142145.3758-1-aostruszka@marvell.com> <20191029141212.4907-1-aostruszka@marvell.com> <20191029141212.4907-11-aostruszka@marvell.com> <94479800C636CB44BD422CB454846E013CE7E959@SHSMSX101.ccr.corp.intel.com> From: Andrzej Ostruszka Message-ID: Date: Mon, 4 Nov 2019 15:06:01 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.9.0 MIME-Version: 1.0 In-Reply-To: <94479800C636CB44BD422CB454846E013CE7E959@SHSMSX101.ccr.corp.intel.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 8bit Subject: Re: [dpdk-dev] [PATCH v6 10/12] net/i40e: clean LTO build warnings (maybe-uninitialized) 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" Beilei Thank you for the comment, please see below. On 11/1/19 3:05 AM, Xing, Beilei wrote: >> -----Original Message----- >> From: Andrzej Ostruszka [mailto:aostruszka@marvell.com] [...] >> Subject: [PATCH v6 10/12] net/i40e: clean LTO build warnings (maybe- >> uninitialized) >> >> During LTO build compiler reports some 'false positive' warnings about >> variables being possibly used uninitialized. This patch silences these warnings. >> >> Exemplary compiler warning to suppress (with LTO enabled): >> error: ‘filter_idx’ may be used uninitialized in this function [-Werror=maybe- >> uninitialized] >> PMD_DRV_LOG(INFO, "Added port %d with AQ command with index %d", > > Hi, > > Thanks for the patch. Please also add fix line here and Cc stable. Are you saying that there is actually a problem in the code? IMHO the code is fine and this patch just prevents gcc from issuing a false warning. What I think is going on is that gcc looks into i40e_aq_add_udp_tunnel() and sees that filter_idx is updated under condition "if (!status ..." and figures out that if status is positive then filter_idx could be used uninitialized because in the calling function we test "if (ret < 0)". However it fails to take into account the actual enum definition (only non-positive values) and the implementation of i40e_asq_send_command(). So, if this is only work-around for the gcc deficiency, then I would prefer to not add any fixline and to not pull that patch into stable. Please let me know what you think. Regards Andrzej