Message ID | 1411037752-8000-1-git-send-email-bruce.richardson@intel.com (mailing list archive) |
---|---|
State | Accepted, 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 ED5DAB3A6; Thu, 18 Sep 2014 12:50:12 +0200 (CEST) Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by dpdk.org (Postfix) with ESMTP id BF6CE68C2 for <dev@dpdk.org>; Thu, 18 Sep 2014 12:50:10 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga101.fm.intel.com with ESMTP; 18 Sep 2014 03:55:54 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="4.97,862,1389772800"; d="scan'208";a="387978694" Received: from irvmail001.ir.intel.com ([163.33.26.43]) by FMSMGA003.fm.intel.com with ESMTP; 18 Sep 2014 03:50:20 -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 s8IAtr80017576; Thu, 18 Sep 2014 11:55:53 +0100 Received: from sivswdev02.ir.intel.com (localhost [127.0.0.1]) by sivswdev02.ir.intel.com with ESMTP id s8IAtqtC008040; Thu, 18 Sep 2014 11:55:52 +0100 Received: (from bricha3@localhost) by sivswdev02.ir.intel.com with id s8IAtqGx008036; Thu, 18 Sep 2014 11:55:52 +0100 From: Bruce Richardson <bruce.richardson@intel.com> To: dev@dpdk.org Date: Thu, 18 Sep 2014 11:55:52 +0100 Message-Id: <1411037752-8000-1-git-send-email-bruce.richardson@intel.com> X-Mailer: git-send-email 1.7.4.1 Subject: [dpdk-dev] [PATCH] ixgbe: fix compile error with gcc4.4 (used RHEL 6) 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
Bruce Richardson
Sept. 18, 2014, 10:55 a.m. UTC
The refcnt field is contained within an anonymous union within the mbuf
data structure, and gcc 4.4 gives an error about an unknown field unless
the initialiser for the field is contained within extra braces.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
Comments
> The refcnt field is contained within an anonymous union within the mbuf > data structure, and gcc 4.4 gives an error about an unknown field unless > the initialiser for the field is contained within extra braces. > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> Thanks Bruce, it is now applied.
On Thu, Sep 18, 2014 at 01:09:16PM +0200, Thomas Monjalon wrote: > > The refcnt field is contained within an anonymous union within the mbuf > > data structure, and gcc 4.4 gives an error about an unknown field unless > > the initialiser for the field is contained within extra braces. > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > Thanks Bruce, it is now applied. Hang on here, we use anonymous unions all the time in RHEL6, and make assignments to them frequently, and the compiler doesn't complain (see the dropcount variable in sk_buff for an example). Not saying that this is a big deal, but can you explain a little more about what you're seeing when this error occurs, before we just paper over it? Neil > -- > Thomas >
> -----Original Message----- > From: Neil Horman [mailto:nhorman@tuxdriver.com] > Sent: Thursday, September 18, 2014 1:25 PM > To: Thomas Monjalon > Cc: Richardson, Bruce; dev@dpdk.org > Subject: Re: [dpdk-dev] [PATCH] ixgbe: fix compile error with gcc4.4 (used RHEL > 6) > > On Thu, Sep 18, 2014 at 01:09:16PM +0200, Thomas Monjalon wrote: > > > The refcnt field is contained within an anonymous union within the mbuf > > > data structure, and gcc 4.4 gives an error about an unknown field unless > > > the initialiser for the field is contained within extra braces. > > > > > > Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> > > > > Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com> > > > > Thanks Bruce, it is now applied. > > Hang on here, we use anonymous unions all the time in RHEL6, and make > assignments to them frequently, and the compiler doesn't complain (see the > dropcount variable in sk_buff for an example). Not saying that this is a big > deal, but can you explain a little more about what you're seeing when this error > occurs, before we just paper over it? > Originally reported on RHEL6 as a build failure. When I use gcc4.4 on Fedora 20, I get the following without this change: CC ixgbe_rxtx_vec.o == Build lib/librte_table /home/bruce/dpdk.org/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c: In function 'ixgbe_rxq_vec_setup': /home/bruce/dpdk.org/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c:726: error: unknown field 'refcnt' specified in initializer compilation terminated due to -Wfatal-errors. make[5]: *** [ixgbe_rxtx_vec.o] Error 1 make[4]: *** [librte_pmd_ixgbe] Error 2 make[4]: *** Waiting for unfinished jobs.... make[3]: *** [lib] Error 2 make[2]: *** [all] Error 2 make[1]: *** [x86_64-native-linuxapp-gcc_install] Error 2 make: *** [install] Error 2 Regards, /Bruce
diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c index a6f7fdf..203ddf7 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx_vec.c @@ -723,7 +723,7 @@ ixgbe_rxq_vec_setup(struct igb_rx_queue *rxq) .nb_segs = 1, .data_off = RTE_PKTMBUF_HEADROOM, #ifdef RTE_MBUF_REFCNT - .refcnt = 1, + { .refcnt = 1, } #endif };