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 048D1A0093 for ; Fri, 11 Mar 2022 10:11:13 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EC19240042; Fri, 11 Mar 2022 10:11:12 +0100 (CET) Received: from smtp-relay-internal-1.canonical.com (smtp-relay-internal-1.canonical.com [185.125.188.123]) by mails.dpdk.org (Postfix) with ESMTP id DB5FF40042 for ; Fri, 11 Mar 2022 10:11:11 +0100 (CET) Received: from mail-qt1-f200.google.com (mail-qt1-f200.google.com [209.85.160.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id A3D993F1F6 for ; Fri, 11 Mar 2022 09:11:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1646989871; bh=KKmB9Kn7G7/4BdsfU1EB0k6qs7DqX/fNZDTpx26o9OE=; h=MIME-Version:References:In-Reply-To:From:Date:Message-ID:Subject: To:Cc:Content-Type; b=u+oNgAlm04IKbWchnltfqJWz+khoFyjAVsIQErdbr3QEwDtcNZ//CTb8oBfIXlBw4 Qu2IJ/4c+9HFH+Tz8STKYtnvoHqMLMKgqnaljwmwZcdgVVmhKFPjysgg2pJmC7PEYl AGX/ZcflSiJzySumgUFUcoRBSMOFBB1NeOH22Y5HyZxahVNJlqgdjwWDwV4GQg8+kC Q6QhUocI0ZFS1aY3Lh1BhS/pZIkJe3hq0L8d4A7CVP8Os5v+pi53r6bIzvUakN8sZg OlbeOUFy90lxKcuwyOMrIbe3tqzuiI+eDihjJc2h7Ch8L3iiRsMwKtpC5bYMu+lhTA KDTqC32mZOtWQ== Received: by mail-qt1-f200.google.com with SMTP id b17-20020ac85bd1000000b002dd92bd20e4so6122837qtb.3 for ; Fri, 11 Mar 2022 01:11:11 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=KKmB9Kn7G7/4BdsfU1EB0k6qs7DqX/fNZDTpx26o9OE=; b=WKECvHAmO1bLr7C1wTZ2wdw4HAZ33Akm/bVrlk8x7DUmjMgrH9q/67Z30UCyudItES jyFi6YBshA89H8g/ZHb1utfFVJWP59pDtvXurx59fDGdEVhN70E9+x3Q1WPPFZJNYYQK Z6uwcef4gvkH0Dr456ZyWA5SEDhFPZ82xLUz7oeFzIW0E+pMFtlncpOQmD8p+7o9T6kf 8YIMmx7YmKWOXCG/C8jGbBMvOSN+PwPhCx1ShXSqP121ooymyoQaLFY/erE0fWSrIpxI IzWZ4TBZAc39IHVEJthHlzkK5kls+pNw3pawPnQ6tVQ3tuWKhJ0tXj0UyswyrO/QwJEb Lwxw== X-Gm-Message-State: AOAM533FOkbX6g7jFwRqxwptl/7Wa6geS4ywEGhZdJlbgGKimNUJaCqU H1HopPQmQhtYLlemeQ68jXA9siExSkW/ygev/JZjNH+lDrVZimpdKN4eu2B85VEqYoH/wG/12kg EGZnZWUHPtcwp0ft0Me5zq6twjcMHa0aql2pMIZeC X-Received: by 2002:ac8:5d89:0:b0:2df:f357:c681 with SMTP id d9-20020ac85d89000000b002dff357c681mr7243254qtx.475.1646989870509; Fri, 11 Mar 2022 01:11:10 -0800 (PST) X-Google-Smtp-Source: ABdhPJxtcpwKtp3mZ/4ZkzbqWbS60iIEDjm98nNnZYXpruldSPUBKzBgoFdnx76CsaY6ObeHe8WNTv3kuLiIihIBnG4= X-Received: by 2002:ac8:5d89:0:b0:2df:f357:c681 with SMTP id d9-20020ac85d89000000b002dff357c681mr7243244qtx.475.1646989870298; Fri, 11 Mar 2022 01:11:10 -0800 (PST) MIME-Version: 1.0 References: <20220310162030.1401977-1-pablo.de.lara.guarch@intel.com> In-Reply-To: <20220310162030.1401977-1-pablo.de.lara.guarch@intel.com> From: Christian Ehrhardt Date: Fri, 11 Mar 2022 10:10:44 +0100 Message-ID: Subject: Re: [PATCH 19.11] efd: fix uninitialized structure To: Pablo de Lara Cc: stable@dpdk.org, Yipeng Wang Content-Type: text/plain; charset="UTF-8" X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 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 On Thu, Mar 10, 2022 at 5:20 PM Pablo de Lara wrote: > > [ upstream commit ecda2c40ac549f2ebd1e8be6bf0a96c4aba6bf36 ] Hi Pablo, with that patch applied several Distributions start to fail to build 19.11 due to centos7/8 [ 94s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c: In function 'rte_efd_update': [ 94s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c:1164:9: error: missing initializer for field 'lookup_table' of 'struct efd_online_group_entry' [-Werror=missing-field-initializers] [ 94s] struct efd_online_group_entry entry = {{0}}; [ 94s] ^ [ 94s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c:209:18: note: 'lookup_table' declared here [ 94s] efd_lookuptbl_t lookup_table[RTE_EFD_VALUE_NUM_BITS]; [ 94s] ^ [ 94s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c: At top level: [ 94s] cc1: error: unrecognized command line option "-Wno-address-of-packed-member" [-Werror] sles* [ 106s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c: In function 'rte_efd_update': [ 107s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c:1164:9: error: missing initializer for field 'lookup_table' of 'struct efd_online_group_entry' [-Werror=missing-field-initializers] [ 107s] struct efd_online_group_entry entry = {{0}}; [ 107s] ^ [ 107s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c:209:18: note: 'lookup_table' declared here [ 107s] efd_lookuptbl_t lookup_table[RTE_EFD_VALUE_NUM_BITS]; [ 107s] ^ [ 107s] /home/abuild/rpmbuild/BUILD/dpdk-1646987223.0afaa4b41/lib/librte_efd/rte_efd.c: At top level: [ 107s] cc1: error: unrecognized command line option "-Wno-address-of-packed-member" [-Werror] [ 107s] cc1: all warnings being treated as errors ... Therefore I unapplied your change after trying it ... > Coverity flags that both elements of efd_online_group_entry > are used uninitialized. This is OK because this structure > is initially used for starting values, so any value is OK. > > Coverity ID: 375868 > Fixes: 56b6ef874f80 ("efd: new Elastic Flow Distributor library") > Cc: stable@dpdk.org > > Signed-off-by: Pablo de Lara > Acked-by: Yipeng Wang > --- > lib/librte_efd/rte_efd.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/lib/librte_efd/rte_efd.c b/lib/librte_efd/rte_efd.c > index 3fd1f1c97b..4cbe5380d1 100644 > --- a/lib/librte_efd/rte_efd.c > +++ b/lib/librte_efd/rte_efd.c > @@ -1161,7 +1161,7 @@ rte_efd_update(struct rte_efd_table * const table, const unsigned int socket_id, > { > uint32_t chunk_id = 0, group_id = 0, bin_id = 0; > uint8_t new_bin_choice = 0; > - struct efd_online_group_entry entry; > + struct efd_online_group_entry entry = {{0}}; > > int status = efd_compute_update(table, socket_id, key, value, > &chunk_id, &group_id, &bin_id, > -- > 2.25.1 > -- Christian Ehrhardt Staff Engineer, Ubuntu Server Canonical Ltd