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 BF9B3A00C3 for ; Fri, 15 May 2020 10:28:47 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id AE85A1DA7B; Fri, 15 May 2020 10:28:47 +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 57DEA1DA7B for ; Fri, 15 May 2020 10:28:46 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1589531325; 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=QjueRrQv4Ux+EueBJrLz+CmHBuYzTSQR9AEpy6kVuUPu4FCYyUsAoenTBjgEzhlPGBlEGx 6lVKV07Zfsx+wq0fB+RZKj/KHUMaUFmM8SCxy1pe73JQe/b3C0s9NqXeqqjzVkvl7i3K5P G4+rC/6z1o9vugx7cel5uacfyExEzPI= Received: from mail-il1-f197.google.com (mail-il1-f197.google.com [209.85.166.197]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-371-APqZB0HaOouyrZ1_jpZFZg-1; Fri, 15 May 2020 04:28:43 -0400 X-MC-Unique: APqZB0HaOouyrZ1_jpZFZg-1 Received: by mail-il1-f197.google.com with SMTP id l6so1415387ils.22 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=hUc3W4GDR6AtD0lT4hMTqJwusjqvJlodiyEdFJUxF4HZHWxpDDgEykjBhqNtZqn7lz lvEwfMkjsqQrZIMxfLXobFd8zmmpnC5pvX9XbfkNYYHYkbS11Koa+hBYhMMPmL1u9V4N ADxpOL5Q9dB50oHUlOryVivg7n98Xf5cVOUmJqvsklwCP8/gO5tV4kSnCSZWywk97q0J /8/9SGuzehgW2wGfm2l2/lehOEBeaz//IrHmESGWZMf17a2EfqM/0FGdBA/OY46p8EPd 4UioubQbqEZGttZ9yuD33oeT6DR7AOzw4cCnq7XuKHkm9Lk3qiQGzi3GqJ1zE3wosCzW IyWg== X-Gm-Message-State: AOAM531PiIcYFD+sy2bkYqZFxF6FmkGt1sTK/TTUXKSIdWWh9FM6q7GQ 2qxTA2ygY/4mk8YiCSoqBWL2bLkaUE2s4PkXqhlNMC4K70zhT5J5RklOCiZvbQ1UkYiXK4i/eBv S79UD6x12PnexDwhQQpHFNhE= X-Received: by 2002:a05:6e02:2:: with SMTP id h2mr417931ilr.281.1589531322440; 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-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 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