Message ID | 1427397455-30368-1-git-send-email-pablo.de.lara.guarch@intel.com (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers |
Return-Path: <dev-bounces@dpdk.org> X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 347C47EEF; Thu, 26 Mar 2015 20:17:39 +0100 (CET) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 80851A6A for <dev@dpdk.org>; Thu, 26 Mar 2015 20:17:38 +0100 (CET) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga102.fm.intel.com with ESMTP; 26 Mar 2015 12:17:37 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.11,474,1422950400"; d="scan'208";a="698359470" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by fmsmga002.fm.intel.com with ESMTP; 26 Mar 2015 12:17:37 -0700 Received: from sivswdev02.ir.intel.com (sivswdev02.ir.intel.com [10.237.217.46]) by irvmail001.ir.intel.com (8.14.3/8.13.6/MailSET/Hub) with ESMTP id t2QJHZGu028317 for <dev@dpdk.org>; Thu, 26 Mar 2015 19:17:35 GMT Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id t2QJHZmS030405 for <dev@dpdk.org>; Thu, 26 Mar 2015 19:17:35 GMT Received: (from pdelarax@localhost) by sivswdev02.ir.intel.com with id t2QJHZdH030401 for dev@dpdk.org; Thu, 26 Mar 2015 19:17:35 GMT From: Pablo de Lara <pablo.de.lara.guarch@intel.com> To: dev@dpdk.org Date: Thu, 26 Mar 2015 19:17:35 +0000 Message-Id: <1427397455-30368-1-git-send-email-pablo.de.lara.guarch@intel.com> X-Mailer: git-send-email 1.7.4.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> Errors-To: dev-bounces@dpdk.org Sender: "dev" <dev-bounces@dpdk.org> |
Commit Message
De Lara Guarch, Pablo
March 26, 2015, 7:17 p.m. UTC
DPDK does not build on gcc 4.4, as it complains due to
strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests,
with no errors in next gcc versions:
CC virtual_pmd.o
CC test_link_bonding_mode4.o
cc1: warnings being treated as errors
/root/dpdk/app/test/test_link_bonding_mode4.c: In function ‘test_mode4_expired’:
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules
...
cc1: warnings being treated as errors
/root/dpdk/app/test/virtual_pmd.c: In function ‘virtual_ethdev_stats_reset’:
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules
/root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules
This patch fixes the compilation by disabling
these warnings.
Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com>
---
app/test/Makefile | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
Comments
On 3/27/2015 3:18 AM, Pablo de Lara wrote: > DPDK does not build on gcc 4.4, as it complains due to Why? Will gcc 4.4 not supported? Thanks, Michael > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > with no errors in next gcc versions: > > CC virtual_pmd.o > CC test_link_bonding_mode4.o > cc1: warnings being treated as errors > /root/dpdk/app/test/test_link_bonding_mode4.c: In function ‘test_mode4_expired’: > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > ... > cc1: warnings being treated as errors > /root/dpdk/app/test/virtual_pmd.c: In function ‘virtual_ethdev_stats_reset’: > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > > This patch fixes the compilation by disabling > these warnings. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > --- > app/test/Makefile | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/app/test/Makefile b/app/test/Makefile > index 4aca77c..0d62d07 100644 > --- a/app/test/Makefile > +++ b/app/test/Makefile > @@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments > endif > endif > > +# Disable warnings of no-strict-aliasing in virtual_pmd > +# and test_link_bonding_mode4 tests > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > + > # this application needs libraries first > DEPDIRS-y += lib >
> -----Original Message----- > From: Qiu, Michael > Sent: Friday, March 27, 2015 8:41 AM > To: De Lara Guarch, Pablo; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > On 3/27/2015 3:18 AM, Pablo de Lara wrote: > > DPDK does not build on gcc 4.4, as it complains due to > > Why? Will gcc 4.4 not supported? Afaik, we still support gcc 4.4, since it is part of RHEL 6.5. Thanks, Pablo > > Thanks, > Michael > > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > > with no errors in next gcc versions: > > > > CC virtual_pmd.o > > CC test_link_bonding_mode4.o > > cc1: warnings being treated as errors > > /root/dpdk/app/test/test_link_bonding_mode4.c: In function > 'test_mode4_expired': > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: > dereferencing pointer 'pkt.409' does break strict-aliasing rules > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: > dereferencing pointer 'pkt.409' does break strict-aliasing rules > > ... > > cc1: warnings being treated as errors > > /root/dpdk/app/test/virtual_pmd.c: In function > 'virtual_ethdev_stats_reset': > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: > dereferencing pointer 'pkt.338' does break strict-aliasing rules > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: > dereferencing pointer 'pkt.338' does break strict-aliasing rules > > > > This patch fixes the compilation by disabling > > these warnings. > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > --- > > app/test/Makefile | 5 +++++ > > 1 files changed, 5 insertions(+), 0 deletions(-) > > > > diff --git a/app/test/Makefile b/app/test/Makefile > > index 4aca77c..0d62d07 100644 > > --- a/app/test/Makefile > > +++ b/app/test/Makefile > > @@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var- > tracking-assignments > > endif > > endif > > > > +# Disable warnings of no-strict-aliasing in virtual_pmd > > +# and test_link_bonding_mode4 tests > > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > > + > > # this application needs libraries first > > DEPDIRS-y += lib > >
2015-03-26 19:17, Pablo de Lara: > DPDK does not build on gcc 4.4, as it complains due to > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > with no errors in next gcc versions: Do you mean it's not possible to fix it in the code? You are disabling some checks which may be relevant. > CC virtual_pmd.o > CC test_link_bonding_mode4.o > cc1: warnings being treated as errors > /root/dpdk/app/test/test_link_bonding_mode4.c: In function ‘test_mode4_expired’: > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > ... > cc1: warnings being treated as errors > /root/dpdk/app/test/virtual_pmd.c: In function ‘virtual_ethdev_stats_reset’: > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > > This patch fixes the compilation by disabling > these warnings. > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > --- > app/test/Makefile | 5 +++++ > 1 files changed, 5 insertions(+), 0 deletions(-) > > diff --git a/app/test/Makefile b/app/test/Makefile > index 4aca77c..0d62d07 100644 > --- a/app/test/Makefile > +++ b/app/test/Makefile > @@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments > endif > endif > > +# Disable warnings of no-strict-aliasing in virtual_pmd > +# and test_link_bonding_mode4 tests > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > + > # this application needs libraries first > DEPDIRS-y += lib > >
> -----Original Message----- > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > Sent: Friday, March 27, 2015 9:20 AM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > 2015-03-26 19:17, Pablo de Lara: > > DPDK does not build on gcc 4.4, as it complains due to > > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > > with no errors in next gcc versions: > > Do you mean it's not possible to fix it in the code? > You are disabling some checks which may be relevant. I mean it is possible to fix, but probably not worth it, considering that newer gcc versions have no issues (and gcc 4.4 is from 2011). I have seen that there are other libraries that disable these warnings as well, so I assumed we could do the same here. Pablo > > > CC virtual_pmd.o > > CC test_link_bonding_mode4.o > > cc1: warnings being treated as errors > > /root/dpdk/app/test/test_link_bonding_mode4.c: In function > ‘test_mode4_expired’: > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: > dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: > dereferencing pointer ‘pkt.409’ does break strict-aliasing rules > > ... > > cc1: warnings being treated as errors > > /root/dpdk/app/test/virtual_pmd.c: In function > ‘virtual_ethdev_stats_reset’: > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:645: error: > dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > > /root/dpdk/x86_64-native-linuxapp-gcc/include/rte_ring.h:729: error: > dereferencing pointer ‘pkt.338’ does break strict-aliasing rules > > > > This patch fixes the compilation by disabling > > these warnings. > > > > Signed-off-by: Pablo de Lara <pablo.de.lara.guarch@intel.com> > > --- > > app/test/Makefile | 5 +++++ > > 1 files changed, 5 insertions(+), 0 deletions(-) > > > > diff --git a/app/test/Makefile b/app/test/Makefile > > index 4aca77c..0d62d07 100644 > > --- a/app/test/Makefile > > +++ b/app/test/Makefile > > @@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var- > tracking-assignments > > endif > > endif > > > > +# Disable warnings of no-strict-aliasing in virtual_pmd > > +# and test_link_bonding_mode4 tests > > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > > + > > # this application needs libraries first > > DEPDIRS-y += lib > > > > >
2015-03-27 09:29, De Lara Guarch, Pablo: > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > 2015-03-26 19:17, Pablo de Lara: > > > DPDK does not build on gcc 4.4, as it complains due to > > > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > > > with no errors in next gcc versions: > > > > Do you mean it's not possible to fix it in the code? > > You are disabling some checks which may be relevant. > > I mean it is possible to fix, but probably not worth it, considering that > newer gcc versions have no issues (and gcc 4.4 is from 2011). > I have seen that there are other libraries that disable these warnings as well, > so I assumed we could do the same here. It is preferred to avoid doing it.
> -----Original Message----- > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > Sent: Friday, March 27, 2015 10:01 AM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > 2015-03-27 09:29, De Lara Guarch, Pablo: > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > 2015-03-26 19:17, Pablo de Lara: > > > > DPDK does not build on gcc 4.4, as it complains due to > > > > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > > > > with no errors in next gcc versions: > > > > > > Do you mean it's not possible to fix it in the code? > > > You are disabling some checks which may be relevant. > > > > I mean it is possible to fix, but probably not worth it, considering that > > newer gcc versions have no issues (and gcc 4.4 is from 2011). > > I have seen that there are other libraries that disable these warnings as > well, > > so I assumed we could do the same here. > > It is preferred to avoid doing it. Actually, I just realized that I missed checking the gcc version, so I was disabling the warnings in all versions. I can send a v2 with that check, so we will still take into account those warnings for newer versions, and just ignore it in gcc 4.4. Thanks, Pablo
Fix strict aliasing rule error seen in gcc 4.4 in virtual pmd and mode 4 link bonding mode 4 test. changes v2: - fix error in code instead disabling compiler warning. Pawel Wodkowski (2): test: fix strict aliasing rule error in virtual pmd test: fix strict aliasing rule error in link bonding mode 4 test app/test/test_link_bonding_mode4.c | 5 +++-- app/test/virtual_pmd.c | 10 +++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
On Thu, 26 Mar 2015 19:17:35 +0000 Pablo de Lara <pablo.de.lara.guarch@intel.com> wrote: > +# Disable warnings of no-strict-aliasing in virtual_pmd > +# and test_link_bonding_mode4 tests > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > + > There is a way to do it only for a specific (broken) Gcc version using if's
> -----Original Message----- > From: Stephen Hemminger [mailto:stephen@networkplumber.org] > Sent: Friday, March 27, 2015 3:46 PM > To: De Lara Guarch, Pablo > Cc: dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > On Thu, 26 Mar 2015 19:17:35 +0000 > Pablo de Lara <pablo.de.lara.guarch@intel.com> wrote: > > > +# Disable warnings of no-strict-aliasing in virtual_pmd > > +# and test_link_bonding_mode4 tests > > +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing > > +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing > > + > > > > There is a way to do it only for a specific (broken) > Gcc version using if's I know, I sent another email, saying that I missed an if to check the gcc version. Anyway, Pawel has sent another patch to fix the issue. Not sure which fix the community prefers. Thanks, Pablo
> -----Original Message----- > From: De Lara Guarch, Pablo > Sent: Friday, March 27, 2015 10:11 AM > To: Thomas Monjalon > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > > > > -----Original Message----- > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon > > Sent: Friday, March 27, 2015 10:01 AM > > To: De Lara Guarch, Pablo > > Cc: dev@dpdk.org > > Subject: Re: [dpdk-dev] [PATCH] test: Disable strict-aliasing warnings > > > > 2015-03-27 09:29, De Lara Guarch, Pablo: > > > From: Thomas Monjalon [mailto:thomas.monjalon@6wind.com] > > > > 2015-03-26 19:17, Pablo de Lara: > > > > > DPDK does not build on gcc 4.4, as it complains due to > > > > > strict-aliasing rules in virtual_pmd and link_bonding_mode4 tests, > > > > > with no errors in next gcc versions: > > > > > > > > Do you mean it's not possible to fix it in the code? > > > > You are disabling some checks which may be relevant. > > > > > > I mean it is possible to fix, but probably not worth it, considering that > > > newer gcc versions have no issues (and gcc 4.4 is from 2011). > > > I have seen that there are other libraries that disable these warnings as > > well, > > > so I assumed we could do the same here. > > > > It is preferred to avoid doing it. > > Actually, I just realized that I missed checking the gcc version, so I was > disabling the warnings in all versions. > I can send a v2 with that check, so we will still take into account those > warnings for newer versions, > and just ignore it in gcc 4.4. I just sent a v2 of this patch. Pawel also sent another fix for this issue, but Stephen had some concerns about it, so I just sent a v2 as an alternative, so the community can decide between the two options. > > Thanks, > Pablo
2015-03-27 11:55, Pawel Wodkowski: > Fix strict aliasing rule error seen in gcc 4.4 in virtual pmd and mode 4 link > bonding mode 4 test. > > changes v2: > - fix error in code instead disabling compiler warning. > > Pawel Wodkowski (2): > test: fix strict aliasing rule error in virtual pmd > test: fix strict aliasing rule error in link bonding mode 4 test > > app/test/test_link_bonding_mode4.c | 5 +++-- > app/test/virtual_pmd.c | 10 +++++----- > 2 files changed, 8 insertions(+), 7 deletions(-) Applied, thanks
diff --git a/app/test/Makefile b/app/test/Makefile index 4aca77c..0d62d07 100644 --- a/app/test/Makefile +++ b/app/test/Makefile @@ -158,6 +158,11 @@ CFLAGS_test_memcpy_perf.o += -fno-var-tracking-assignments endif endif +# Disable warnings of no-strict-aliasing in virtual_pmd +# and test_link_bonding_mode4 tests +CFLAGS_virtual_pmd.o += -Wno-strict-aliasing +CFLAGS_test_link_bonding_mode4.o += -Wno-strict-aliasing + # this application needs libraries first DEPDIRS-y += lib