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 2E69DA046B for ; Fri, 28 Jun 2019 06:26:30 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 94E964CA6; Fri, 28 Jun 2019 06:26:28 +0200 (CEST) Received: from mail-pg1-f195.google.com (mail-pg1-f195.google.com [209.85.215.195]) by dpdk.org (Postfix) with ESMTP id 389D14C93 for ; Fri, 28 Jun 2019 06:26:27 +0200 (CEST) Received: by mail-pg1-f195.google.com with SMTP id p10so2007946pgn.1 for ; Thu, 27 Jun 2019 21:26:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f+6PKN8/qdA4VtTPFUCPCU9xGWKW9HHpuYj00NTbCwU=; b=wjJE3Fdct99ur/t3wAdGzWciPyqE8o10WguV9VzjkXwgNktcIvy7oDQnscyKQJv5DW w9VAK3ZcIxpt4UadzTb4NYQcmZzZlJ+DG6iMrymDFQt/xfiPDeTGUSqVSPAK0tShrERQ q4kdwhgOAmhp2kS7ob278xzxFecsyKrYo34Jdd7XZGUUoES/gXPYgk+LQ5UDVkuKEcv7 ZSZUac6nc7WUmLfleoeaWc+kNYIZmtGehL7aKb8CDtjgfaAT4jy/Wr9dHV3RJbL+iDSO lb0S0bwawB58nEBjiQ+ccvPUDzpRNwu2w89ZS2VnUou5EfK1Ti0HQDy1y269wn22DpRi hEWg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=f+6PKN8/qdA4VtTPFUCPCU9xGWKW9HHpuYj00NTbCwU=; b=Og3SPG/5K9aLT8r279z7qYuWLZPMVo2w3beKNolBLZkGO6Xk20jQaG5iZDIq8KDuIZ H0qR2RjMY1LOk6t09cD2wSo2wGvczwRZ08i01v5UJb7EiMhYyp/Z9NviszvJom5e/wnC hSYt5iuhCCNNXoGkADLmdRjwo28toZE93lOcqmhIfPAHsMdYTnZcrir0eB6EXee2SJvs tptdTPMVaaDSsekx/x4Mk5CHD3BEPKTaCnVUF5d6A8QQoixccBpnwj0OkMvqMFAb9pN6 OlV+s8MnwKb8mUJ+woWiKjJEVjfsqS0sArfHePItkQC82SrccMNJu5A6apE2T10k4uvj TsxA== X-Gm-Message-State: APjAAAWjel0Bgp+RZiiG8OILdmveQcxTAYTARd3V0MaGeLRLuNTIp1GA O0q4ZPvdMsUUdhN5+M9OKZRAHw== X-Google-Smtp-Source: APXvYqxusW3LC4BX0f/USmS9Dftcp0PxundpcuqV1klmWPR55Yd8jNZuS1i4O5hQOf4xl+djIELH8w== X-Received: by 2002:a65:5b43:: with SMTP id y3mr7276947pgr.346.1561695985953; Thu, 27 Jun 2019 21:26:25 -0700 (PDT) Received: from hermes.lan (204-195-22-127.wavecable.com. [204.195.22.127]) by smtp.gmail.com with ESMTPSA id k6sm670559pfi.12.2019.06.27.21.26.25 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Thu, 27 Jun 2019 21:26:25 -0700 (PDT) Date: Thu, 27 Jun 2019 21:26:18 -0700 From: Stephen Hemminger To: Ivan Malov Cc: Olivier Matz , dev@dpdk.org, "Ananyev, Konstantin" , Andrew Rybchenko , Tomasz Kulasek , stable@dpdk.org Message-ID: <20190627212618.4fb293eb@hermes.lan> In-Reply-To: <20190628031309.24215-1-ivan.malov@oktetlabs.ru> References: <20190529173337.31157-1-ivan.malov@oktetlabs.ru> <20190628031309.24215-1-ivan.malov@oktetlabs.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Subject: Re: [dpdk-dev] [PATCH v3] net: fix the way how L4 checksum choice is tested 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 Fri, 28 Jun 2019 06:13:09 +0300 Ivan Malov wrote: > The API to prepare checksum offloads mistreats L4 > checksum type enum values as self-contained flags. > > Turning these flag checks into enum checks causes > warnings by GCC about possibly uninitialised IPv4 > header pointer. The issue was found to show up in > the case of GCC versions 4.8.5 and 5.4.0, however, > it might be the case for a wider variety of other > versions. Initialise the pointer upon declaration. > and explain the reason behind this in the comment. > > Fixes: 4fb7e803eb1a ("ethdev: add Tx preparation") > Cc: Tomasz Kulasek > Cc: stable@dpdk.org > > Signed-off-by: Ivan Malov > Reviewed-by: Andrew Rybchenko > --- > lib/librte_net/rte_net.h | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > > diff --git a/lib/librte_net/rte_net.h b/lib/librte_net/rte_net.h > index 7be69f8..d240206 100644 > --- a/lib/librte_net/rte_net.h > +++ b/lib/librte_net/rte_net.h > @@ -112,7 +112,8 @@ uint32_t rte_net_get_ptype(const struct rte_mbuf *m, > static inline int > rte_net_intel_cksum_flags_prepare(struct rte_mbuf *m, uint64_t ol_flags) > { > - struct rte_ipv4_hdr *ipv4_hdr; > + /* Initialise ipv4_hdr to avoid false positive compiler warnings. */ > + struct rte_ipv4_hdr *ipv4_hdr = NULL; > struct rte_ipv6_hdr *ipv6_hdr; Looks good, a smart compiler will just drop it. Acked-by: Stephen Hemminger