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 BE8C8A0093; Mon, 18 May 2020 11:53:17 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 3670D1D381; Mon, 18 May 2020 11:53:16 +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 DA8C71C22E for ; Mon, 18 May 2020 11:53:14 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589795594; 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=ltvyPlYBEU9QCeIMJHUVeQxvoVkuMV0AVvwziY37CpY=; b=UQpEMp8fqHbkjKSgnXLa8MVyPPDv0dFoAzJ/vTCu25rvPGM/nWbIoN0X4midUSFfeg5x+f TGlnZGchq0jiLnQmqbHjO3IEnUQhe8O21Kc1OS6sV5jTVQlda2RzShmJjXQVRgRzvSTbp0 Ts8TWRgD8/+PafsQ2CpFmVK5/LOCSFc= Received: from mail-vk1-f198.google.com (mail-vk1-f198.google.com [209.85.221.198]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-428-iLbE33IVMTiWJ9cHVDvivQ-1; Mon, 18 May 2020 05:53:10 -0400 X-MC-Unique: iLbE33IVMTiWJ9cHVDvivQ-1 Received: by mail-vk1-f198.google.com with SMTP id x128so4334103vkd.9 for ; Mon, 18 May 2020 02:53:10 -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=ltvyPlYBEU9QCeIMJHUVeQxvoVkuMV0AVvwziY37CpY=; b=UTv251Hq1zILIsEUr7tEdvopwi9XPC98clDzEnA3hgMl32MtzAw6bUTY+fdQNqIAYF X1Nnu6usyY3P9USOY0XuvjHDrc0I4Zo5Ev5aceg2VAtjid+LxBKTzK3aag8cFEjfShjK sGNhTqLR9OVpZDU2wth6BgbbVclxjlk0v7fvsQXEuHK0TJYJCbRZtylIWeij6uLT426S Mc3lY7k2xdj76UW7Rv62H3mlRDP2LQSElnfxLX9EHWbzbngSwgZDt0LxjhK/VHqzWD7e gBHZRRvZFew7HY720DAXnkknQO+r/qd6U1YGpNaOXSiNrDoWHS/4Sf2oxAwH7E/4CG/Q iMGg== X-Gm-Message-State: AOAM530lOzJQiDQT0bblCLlPOhAUZhj1ugYBYqfwaRimziPgkEYVfZbd U2cMq+ZrjtfwCWLcO2z6W/Gek03jLZLNdxI6Tm+ayXW3tiWl50B3E2H75GfxcGGoFgKp6QHAYuO joQ6EKCnIpG86nGJhd0E= X-Received: by 2002:a67:ec3:: with SMTP id 186mr8856043vso.39.1589795589562; Mon, 18 May 2020 02:53:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxUY+Bk8Nfko1PjXUnueBRdilw9/FsWn7nJ5yg+aWIyd7slCBgEpQxSCMb4wx52F60YMxhnnPsESbe0bDoGsCc= X-Received: by 2002:a67:ec3:: with SMTP id 186mr8856025vso.39.1589795589122; Mon, 18 May 2020 02:53:09 -0700 (PDT) MIME-Version: 1.0 References: <20200514131857.11966-1-ktraynor@redhat.com> In-Reply-To: From: David Marchand Date: Mon, 18 May 2020 11:52:58 +0200 Message-ID: To: Olivier Matz , Bruce Richardson , Thomas Monjalon Cc: dev , "Yigit, Ferruh" , Gavin Hu , Honnappa Nagarahalli , Kevin Traynor , 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 Fri, May 15, 2020 at 10:28 AM David Marchand wrote: > > 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 arra= y > > =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.co= m/ > > > > Reference to Gavin's patch: > > http://inbox.dpdk.org/dev/CAJFAV8yL2GvEJtTXOLk6o0eXHi4CpZmqCoRsfN2WcDe_= ju1C8A@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.m= k > > 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 No objection on this patch, so I'll proceed and merge it for rc3. --=20 David Marchand