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 5AA27A046B for ; Fri, 28 Jun 2019 06:26:31 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 0831F559A; Fri, 28 Jun 2019 06:26:31 +0200 (CEST) Received: from mail-pf1-f196.google.com (mail-pf1-f196.google.com [209.85.210.196]) by dpdk.org (Postfix) with ESMTP id 3B6BE4CA6 for ; Fri, 28 Jun 2019 06:26:27 +0200 (CEST) Received: by mail-pf1-f196.google.com with SMTP id t16so2287069pfe.11 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=kTyKy3W6kTPfAbgheYnhmLfT/EyGxat9BWAGBuZBobDM7lpcPDmdy7SYybgZM3Gstv gxf143KyCA1G/+6lpYw8B7IYIy8jE8kY9K04FsKmnhyDfdAP+8BQsnVZhhmT2jCB7oXh JC+Sw8gznv/7LPnzuJHPiJyp4Of+SThbyiKejlT1JE83wCFipqlxcWZKDmCrc5GVMNI0 uIdJUiMat9LmZkhflbwvVfL3AVFMsjWuWUg1bvYilb5oQNswqevLMIMBV8dn45/2bnQ4 5I3PUcTIqgpyrsOqsgMTigj/XC2g3WoWlP8vSaKJS7uMW+BdJB4SMaDSQ/niLezOcnX4 uMpw== X-Gm-Message-State: APjAAAVqldSXuy4x0sZpRqxKFLpgd3Rm6Nq803k2Y2SYjXJF4z5y2ZH8 +Th32hKTEe7xim7/1jsCcxT3xQ== 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-stable] [PATCH v3] net: fix the way how L4 checksum choice is tested X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" 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