From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 01F66A04A5; Fri, 17 Dec 2021 20:19:41 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6F344013F; Fri, 17 Dec 2021 20:19:41 +0100 (CET) Received: from mail-pl1-f171.google.com (mail-pl1-f171.google.com [209.85.214.171]) by mails.dpdk.org (Postfix) with ESMTP id A39E940150 for ; Fri, 17 Dec 2021 20:19:40 +0100 (CET) Received: by mail-pl1-f171.google.com with SMTP id n8so2687523plf.4 for ; Fri, 17 Dec 2021 11:19:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; h=date:from:to:cc:subject:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vemkZTbHHVXZJu0RfYkm0f0KAibepZRii20AekOulU0=; b=5jsjZimhpdyGR4HMbV0HNozPWBadSIURVl0Y+2MploQCY/uQzBkxPaa9m18qOaDtgk AH4qcbSNmCtMQWfwzTA7hDoW4J+8iLZN4cRqQL+aMFn0PoSn0AhfgliWr58kZXsEC0Qs B67oG6Wf2bHNNTmzGDsV0lF050oaVHOraAuDEzH9uF5bot2jTAYU7Sa7ojfmgFe0axVF PZl/GBODrfO3601bKtBDw81MVmDfTxY/mBe90l4bmSuASVpo87LewJKnkXdDI5a6vTCZ fUVpFlB0z2FOs+bp1zm0PjeHw60WkCePBsNp3+gSQcSxtZ87SPR5eeY8KKIZv+NWUpy/ ioLg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vemkZTbHHVXZJu0RfYkm0f0KAibepZRii20AekOulU0=; b=o3rkFkZgekTWivuIUwq8N3pjN10uFEr6J011WzfzK9tJiiJO5idr1QHZdzpZqnnV8A 8Tjkb7xdejh7rPLn//oCxEZSqjYurd0oGpvn96Sfwn44B5svqqwtc0UeYbxmEZhSdLBo OpltExWm99tvPhe2o8AdmLbtreECvA0cK3FtuWS1izDh00ivJ8mQls7FbwEmrJjhhP4l Q2yBWbSBfNGrjuyaF2KtKj0uI5R6ZQghTYcddnoxRraTs5QXboYP6ffiNhEk65m1++CP WqRtetcJXIuVt0ujJRB+zG9J9QXmkIGu8B34gXaGMQSTM1QMBZOw5qtMVzn8W1Vwm/TX Mn+A== X-Gm-Message-State: AOAM531YIFxt9Z51yzCTbex8pxWST7ssPb0noogARXiue3FQOqPS6Ab3 lGeu/ilBSLpYRS9BKwwcXN9uZQ== X-Google-Smtp-Source: ABdhPJzYylgfmp2DVcvGzPYXBiDMQSuQxcLJVA7bJqooUX4ZXZ8FkMsAUPkcmbko8TjVyTKJBMHbgw== X-Received: by 2002:a17:90b:4a05:: with SMTP id kk5mr5484960pjb.142.1639768779682; Fri, 17 Dec 2021 11:19:39 -0800 (PST) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id y20sm382035pfn.165.2021.12.17.11.19.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 17 Dec 2021 11:19:39 -0800 (PST) Date: Fri, 17 Dec 2021 11:19:34 -0800 From: Stephen Hemminger To: Dmitry Kozlyuk Cc: "dev@dpdk.org" Subject: Re: mlx5: unitialized warning Message-ID: <20211217111934.348ec6a3@hermes.local> In-Reply-To: References: <20211217100551.0de71855@hermes.local> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 17 Dec 2021 19:01:31 +0000 Dmitry Kozlyuk wrote: > > Building current main branch with gcc (Debian 10.2.1-6) 10.2.1 20210110 > >=20 > >=20 > > [1843/3131] Compiling C object > > drivers/libtmp_rte_net_mlx5.a.p/net_mlx5_mlx5_flow_meter.c.o > > ../drivers/net/mlx5/mlx5_flow_meter.c: In function > > =E2=80=98mlx5_flow_meter_create=E2=80=99: > > ../drivers/net/mlx5/mlx5_flow_meter.c:1170:33: warning: =E2=80=98legacy= _fm=E2=80=99 may be > > used uninitialized in this function [-Wmaybe-uninitialized] > > 1170 | struct mlx5_legacy_flow_meter *legacy_fm; > > | ^~~~~~~~~ =20 >=20 > Hi Stephen, >=20 > I don't see this warning with gcc 10.3.0 (Ubuntu 10.3.0-1ubuntu1~20.04). > Firstly, I believe it's a false positive: > legacy_fm is initialized and used only when priv->sh->meter_aso_en =3D=3D= false: >=20 > 1237 if (priv->sh->meter_aso_en) { > ... > 1245 } else { > legacy_fm =3D ... > if (legacy_fm =3D=3D NULL) > return ...; > ... > } > ... > 1276 if (!priv->sh->meter_aso_en) > TAILQ_INSERT_TAIL(fms, legacy_fm, next); >=20 > However, even if it's fixed in GCC between 10.2.1 and 10.3.0, > I've seen it with x86_64-w64-mingw32-gcc (GCC) 9.3-win32 20200320 > while working on enabling drivers/*/mlx5 build with GCC, > so a workaround will probably still be needed. It maybe because I was testing with thread santizer enabled and compiler was doing different optimizations.