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 4CF59A0093 for ; Mon, 18 May 2020 11:53:16 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id F40BC1BFCC; Mon, 18 May 2020 11:53:15 +0200 (CEST) Received: from us-smtp-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by dpdk.org (Postfix) with ESMTP id B67031BFCC 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-19-TiJrgQY6OoaWUuG4ZSrlyg-1; Mon, 18 May 2020 05:53:10 -0400 X-MC-Unique: TiJrgQY6OoaWUuG4ZSrlyg-1 Received: by mail-vk1-f198.google.com with SMTP id y68so4327398vkd.14 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=kbfjwBN2JgWsgHcDqs0qJFZt2bcN/3zzrAN5roMwPOsWjCfAORtog5mYCvmMxmbjjQ LUYkh5tLv3lAIhxyoQxP3+wkiPoJDiGwSEMeUHeyvwpDfzsck9b5hV6QQPhHFYVb1+fz YaBCMW1DsazCxsZRhl2eqzQRBbnF2gpTKryvF0tx28/yNLiDwHHorPuuhZRAoIdgMnMF qLIrHh5GSQdL27YnkIYY1NUqHqHKcNMU2nhkfs7BvQr2IBKmxKHQr6zkN35TqNha+qje vCftRrH8wFO6yeINaJo0UZW7SVYwBqY+eOWA9f62N6h43+s2i/PzvyAvqS2CecVCORSH jcgA== X-Gm-Message-State: AOAM531DTSB4mr3ILzXZWEPY5gCEbNUYhKZ1t6bkk4BdMfZn5Srz5LsH q3u6EpIEcdffIbVRiO4n8+9ByJxTFN0QaaUSP7wn26WZnnSaibLmhrYXijRN8A5eogIMHn7hNgS z7DBRkZfKy4ZOmg1nDljPr00= X-Received: by 2002:a67:ec3:: with SMTP id 186mr8856040vso.39.1589795589561; 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-stable] [PATCH] build: disable gcc 10 zero-length-bounds warning X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 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 Sender: "stable" 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