From mboxrd@z Thu Jan 1 00:00:00 1970 From: Adrien Mazarguil Subject: Re: [PATCH v2 07/13] net/avp: fix errors in exported headers Date: Tue, 25 Apr 2017 14:49:59 +0200 Message-ID: <20170425124959.GJ3790@6wind.com> References: <046efd0fda00bfb5253586319fb9cfbf904a8f0a.1493108423.git.adrien.mazarguil@6wind.com> <70A7408C6E1BFB41B192A929744D85239690F2B7@ALA-MBC.corp.ad.wrs.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "dev@dpdk.org" , "Peters, Matt" To: "Legacy, Allain" Return-path: Received: from mail-wm0-f48.google.com (mail-wm0-f48.google.com [74.125.82.48]) by dpdk.org (Postfix) with ESMTP id CAF152BF5 for ; Tue, 25 Apr 2017 14:50:07 +0200 (CEST) Received: by mail-wm0-f48.google.com with SMTP id w64so21875275wma.0 for ; Tue, 25 Apr 2017 05:50:07 -0700 (PDT) Content-Disposition: inline In-Reply-To: <70A7408C6E1BFB41B192A929744D85239690F2B7@ALA-MBC.corp.ad.wrs.com> 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 Tue, Apr 25, 2017 at 12:31:56PM +0000, Legacy, Allain wrote: > > -----Original Message----- > > From: Adrien Mazarguil [mailto:adrien.mazarguil@6wind.com] > > Sent: Tuesday, April 25, 2017 4:30 AM > <...> > > > > +#include > > #ifdef __KERNEL__ > > #include > > +#else > > +#include > > +#include > > +#include > > +#include > > +#endif > > I compiled this in our environment and found a couple of additional issues. I apologize... I should have done that on the first pass. It should actually look like this to handle both userspace and kernel compiles: > > #ifdef __KERNEL__ > #include > #define RTE_STD_C11 > #else > #include > #include > #include > #include > #include > #endif > > 1) stdint.h needs to be moved in to the #else, and OK, will update. > 2) RTE_STD_C11 needs to be included in the #ifdef __KERNEL__. Missed that one, however I suggest either: #ifndef __KERNEL__ around RTE_STD_C11 or using __extension__ directly. Which do you prefer? By the way, is the kernel module that depends on rte_avp_common.h available somewhere to validate compilation against it? > <..> > > diff --git a/drivers/net/avp/rte_avp_fifo.h b/drivers/net/avp/rte_avp_fifo.h > > index 8262e4f..a0a37eb 100644 > > --- a/drivers/net/avp/rte_avp_fifo.h > > +++ b/drivers/net/avp/rte_avp_fifo.h > > @@ -57,6 +57,12 @@ > > #ifndef _RTE_AVP_FIFO_H_ > > #define _RTE_AVP_FIFO_H_ > > > > +#include > > Would you mind changing the brackets (<>) to quotes ("") since this is a local include file? > > #include "rte_avp_common.h" I will update it. -- Adrien Mazarguil 6WIND