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 2A7E9A00C3; Fri, 15 May 2020 10:28:49 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id D55421DA7A; Fri, 15 May 2020 10:28:48 +0200 (CEST) Received: from us-smtp-delivery-1.mimecast.com (us-smtp-2.mimecast.com [205.139.110.61]) by dpdk.org (Postfix) with ESMTP id 472091DA7B for ; Fri, 15 May 2020 10:28:47 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589531326; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=WtL/X7dN9+U3FDByX9jU3TsYCG6cUYdXuwa81fHgrBU=; b=MB8Q1qFVU3ERGCcLhiTl+BEdJyfOzUUe9mLpr+L2zCTEXnQ9iHJ9oTxfnW9PIrcsrS3GqE nGxhVBH3zpZU4I1jDSRD/uL+/4Epk8h5VkMi5AZO93ahyfUwsLEvbW9vgyyLSeK7oM0zsS 8a9EtHD61GcWa83jTleUkrFiBRnNdOs= Received: from mail-io1-f72.google.com (mail-io1-f72.google.com [209.85.166.72]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-132-IytsXVUkOpuF4Pwh_449Rg-1; Fri, 15 May 2020 04:28:42 -0400 X-MC-Unique: IytsXVUkOpuF4Pwh_449Rg-1 Received: by mail-io1-f72.google.com with SMTP id h17so1595705ior.16 for ; Fri, 15 May 2020 01:28:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=WtL/X7dN9+U3FDByX9jU3TsYCG6cUYdXuwa81fHgrBU=; b=lyz4baK6SJsL26hue57h5UyURSWZ0ySBrbjymSrvE6aSBjKl829hF5eOED8KjULJaH R+KmKOtXK7pbJUpF8Ddz+xfpaWYuMtmG63yeADBI5HZZTifUpdgrBqO9YXDJjt+UVAjm yo5rQFgbF5iKbSxZV+kaFGmk2vaZlK6916Rh0tuqJd71EyHgqKEFgRCaiec7UcJP0mTK Z04bPjrTku8zRQ0WguessEfkANssYcluq0h/DtRlEgdTqwEW6lLR6Iw5LWIplsu4R6k1 lSIokfDMnEZlzoROk2CmXczxEAR20S9juZz9dcdwsZ9q3Afr1oWuoq4NBAV9uB0bQlEs rjmA== X-Gm-Message-State: AOAM531uILkZOuKSZp390DuelGck6F8PE1P7WwyPsGoCJHkQ8VcW0j7W 6S+rZB7y+nkqY5vpfbMCt7KvNByr/yFLb2dTJ+2IUu2rzqgtqWckiFMNRqXTaj+ZaziZ0JeuBSK td2zEBZ2PSwXYlTtx+jo= X-Received: by 2002:a05:6e02:2:: with SMTP id h2mr417920ilr.281.1589531322181; Fri, 15 May 2020 01:28:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwOmGcw/ie3XaTmtjngGpzXseFREyahxpZnScFqRgZTMJKD+quB9IZvjvXymqM9dbGIBh94AmNFuA4mWBWBUJQ= X-Received: by 2002:a05:6e02:2:: with SMTP id h2mr417906ilr.281.1589531321931; Fri, 15 May 2020 01:28:41 -0700 (PDT) MIME-Version: 1.0 References: <20200514131857.11966-1-ktraynor@redhat.com> In-Reply-To: <20200514131857.11966-1-ktraynor@redhat.com> From: David Marchand Date: Fri, 15 May 2020 10:28:31 +0200 Message-ID: To: Kevin Traynor Cc: dev , Thomas Monjalon , Bruce Richardson , "Yigit, Ferruh" , Gavin Hu , Honnappa Nagarahalli , Olivier Matz , dpdk stable X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Subject: Re: [dpdk-dev] [PATCH] build: disable gcc 10 zero-length-bounds warning 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 Thu, May 14, 2020 at 3:19 PM Kevin Traynor wrote: > > gcc 10 issues warnings about the use of rearm_data marker > from struct rte_mbuf. > > e.g. > ../drivers/net/enic/enic_rxtx_vec_avx2.c: In function =E2=80=98rx_one=E2= =80=99: > ../drivers/net/enic/enic_rxtx_vec_avx2.c:21:2: > warning: > array subscript 0 is outside the bounds of an interior zero-length array > =E2=80=98RTE_MARKER64=E2=80=99 {aka =E2=80=98long unsigned int[0]=E2=80= =99} [-Wzero-length-bounds] > 21 | *(uint64_t *)&mb->rearm_data =3D enic->mbuf_initializer; > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > In file included from ../lib/librte_mbuf/rte_mbuf.h:45, > from ../drivers/net/enic/enic_rxtx_vec_avx2.c:6: > ../lib/librte_mbuf/rte_mbuf_core.h:484:15: > note: while referencing =E2=80=98rearm_data=E2=80=99 > 484 | RTE_MARKER64 rearm_data; > | > > Disable this warning for gcc 10 in order to allow v20.05 to build > without changes to struct rte_mbuf. > > Bugzilla ID: 396 > Cc: stable@dpdk.org > > Signed-off-by: Kevin Traynor > > --- > Sending as per discussion at this mornings release meeting: > http://inbox.dpdk.org/dev/2980eb50-124c-9da8-9927-0678081b652b@intel.com/ > > Reference to Gavin's patch: > http://inbox.dpdk.org/dev/CAJFAV8yL2GvEJtTXOLk6o0eXHi4CpZmqCoRsfN2WcDe_ju= 1C8A@mail.gmail.com/#t > --- > config/meson.build | 4 ++++ > mk/toolchain/gcc/rte.vars.mk | 5 +++++ > 2 files changed, 9 insertions(+) > > diff --git a/config/meson.build b/config/meson.build > index a1c38c053..43ab11310 100644 > --- a/config/meson.build > +++ b/config/meson.build > @@ -209,4 +209,8 @@ warning_flags =3D [ > '-Wno-missing-field-initializers' > ] > +if cc.get_id() =3D=3D 'gcc' and cc.version().version_compare('>=3D10.0') > +# FIXME: Bugzilla 396 > + warning_flags +=3D '-Wno-zero-length-bounds' > +endif > if not dpdk_conf.get('RTE_ARCH_64') > # for 32-bit, don't warn about casting a 32-bit pointer to 64-bit int - = it's fine!! > diff --git a/mk/toolchain/gcc/rte.vars.mk b/mk/toolchain/gcc/rte.vars.mk > index f19305e49..928f0e083 100644 > --- a/mk/toolchain/gcc/rte.vars.mk > +++ b/mk/toolchain/gcc/rte.vars.mk > @@ -82,4 +82,9 @@ WERROR_FLAGS +=3D -Wno-uninitialized > endif > > +ifeq ($(shell test $(GCC_VERSION) -ge 100 && echo 1), 1) > +# FIXME: Bugzilla 396 > +WERROR_FLAGS +=3D -Wno-zero-length-bounds > +endif > + > HOST_WERROR_FLAGS :=3D $(WERROR_FLAGS) > > -- > 2.21.3 > Reviewed-by: David Marchand --=20 David Marchand