From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <marcinx.smoczynski@intel.com>
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id C99EFD18D
 for <dev@dpdk.org>; Tue, 14 May 2019 15:15:17 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 May 2019 06:15:16 -0700
X-ExtLoop1: 1
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by orsmga003.jf.intel.com with ESMTP; 14 May 2019 06:15:16 -0700
Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 14 May 2019 06:15:08 -0700
Received: from lcsmsx153.ger.corp.intel.com (10.186.165.228) by
 FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 14 May 2019 06:15:07 -0700
Received: from HASMSX110.ger.corp.intel.com ([169.254.6.92]) by
 LCSMSX153.ger.corp.intel.com ([169.254.8.39]) with mapi id 14.03.0415.000;
 Tue, 14 May 2019 16:15:04 +0300
From: "Smoczynski, MarcinX" <marcinx.smoczynski@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: "thomas@monjalon.net" <thomas@monjalon.net>, "dev@dpdk.org"
 <dev@dpdk.org>, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
 "adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>
Thread-Topic: [PATCH] build: enable BSD features visibility for FreeBSD
Thread-Index: AQHVCkpvfGICZ3EYF0q9XdlBufKA0aZqV9yAgAA90hA=
Date: Tue, 14 May 2019 13:15:04 +0000
Message-ID: <2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com>
References: <20190514114354.16212-1-marcinx.smoczynski@intel.com>
 <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.0.600.7
dlp-reaction: no-action
x-ctpclassification: CTP_NT
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzNmMGU4Y2ItMjYwNS00NjEwLTk4NTEtOWQ5NzY2MTI3NzkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRFFyK05ySFYzXC9TTkNZbVppcjloeHlicEUrUmlnV2plNFEwUG1OVzcrMDc3a1Q1UVNZMVFXS01DakFlSjNcL3BqIn0=
x-originating-ip: [10.104.12.183]
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] build: enable BSD features visibility for
	FreeBSD
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Tue, 14 May 2019 13:15:18 -0000



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Tuesday, May 14, 2019 2:20 PM
> To: Smoczynski, MarcinX <marcinx.smoczynski@intel.com>
> Cc: thomas@monjalon.net; dev@dpdk.org; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; adrien.mazarguil@6wind.com
> Subject: Re: [PATCH] build: enable BSD features visibility for FreeBSD
>=20
> On Tue, May 14, 2019 at 01:43:54PM +0200, Marcin Smoczynski wrote:
> > When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE
> macro
> > explicitly in its build recipe, it restricts visibility of a non POSIX
> > features subset, such as IANA protocol numbers (IPPROTO_* macros).
> > Non standard features are enabled by default for DPDK both for Linux
> > thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE.
> However
> > using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
> > __BSD_VISIBLE to be defined to 0 for FreeBSD, causing different
> > feature sets visibility for Linux and FreeBSD. It restricts from using
> > IPPROTO macros in public headers, such as rte_ip.h, despite the fact
> > they are already widely used in sources.
> >
> > Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
> > which enforces feature sets visibility unification between Linux and
> > FreeBSD.
> >
> > This patch solves the problem of build breaks for [1] on FreeBSD [2]
> > following the discussion [3].
> >
> > [1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
> > [2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
> > [3] https://mails.dpdk.org/archives/dev/2019-May/132110.html
> >
> > Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
> > ---
> >  app/meson.build               | 5 +++++
> >  drivers/meson.build           | 5 +++++
> >  examples/meson.build          | 5 +++++
> >  lib/meson.build               | 5 +++++
> >  mk/target/generic/rte.vars.mk | 5 +++++
> >  5 files changed, 25 insertions(+)
> >
> Rather than adding this in 4 places to the meson build, would it break
> anything to just add it using add_project_arguments() in
> config/meson.build?

Sounds good to me. I was following the way -D_GNU_SOURCE was added.
Should I move -D_GNU_SOURCE to config/meson.build too? It looks like
it is the same situation as it is with __BSD_VISIBLE.

>=20
> Also, does this flag need to be used by external apps when compiling agai=
nst
> DPDK headers? If so, we need to add this to the pkg-config file for DPDK =
on
> BSD.

Lack of this flag may break external applications builds for FreeBSD depend=
ing
of other feature flags they use. I'll add it then to the pc file.

Marcin

From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from dpdk.org (dpdk.org [92.243.14.124])
	by dpdk.space (Postfix) with ESMTP id 51141A00E6
	for <public@inbox.dpdk.org>; Tue, 14 May 2019 15:15:21 +0200 (CEST)
Received: from [92.243.14.124] (localhost [127.0.0.1])
	by dpdk.org (Postfix) with ESMTP id E8201D19F;
	Tue, 14 May 2019 15:15:19 +0200 (CEST)
Received: from mga14.intel.com (mga14.intel.com [192.55.52.115])
 by dpdk.org (Postfix) with ESMTP id C99EFD18D
 for <dev@dpdk.org>; Tue, 14 May 2019 15:15:17 +0200 (CEST)
X-Amp-Result: SKIPPED(no attachment in message)
X-Amp-File-Uploaded: False
Received: from orsmga003.jf.intel.com ([10.7.209.27])
 by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;
 14 May 2019 06:15:16 -0700
X-ExtLoop1: 1
Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205])
 by orsmga003.jf.intel.com with ESMTP; 14 May 2019 06:15:16 -0700
Received: from fmsmsx152.amr.corp.intel.com (10.18.125.5) by
 fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 14 May 2019 06:15:08 -0700
Received: from lcsmsx153.ger.corp.intel.com (10.186.165.228) by
 FMSMSX152.amr.corp.intel.com (10.18.125.5) with Microsoft SMTP Server (TLS)
 id 14.3.408.0; Tue, 14 May 2019 06:15:07 -0700
Received: from HASMSX110.ger.corp.intel.com ([169.254.6.92]) by
 LCSMSX153.ger.corp.intel.com ([169.254.8.39]) with mapi id 14.03.0415.000;
 Tue, 14 May 2019 16:15:04 +0300
From: "Smoczynski, MarcinX" <marcinx.smoczynski@intel.com>
To: "Richardson, Bruce" <bruce.richardson@intel.com>
CC: "thomas@monjalon.net" <thomas@monjalon.net>, "dev@dpdk.org"
 <dev@dpdk.org>, "Ananyev, Konstantin" <konstantin.ananyev@intel.com>,
 "adrien.mazarguil@6wind.com" <adrien.mazarguil@6wind.com>
Thread-Topic: [PATCH] build: enable BSD features visibility for FreeBSD
Thread-Index: AQHVCkpvfGICZ3EYF0q9XdlBufKA0aZqV9yAgAA90hA=
Date: Tue, 14 May 2019 13:15:04 +0000
Message-ID:
 <2F25558C1648FA498380EAC12A86126251FF08@HASMSX110.ger.corp.intel.com>
References: <20190514114354.16212-1-marcinx.smoczynski@intel.com>
 <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com>
In-Reply-To: <20190514122007.GA600@bricha3-MOBL.ger.corp.intel.com>
Accept-Language: en-US
Content-Language: en-US
X-MS-Has-Attach: 
X-MS-TNEF-Correlator: 
dlp-product: dlpe-windows
dlp-version: 11.0.600.7
dlp-reaction: no-action
x-ctpclassification: CTP_NT
x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNzNmMGU4Y2ItMjYwNS00NjEwLTk4NTEtOWQ5NzY2MTI3NzkyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjEwLjE4MDQuNDkiLCJUcnVzdGVkTGFiZWxIYXNoIjoiRFFyK05ySFYzXC9TTkNZbVppcjloeHlicEUrUmlnV2plNFEwUG1OVzcrMDc3a1Q1UVNZMVFXS01DakFlSjNcL3BqIn0=
x-originating-ip: [10.104.12.183]
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Subject: Re: [dpdk-dev] [PATCH] build: enable BSD features visibility for
	FreeBSD
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org
Sender: "dev" <dev-bounces@dpdk.org>
Message-ID: <20190514131504.hKsf44Pho0NbeZWnqAeCd9y6ZWqK3fleS-DRss97bpU@z>



> -----Original Message-----
> From: Richardson, Bruce
> Sent: Tuesday, May 14, 2019 2:20 PM
> To: Smoczynski, MarcinX <marcinx.smoczynski@intel.com>
> Cc: thomas@monjalon.net; dev@dpdk.org; Ananyev, Konstantin
> <konstantin.ananyev@intel.com>; adrien.mazarguil@6wind.com
> Subject: Re: [PATCH] build: enable BSD features visibility for FreeBSD
>=20
> On Tue, May 14, 2019 at 01:43:54PM +0200, Marcin Smoczynski wrote:
> > When a component uses either XOPEN_SOURCE or POSIX_C_SOURCE
> macro
> > explicitly in its build recipe, it restricts visibility of a non POSIX
> > features subset, such as IANA protocol numbers (IPPROTO_* macros).
> > Non standard features are enabled by default for DPDK both for Linux
> > thanks to _GNU_SOURCE and for FreeBSD thanks to __BSD_VISIBLE.
> However
> > using XOPEN_SOURCE or POSIX_(C_)SOURCE in a component causes
> > __BSD_VISIBLE to be defined to 0 for FreeBSD, causing different
> > feature sets visibility for Linux and FreeBSD. It restricts from using
> > IPPROTO macros in public headers, such as rte_ip.h, despite the fact
> > they are already widely used in sources.
> >
> > Add __BSD_VISIBLE macro specified unconditionally for FreeBSD targets
> > which enforces feature sets visibility unification between Linux and
> > FreeBSD.
> >
> > This patch solves the problem of build breaks for [1] on FreeBSD [2]
> > following the discussion [3].
> >
> > [1] https://mails.dpdk.org/archives/dev/2019-May/131885.html
> > [2] http://mails.dpdk.org/archives/test-report/2019-May/082263.html
> > [3] https://mails.dpdk.org/archives/dev/2019-May/132110.html
> >
> > Signed-off-by: Marcin Smoczynski <marcinx.smoczynski@intel.com>
> > ---
> >  app/meson.build               | 5 +++++
> >  drivers/meson.build           | 5 +++++
> >  examples/meson.build          | 5 +++++
> >  lib/meson.build               | 5 +++++
> >  mk/target/generic/rte.vars.mk | 5 +++++
> >  5 files changed, 25 insertions(+)
> >
> Rather than adding this in 4 places to the meson build, would it break
> anything to just add it using add_project_arguments() in
> config/meson.build?

Sounds good to me. I was following the way -D_GNU_SOURCE was added.
Should I move -D_GNU_SOURCE to config/meson.build too? It looks like
it is the same situation as it is with __BSD_VISIBLE.

>=20
> Also, does this flag need to be used by external apps when compiling agai=
nst
> DPDK headers? If so, we need to add this to the pkg-config file for DPDK =
on
> BSD.

Lack of this flag may break external applications builds for FreeBSD depend=
ing
of other feature flags they use. I'll add it then to the pc file.

Marcin