eal: move common header files

The EAL API (with doxygen documentation) is moved from
common/include/ to include/, which makes more clear that
it is the global API for all environments and architectures.

Note that the arch-specific and OS-specific include files are not
in this global include directory, but include/generic/ should
cover the doxygen documentation for them.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: David Marchand <david.marchand@redhat.com>
This commit is contained in:
Thomas Monjalon 2020-03-27 02:15:38 +01:00 committed by David Marchand
parent df3ff6be2b
commit 9c1e0dc39a
78 changed files with 124 additions and 134 deletions

View File

@ -142,8 +142,8 @@ F: .ci/
ABI versioning
M: Neil Horman <nhorman@tuxdriver.com>
F: lib/librte_eal/common/include/rte_compat.h
F: lib/librte_eal/common/include/rte_function_versioning.h
F: lib/librte_eal/include/rte_compat.h
F: lib/librte_eal/include/rte_function_versioning.h
F: doc/guides/rel_notes/deprecation.rst
F: devtools/check-abi.sh
F: devtools/check-abi-version.sh
@ -169,7 +169,7 @@ T: git://dpdk.org/dpdk
EAL API and common code
F: lib/librte_eal/common/
F: lib/librte_eal/common/include/
F: lib/librte_eal/include/
F: lib/librte_eal/rte_eal_version.map
F: doc/guides/prog_guide/env_abstraction_layer.rst
F: app/test/test_alarm.c
@ -196,9 +196,9 @@ F: app/test/test_version.c
Memory Allocation
M: Anatoly Burakov <anatoly.burakov@intel.com>
F: lib/librte_eal/common/include/rte_fbarray.h
F: lib/librte_eal/common/include/rte_mem*
F: lib/librte_eal/common/include/rte_malloc.h
F: lib/librte_eal/include/rte_fbarray.h
F: lib/librte_eal/include/rte_mem*
F: lib/librte_eal/include/rte_malloc.h
F: lib/librte_eal/common/*malloc*
F: lib/librte_eal/common/eal_common_fbarray.c
F: lib/librte_eal/common/eal_common_mem*
@ -214,7 +214,7 @@ F: app/test/test_memory.c
F: app/test/test_memzone.c
Keep alive
F: lib/librte_eal/common/include/rte_keepalive.h
F: lib/librte_eal/include/rte_keepalive.h
F: lib/librte_eal/common/rte_keepalive.c
F: examples/l2fwd-keepalive/
F: doc/guides/sample_app_ug/keep_alive.rst
@ -230,30 +230,30 @@ F: doc/guides/sample_app_ug/multi_process.rst
Service Cores
M: Harry van Haaren <harry.van.haaren@intel.com>
F: lib/librte_eal/common/include/rte_service.h
F: lib/librte_eal/common/include/rte_service_component.h
F: lib/librte_eal/include/rte_service.h
F: lib/librte_eal/include/rte_service_component.h
F: lib/librte_eal/common/rte_service.c
F: doc/guides/prog_guide/service_cores.rst
F: app/test/test_service_cores.c
Bitmap
M: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
F: lib/librte_eal/common/include/rte_bitmap.h
F: lib/librte_eal/include/rte_bitmap.h
F: app/test/test_bitmap.c
MCSlock - EXPERIMENTAL
M: Phil Yang <phil.yang@arm.com>
F: lib/librte_eal/common/include/generic/rte_mcslock.h
F: lib/librte_eal/include/generic/rte_mcslock.h
F: app/test/test_mcslock.c
Ticketlock
M: Joyce Kong <joyce.kong@arm.com>
F: lib/librte_eal/common/include/generic/rte_ticketlock.h
F: lib/librte_eal/include/generic/rte_ticketlock.h
F: app/test/test_ticketlock.c
Pseudo-random Number Generation
M: Mattias Rönnblom <mattias.ronnblom@ericsson.com>
F: lib/librte_eal/common/include/rte_random.h
F: lib/librte_eal/include/rte_random.h
F: lib/librte_eal/common/rte_random.c
F: app/test/test_rand_perf.c

View File

@ -6,7 +6,7 @@ if host_machine.system() == 'windows'
endif
pmdinfogen_inc = [global_inc]
pmdinfogen_inc += include_directories('../../lib/librte_eal/common/include')
pmdinfogen_inc += include_directories('../../lib/librte_eal/include')
pmdinfogen_inc += include_directories('../../lib/librte_pci')
pmdinfogen = executable('pmdinfogen',
'pmdinfogen.c',

View File

@ -17,8 +17,8 @@ INPUT = @TOPDIR@/doc/api/doxy-api-index.md \
@TOPDIR@/drivers/net/softnic \
@TOPDIR@/drivers/raw/dpaa2_cmdif \
@TOPDIR@/drivers/raw/dpaa2_qdma \
@TOPDIR@/lib/librte_eal/common/include \
@TOPDIR@/lib/librte_eal/common/include/generic \
@TOPDIR@/lib/librte_eal/include \
@TOPDIR@/lib/librte_eal/include/generic \
@TOPDIR@/lib/librte_acl \
@TOPDIR@/lib/librte_bbdev \
@TOPDIR@/lib/librte_bitratestats \

View File

@ -127,7 +127,7 @@ HPET timers do not work on the Osage customer reference platform
work correctly, provided the BIOS supports HPET.
**Driver/Module**:
``lib/librte_eal/common/include/rte_cycles.h``
``lib/librte_eal/include/rte_cycles.h``
Not all variants of supported NIC types have been used in testing

View File

@ -18,7 +18,7 @@ CFLAGS += -I$(RTE_BUS_DPAA)/
CFLAGS += -I$(RTE_BUS_DPAA)/include
CFLAGS += -I$(RTE_BUS_DPAA)/base/qbman
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
# versioning export map
EXPORT_MAP := rte_bus_dpaa_version.map

View File

@ -203,7 +203,7 @@ if dlopen_ibverbs
dlopen_install_dir = [ eal_pmd_path + '-glue' ]
dlopen_includes = [global_inc]
dlopen_includes += include_directories(
'../../../lib/librte_eal/common/include/generic',
'../../../lib/librte_eal/include/generic',
)
shared_lib = shared_library(
dlopen_lib_name,

View File

@ -20,7 +20,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
CFLAGS += -I$(RTE_SDK)/drivers/crypto/caam_jr
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
# versioning export map
EXPORT_MAP := rte_pmd_caam_jr_version.map

View File

@ -20,7 +20,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa_sec/
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax/caamflib/
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
LDLIBS += -lrte_eal -lrte_mbuf -lrte_mempool -lrte_ring
LDLIBS += -lrte_cryptodev

View File

@ -20,7 +20,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa
CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/include/
CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
LDLIBS += -lrte_pmd_dpaa_sec
CFLAGS += -I$(RTE_SDK)/drivers/crypto/dpaa_sec

View File

@ -21,7 +21,7 @@ CFLAGS += -I$(RTE_SDK)/drivers/bus/dpaa/base/qbman
CFLAGS += -I$(RTE_SDK)/drivers/mempool/dpaa
CFLAGS += -I$(RTE_SDK)/drivers/common/dpaax
CFLAGS += -I$(RTE_SDK)/drivers/event/dpaa
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
EXPORT_MAP := rte_pmd_dpaa_version.map

View File

@ -12,7 +12,7 @@ custom_target('igb_uio',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'EXTRA_CFLAGS=-I' + meson.current_source_dir() +
'/../../../lib/librte_eal/common/include',
'/../../../lib/librte_eal/include',
'modules'],
depends: mkfile,
install: true,

View File

@ -17,7 +17,7 @@ custom_target('rte_kni',
'M=' + meson.current_build_dir(),
'src=' + meson.current_source_dir(),
'MODULE_CFLAGS=-include ' + meson.source_root() + '/config/rte_config.h' +
' -I' + meson.source_root() + '/lib/librte_eal/common/include' +
' -I' + meson.source_root() + '/lib/librte_eal/include' +
' -I' + meson.source_root() + '/lib/librte_eal/linux/eal/include' +
' -I' + meson.build_root() +
' -I' + meson.current_source_dir(),

View File

@ -10,7 +10,7 @@ LIB = librte_cfgfile.a
CFLAGS += -O3
CFLAGS += $(WERROR_FLAGS)
CFLAGS += -I$(SRCDIR)/../librte_eal/common/include
CFLAGS += -I$(SRCDIR)/../librte_eal/include
LDLIBS += -lrte_eal
EXPORT_MAP := rte_cfgfile_version.map

View File

@ -3,10 +3,10 @@
include $(RTE_SDK)/mk/rte.vars.mk
DIRS-y += common
DIRS-y += include
DIRS-$(CONFIG_RTE_EXEC_ENV_LINUX) += linux/eal
DEPDIRS-linux := common
DEPDIRS-linux := include
DIRS-$(CONFIG_RTE_EXEC_ENV_FREEBSD) += freebsd/eal
DEPDIRS-freebsd := common
DEPDIRS-freebsd := include
include $(RTE_SDK)/mk/rte.subdir.mk

View File

@ -1,38 +0,0 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
include $(RTE_SDK)/mk/rte.vars.mk
INC := rte_branch_prediction.h rte_common.h rte_compat.h
INC += rte_function_versioning.h
INC += rte_debug.h rte_eal.h rte_eal_interrupts.h
INC += rte_errno.h rte_launch.h rte_lcore.h
INC += rte_log.h rte_memory.h rte_memzone.h
INC += rte_per_lcore.h rte_random.h
INC += rte_tailq.h rte_interrupts.h rte_alarm.h
INC += rte_string_fns.h rte_version.h
INC += rte_eal_memconfig.h
INC += rte_hexdump.h rte_devargs.h rte_bus.h rte_dev.h rte_class.h
INC += rte_option.h
INC += rte_pci_dev_feature_defs.h rte_pci_dev_features.h
INC += rte_malloc.h rte_keepalive.h rte_time.h
INC += rte_service.h rte_service_component.h
INC += rte_bitmap.h rte_vfio.h rte_hypervisor.h rte_test.h
INC += rte_reciprocal.h rte_fbarray.h rte_uuid.h
GENERIC_INC := rte_atomic.h rte_byteorder.h rte_cycles.h rte_prefetch.h
GENERIC_INC += rte_memcpy.h rte_cpuflags.h
GENERIC_INC += rte_mcslock.h rte_spinlock.h rte_rwlock.h rte_ticketlock.h
GENERIC_INC += rte_vect.h rte_pause.h rte_io.h
# defined in mk/arch/$(RTE_ARCH)/rte.vars.mk
ARCH_DIR ?= $(RTE_ARCH)
ARCH_INC := $(sort $(notdir $(wildcard $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR)/include/*.h)))
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include := $(addprefix include/,$(INC))
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include += \
$(addprefix ../$(ARCH_DIR)/include/,$(ARCH_INC))
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include/generic := \
$(addprefix include/generic/,$(GENERIC_INC))
include $(RTE_SDK)/mk/rte.install.mk

View File

@ -1,7 +1,7 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
eal_inc += include_directories('.', 'include')
includes += include_directories('.')
if is_windows
sources += files(
@ -16,7 +16,9 @@ if is_windows
'eal_common_thread.c',
'rte_option.c',
)
else # temporary bad indent
subdir_done()
endif
sources += files(
'eal_common_bus.c',
'eal_common_cpuflags.c',
@ -52,62 +54,3 @@ sources += files(
'rte_reciprocal.c',
'rte_service.c',
)
endif
common_headers = files(
'include/rte_alarm.h',
'include/rte_branch_prediction.h',
'include/rte_bus.h',
'include/rte_bitmap.h',
'include/rte_class.h',
'include/rte_common.h',
'include/rte_compat.h',
'include/rte_debug.h',
'include/rte_devargs.h',
'include/rte_dev.h',
'include/rte_eal.h',
'include/rte_eal_memconfig.h',
'include/rte_eal_interrupts.h',
'include/rte_errno.h',
'include/rte_fbarray.h',
'include/rte_hexdump.h',
'include/rte_hypervisor.h',
'include/rte_interrupts.h',
'include/rte_keepalive.h',
'include/rte_launch.h',
'include/rte_lcore.h',
'include/rte_log.h',
'include/rte_malloc.h',
'include/rte_memory.h',
'include/rte_memzone.h',
'include/rte_option.h',
'include/rte_pci_dev_feature_defs.h',
'include/rte_pci_dev_features.h',
'include/rte_per_lcore.h',
'include/rte_random.h',
'include/rte_reciprocal.h',
'include/rte_service.h',
'include/rte_service_component.h',
'include/rte_string_fns.h',
'include/rte_tailq.h',
'include/rte_time.h',
'include/rte_uuid.h',
'include/rte_version.h',
'include/rte_vfio.h')
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'include/generic/rte_atomic.h',
'include/generic/rte_byteorder.h',
'include/generic/rte_cpuflags.h',
'include/generic/rte_cycles.h',
'include/generic/rte_io.h',
'include/generic/rte_mcslock.h',
'include/generic/rte_memcpy.h',
'include/generic/rte_pause.h',
'include/generic/rte_prefetch.h',
'include/generic/rte_rwlock.h',
'include/generic/rte_spinlock.h',
'include/generic/rte_ticketlock.h',
'include/generic/rte_vect.h')
install_headers(generic_headers, subdir: 'generic')

View File

@ -10,7 +10,7 @@
#include <rte_compat.h>
#include <rte_service.h>
#include "include/rte_service_component.h"
#include <rte_service_component.h>
#include <rte_eal.h>
#include <rte_lcore.h>

View File

@ -12,7 +12,7 @@ VPATH += $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR)
CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += -I$(SRCDIR)/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
CFLAGS += $(WERROR_FLAGS) -O3
LDLIBS += -lexecinfo

View File

@ -0,0 +1,19 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2010-2014 Intel Corporation
include $(RTE_SDK)/mk/rte.vars.mk
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include := \
$(sort $(notdir \
$(wildcard $(RTE_SDK)/lib/librte_eal/include/*.h)))
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include/generic := \
$(sort $(addprefix generic/, $(notdir \
$(wildcard $(RTE_SDK)/lib/librte_eal/include/generic/*.h))))
ARCH_DIR ?= $(RTE_ARCH)
SYMLINK-$(CONFIG_RTE_LIBRTE_EAL)-include += \
$(sort $(addprefix ../$(ARCH_DIR)/include/, $(notdir \
$(wildcard $(RTE_SDK)/lib/librte_eal/$(ARCH_DIR)/include/*.h))))
include $(RTE_SDK)/mk/rte.install.mk

View File

@ -0,0 +1,64 @@
# SPDX-License-Identifier: BSD-3-Clause
# Copyright(c) 2017 Intel Corporation
includes += include_directories('.')
headers += files(
'rte_alarm.h',
'rte_bitmap.h',
'rte_branch_prediction.h',
'rte_bus.h',
'rte_class.h',
'rte_common.h',
'rte_compat.h',
'rte_debug.h',
'rte_dev.h',
'rte_devargs.h',
'rte_eal.h',
'rte_eal_interrupts.h',
'rte_eal_memconfig.h',
'rte_errno.h',
'rte_fbarray.h',
'rte_hexdump.h',
'rte_hypervisor.h',
'rte_interrupts.h',
'rte_keepalive.h',
'rte_launch.h',
'rte_lcore.h',
'rte_log.h',
'rte_malloc.h',
'rte_memory.h',
'rte_memzone.h',
'rte_option.h',
'rte_pci_dev_feature_defs.h',
'rte_pci_dev_features.h',
'rte_per_lcore.h',
'rte_random.h',
'rte_reciprocal.h',
'rte_service.h',
'rte_service_component.h',
'rte_string_fns.h',
'rte_tailq.h',
'rte_time.h',
'rte_uuid.h',
'rte_version.h',
'rte_vfio.h',
)
# special case install the generic headers, since they go in a subdir
generic_headers = files(
'generic/rte_atomic.h',
'generic/rte_byteorder.h',
'generic/rte_cpuflags.h',
'generic/rte_cycles.h',
'generic/rte_io.h',
'generic/rte_mcslock.h',
'generic/rte_memcpy.h',
'generic/rte_pause.h',
'generic/rte_prefetch.h',
'generic/rte_rwlock.h',
'generic/rte_spinlock.h',
'generic/rte_ticketlock.h',
'generic/rte_vect.h',
)
install_headers(generic_headers, subdir: 'generic')

View File

@ -15,7 +15,7 @@ VPATH += $(RTE_SDK)/lib/librte_eal/common
CFLAGS += -DALLOW_EXPERIMENTAL_API
CFLAGS += -I$(SRCDIR)/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
CFLAGS += $(WERROR_FLAGS) -O3
LDLIBS += -ldl

View File

@ -5,6 +5,8 @@
# have a straight list of headers and source files.
# Initially pull in common settings
eal_inc = [global_inc]
subdir('include')
subdir('common')
# Now do OS/exec-env specific settings, including building kernel modules
@ -27,5 +29,5 @@ if cc.has_header('getopt.h')
endif
sources += env_sources
objs = env_objs
headers = common_headers + env_headers
headers += env_headers
includes += eal_inc

View File

@ -7,7 +7,7 @@ include $(RTE_SDK)/mk/rte.vars.mk
LIB = librte_kvargs.a
CFLAGS += $(WERROR_FLAGS) -I$(SRCDIR) -O3
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/common/include
CFLAGS += -I$(RTE_SDK)/lib/librte_eal/include
EXPORT_MAP := rte_kvargs_version.map

View File

@ -28,7 +28,7 @@ abi_version_file = files('ABI_VERSION')
# 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',
'lib/librte_eal/include',
'lib/librte_eal/@0@/eal/include'.format(host_machine.system()),
)
subdir('config')