From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 37EB356A3 for ; Tue, 2 Apr 2019 05:55:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 20:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910254" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:00 -0700 From: Anand Rawat To: dev@dpdk.org Cc: anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net Date: Mon, 1 Apr 2019 20:54:51 -0700 Message-Id: <20190402035458.14664-4-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190402035458.14664-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v8 03/10] eal: add new rte_os.h header to build system X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Apr 2019 03:55:02 -0000 Added rte_os.h files to support OS specific functionality. Updated build system to contain OS headers in the include path. Signed-off-by: Anand Rawat Reviewed-by: Pallavi Kadam --- lib/librte_eal/freebsd/eal/Makefile | 4 ++-- lib/librte_eal/freebsd/eal/include/rte_os.h | 14 ++++++++++++++ lib/librte_eal/linux/eal/Makefile | 3 ++- lib/librte_eal/linux/eal/include/rte_os.h | 14 ++++++++++++++ lib/librte_eal/windows/eal/include/rte_os.h | 14 ++++++++++++++ meson.build | 6 ++++-- mk/exec-env/freebsd/rte.vars.mk | 5 ++++- mk/exec-env/linux/rte.vars.mk | 5 ++++- 8 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 lib/librte_eal/freebsd/eal/include/rte_os.h create mode 100644 lib/librte_eal/linux/eal/include/rte_os.h create mode 100644 lib/librte_eal/windows/eal/include/rte_os.h diff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile index 55d476e5b..19854ee2c 100644 --- a/lib/librte_eal/freebsd/eal/Makefile +++ b/lib/librte_eal/freebsd/eal/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2015 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation include $(RTE_SDK)/mk/rte.vars.mk @@ -86,7 +86,7 @@ CFLAGS_eal_thread.o += -Wno-return-type CFLAGS_eal_hpet.o += -Wno-return-type endif -INC := # no bsd specific headers +INC := rte_os.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_FREEBSD)-include := $(addprefix include/,$(INC)) diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h new file mode 100644 index 000000000..49cd4d4d9 --- /dev/null +++ b/lib/librte_eal/freebsd/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * freebsd OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile index 2aa6e8c6a..6e5261152 100644 --- a/lib/librte_eal/linux/eal/Makefile +++ b/lib/librte_eal/linux/eal/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2016 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation include $(RTE_SDK)/mk/rte.vars.mk @@ -94,6 +94,7 @@ CFLAGS_eal_thread.o += -Wno-return-type endif INC := rte_kni_common.h +INC += rte_os.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_LINUX)-include := $(addprefix include/,$(INC)) diff --git a/lib/librte_eal/linux/eal/include/rte_os.h b/lib/librte_eal/linux/eal/include/rte_os.h new file mode 100644 index 000000000..bc6ad14d2 --- /dev/null +++ b/lib/librte_eal/linux/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * linux OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/windows/eal/include/rte_os.h b/lib/librte_eal/windows/eal/include/rte_os.h new file mode 100644 index 000000000..421ed8e7f --- /dev/null +++ b/lib/librte_eal/windows/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * Windows OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/meson.build b/meson.build index 6061c4b1e..5a93c1f1a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation project('DPDK', 'C', # Get version number from file. @@ -24,7 +24,9 @@ dpdk_app_link_libraries = [] # configure the build, and make sure configs here and in config folder are # able to be included in any file. We also store a global array of include dirs # for passing to pmdinfogen scripts -global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include') +global_inc = include_directories('.', 'config', + 'lib/librte_eal/common/include', + 'lib/librte_eal/@0@/eal/include'.format(host_machine.system())) subdir('config') # build libs and drivers diff --git a/mk/exec-env/freebsd/rte.vars.mk b/mk/exec-env/freebsd/rte.vars.mk index c6be560b3..3608530d3 100644 --- a/mk/exec-env/freebsd/rte.vars.mk +++ b/mk/exec-env/freebsd/rte.vars.mk @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2014 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation # # exec-env: @@ -17,6 +17,9 @@ else EXECENV_CFLAGS = -pthread endif +# include in every library to build +EXECENV_CFLAGS += -I$(RTE_SDK)/lib/librte_eal/freebsd/eal/include + EXECENV_LDFLAGS = EXECENV_LDLIBS = -lexecinfo EXECENV_ASFLAGS = diff --git a/mk/exec-env/linux/rte.vars.mk b/mk/exec-env/linux/rte.vars.mk index d04d0e29c..bea3f7657 100644 --- a/mk/exec-env/linux/rte.vars.mk +++ b/mk/exec-env/linux/rte.vars.mk @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2014 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation # # exec-env: @@ -17,6 +17,9 @@ else EXECENV_CFLAGS = -pthread endif +# include in every library to build +EXECENV_CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linux/eal/include + EXECENV_LDLIBS = EXECENV_ASFLAGS = -- 2.17.1.windows.2 From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by dpdk.space (Postfix) with ESMTP id 26A6DA0679 for ; Tue, 2 Apr 2019 05:55:26 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1D2B35B2E; Tue, 2 Apr 2019 05:55:10 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by dpdk.org (Postfix) with ESMTP id 37EB356A3 for ; Tue, 2 Apr 2019 05:55:02 +0200 (CEST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga004.jf.intel.com ([10.7.209.38]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Apr 2019 20:55:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.60,298,1549958400"; d="scan'208";a="287910254" Received: from anandraw-devbx.amr.corp.intel.com ([10.19.242.57]) by orsmga004.jf.intel.com with ESMTP; 01 Apr 2019 20:55:00 -0700 From: Anand Rawat To: dev@dpdk.org Cc: anand.rawat@intel.com, pallavi.kadam@intel.com, ranjit.menon@intel.com, jeffrey.b.shaw@intel.com, bruce.richardson@intel.com, thomas@monjalon.net Date: Mon, 1 Apr 2019 20:54:51 -0700 Message-Id: <20190402035458.14664-4-anand.rawat@intel.com> X-Mailer: git-send-email 2.17.1.windows.2 In-Reply-To: <20190402035458.14664-1-anand.rawat@intel.com> References: <20190306041634.12976-1-anand.rawat@intel.com> <20190402035458.14664-1-anand.rawat@intel.com> Subject: [dpdk-dev] [PATCH v8 03/10] eal: add new rte_os.h header to build system X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" Content-Type: text/plain; charset="UTF-8" Message-ID: <20190402035451.lJOcPICMg_7tCvAGGFaqOjF_sQoy_oXaNxpXIhizKK4@z> Added rte_os.h files to support OS specific functionality. Updated build system to contain OS headers in the include path. Signed-off-by: Anand Rawat Reviewed-by: Pallavi Kadam --- lib/librte_eal/freebsd/eal/Makefile | 4 ++-- lib/librte_eal/freebsd/eal/include/rte_os.h | 14 ++++++++++++++ lib/librte_eal/linux/eal/Makefile | 3 ++- lib/librte_eal/linux/eal/include/rte_os.h | 14 ++++++++++++++ lib/librte_eal/windows/eal/include/rte_os.h | 14 ++++++++++++++ meson.build | 6 ++++-- mk/exec-env/freebsd/rte.vars.mk | 5 ++++- mk/exec-env/linux/rte.vars.mk | 5 ++++- 8 files changed, 58 insertions(+), 7 deletions(-) create mode 100644 lib/librte_eal/freebsd/eal/include/rte_os.h create mode 100644 lib/librte_eal/linux/eal/include/rte_os.h create mode 100644 lib/librte_eal/windows/eal/include/rte_os.h diff --git a/lib/librte_eal/freebsd/eal/Makefile b/lib/librte_eal/freebsd/eal/Makefile index 55d476e5b..19854ee2c 100644 --- a/lib/librte_eal/freebsd/eal/Makefile +++ b/lib/librte_eal/freebsd/eal/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2015 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation include $(RTE_SDK)/mk/rte.vars.mk @@ -86,7 +86,7 @@ CFLAGS_eal_thread.o += -Wno-return-type CFLAGS_eal_hpet.o += -Wno-return-type endif -INC := # no bsd specific headers +INC := rte_os.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_FREEBSD)-include := $(addprefix include/,$(INC)) diff --git a/lib/librte_eal/freebsd/eal/include/rte_os.h b/lib/librte_eal/freebsd/eal/include/rte_os.h new file mode 100644 index 000000000..49cd4d4d9 --- /dev/null +++ b/lib/librte_eal/freebsd/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * freebsd OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/linux/eal/Makefile b/lib/librte_eal/linux/eal/Makefile index 2aa6e8c6a..6e5261152 100644 --- a/lib/librte_eal/linux/eal/Makefile +++ b/lib/librte_eal/linux/eal/Makefile @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2016 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation include $(RTE_SDK)/mk/rte.vars.mk @@ -94,6 +94,7 @@ CFLAGS_eal_thread.o += -Wno-return-type endif INC := rte_kni_common.h +INC += rte_os.h SYMLINK-$(CONFIG_RTE_EXEC_ENV_LINUX)-include := $(addprefix include/,$(INC)) diff --git a/lib/librte_eal/linux/eal/include/rte_os.h b/lib/librte_eal/linux/eal/include/rte_os.h new file mode 100644 index 000000000..bc6ad14d2 --- /dev/null +++ b/lib/librte_eal/linux/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * linux OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/lib/librte_eal/windows/eal/include/rte_os.h b/lib/librte_eal/windows/eal/include/rte_os.h new file mode 100644 index 000000000..421ed8e7f --- /dev/null +++ b/lib/librte_eal/windows/eal/include/rte_os.h @@ -0,0 +1,14 @@ +/* SPDX-License-Identifier: BSD-3-Clause + * Copyright(c) 2010-2019 Intel Corporation + */ + +#ifndef _RTE_OS_H_ +#define _RTE_OS_H_ + +/** + * This is header should contain any function/macro definition + * which are not supported natively or named differently in the + * Windows OS. Functions will be added in future releases. + */ + +#endif /* _RTE_OS_H_ */ diff --git a/meson.build b/meson.build index 6061c4b1e..5a93c1f1a 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2017 Intel Corporation +# Copyright(c) 2017-2019 Intel Corporation project('DPDK', 'C', # Get version number from file. @@ -24,7 +24,9 @@ dpdk_app_link_libraries = [] # configure the build, and make sure configs here and in config folder are # able to be included in any file. We also store a global array of include dirs # for passing to pmdinfogen scripts -global_inc = include_directories('.', 'config', 'lib/librte_eal/common/include') +global_inc = include_directories('.', 'config', + 'lib/librte_eal/common/include', + 'lib/librte_eal/@0@/eal/include'.format(host_machine.system())) subdir('config') # build libs and drivers diff --git a/mk/exec-env/freebsd/rte.vars.mk b/mk/exec-env/freebsd/rte.vars.mk index c6be560b3..3608530d3 100644 --- a/mk/exec-env/freebsd/rte.vars.mk +++ b/mk/exec-env/freebsd/rte.vars.mk @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2014 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation # # exec-env: @@ -17,6 +17,9 @@ else EXECENV_CFLAGS = -pthread endif +# include in every library to build +EXECENV_CFLAGS += -I$(RTE_SDK)/lib/librte_eal/freebsd/eal/include + EXECENV_LDFLAGS = EXECENV_LDLIBS = -lexecinfo EXECENV_ASFLAGS = diff --git a/mk/exec-env/linux/rte.vars.mk b/mk/exec-env/linux/rte.vars.mk index d04d0e29c..bea3f7657 100644 --- a/mk/exec-env/linux/rte.vars.mk +++ b/mk/exec-env/linux/rte.vars.mk @@ -1,5 +1,5 @@ # SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2010-2014 Intel Corporation +# Copyright(c) 2010-2019 Intel Corporation # # exec-env: @@ -17,6 +17,9 @@ else EXECENV_CFLAGS = -pthread endif +# include in every library to build +EXECENV_CFLAGS += -I$(RTE_SDK)/lib/librte_eal/linux/eal/include + EXECENV_LDLIBS = EXECENV_ASFLAGS = -- 2.17.1.windows.2