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 9693CA0553; Sat, 11 Jun 2022 17:34:48 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8C376410EA; Sat, 11 Jun 2022 17:34:48 +0200 (CEST) Received: from mail-pj1-f53.google.com (mail-pj1-f53.google.com [209.85.216.53]) by mails.dpdk.org (Postfix) with ESMTP id 49E55410EA for ; Sat, 11 Jun 2022 17:34:47 +0200 (CEST) Received: by mail-pj1-f53.google.com with SMTP id g10-20020a17090a708a00b001ea8aadd42bso2039871pjk.0 for ; Sat, 11 Jun 2022 08:34:47 -0700 (PDT) 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=YsbEEOotqAUGUxiL8/qW20c7eMym5aNLl4setaDArpc=; b=EiLd04+Fy487+TgxLyU/++tbmv7DPCURI5DTnSt46Rv9hFwP3B7Egwaj8Dq+CVGjfc tcMjOIRcioD1l0pXp+RF8GV+9TR+p9mU9qgyOyqDbApNsn5Z6ZYMToqj2hLNyPCV/tiz 8HrwM30Cwpl7XWnuy05wUrnU2w/BH2yWH3rDvlSIYR0K//QorOJ+80G/YESeYDEhV9cW 5zoV+ifhFlmeBz7GG2+ftmtFjts2lXJ5N/lD2RPTTO7UypHsufAxswhQJ4Qbk7kFI4xS PrPYfTbicXnmD87F6wfEVvVKhkx/Uvov5NnxVOovwUmkbmWvAgIv8FmEk1mOowIDGynq fZmA== 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=YsbEEOotqAUGUxiL8/qW20c7eMym5aNLl4setaDArpc=; b=bYgc08Tqk2mtFxSNvPeSm7XP4jfUamLD03ps5KHJrimb/T6beWakBV8TOwKk+clvHJ KY8OZIBc0G0hME2zsSp4N6hktP3hRy/nqWgQr20wqOeNCWIEwMtBKd0DDvA/gYBr0EKb a0xkXuHi0rRTk/ITXnc5HH9uRmDoeL7SQ90mGTKMoSyEmHVBhOTMRN1lgBEMoizF06vB g6DhiT7+TEJozEEH9FhRXJv/3On08FTmI8WGjeL3b54Uqdtex1fBUt7W+tY+/lcyzvoU I4LeENsk9jy+5JHe7T7IPmD8itHWFS1eLkJ9ZtskxFGx7P63OzU1WtwpmwA/zGHGvh99 vDtA== X-Gm-Message-State: AOAM53309Uesnn/J5rnKvFZvYJjKhQR6ROIam7RrbSGL4p0JdRpxbz0I 9UmoxpwYm4Y0xUIF0jK2Sz2beQ== X-Google-Smtp-Source: ABdhPJxRpnFLbD8gVd6v1SFLjFAyyxdhq50VwFrSvrAxOPLNU0MUtcDV/wke8AxglXx0LUbKqxE0wA== X-Received: by 2002:a17:903:4045:b0:168:b7ca:19b0 with SMTP id n5-20020a170903404500b00168b7ca19b0mr9243753pla.66.1654961686470; Sat, 11 Jun 2022 08:34:46 -0700 (PDT) Received: from hermes.local (204-195-112-199.wavecable.com. [204.195.112.199]) by smtp.gmail.com with ESMTPSA id p11-20020a170903248b00b0015e8d4eb1c8sm1700441plw.18.2022.06.11.08.34.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Jun 2022 08:34:46 -0700 (PDT) Date: Sat, 11 Jun 2022 08:34:43 -0700 From: Stephen Hemminger To: David Marchand Cc: dev@dpdk.org, thomas@monjalon.net, ferruh.yigit@xilinx.com, stable@dpdk.org, Marcin Wojtas , Michal Krawczyk , Shai Brandes , Evgeny Schemeilin , Igor Chauskin Subject: Re: [PATCH 04/12] net/ena: fix build with GCC 12 Message-ID: <20220611083443.0318ee73@hermes.local> In-Reply-To: <20220518101657.1230416-5-david.marchand@redhat.com> References: <20220518101657.1230416-1-david.marchand@redhat.com> <20220518101657.1230416-5-david.marchand@redhat.com> 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 Wed, 18 May 2022 12:16:49 +0200 David Marchand wrote: > GCC 12 raises the following warning: >=20 > In file included from ../lib/mempool/rte_mempool.h:46, > from ../lib/mbuf/rte_mbuf.h:38, > from ../lib/net/rte_ether.h:22, > from ../drivers/net/ena/ena_ethdev.h:10, > from ../drivers/net/ena/ena_rss.c:6: > ../drivers/net/ena/ena_rss.c: In function =E2=80=98ena_rss_key_fill=E2=80= =99: > ../lib/eal/x86/include/rte_memcpy.h:370:9: warning: array subscript 64 is > outside array bounds of =E2=80=98uint8_t[40]=E2=80=99 {aka =E2=80= =98unsigned char[40]=E2=80=99} > [-Warray-bounds] > 370 | rte_mov32((uint8_t *)dst + 2 * 32, (const uint8_t *)src + 2 * 32); > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ../drivers/net/ena/ena_rss.c:51:24: note: while referencing =E2=80=98defa= ult_key=E2=80=99 > 51 | static uint8_t default_key[ENA_HASH_KEY_SIZE]; > | ^~~~~~~~~~~ >=20 > This is a false positive because the copied size is checked against > ENA_HASH_KEY_SIZE in a (build) assert. > Silence this warning by calling memcpy with the minimal size. >=20 > Cc: stable@dpdk.org >=20 > Signed-off-by: David Marchand > --- Acked-by: Stephen Hemminger