ethdev: install driver headers

Introduce a meson option 'enable_driver_sdk', when true installs internal
driver headers for ethdev. This allows drivers that do not depend on
stable api/abi to be built external to the dpdk source tree.

Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
This commit is contained in:
Tyler Retzlaff 2021-03-12 14:20:06 -08:00 committed by Ferruh Yigit
parent 6911e7c22c
commit 19cc526d6c
3 changed files with 12 additions and 0 deletions

View File

@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
'rte_mtr_driver.h', 'rte_mtr_driver.h',
'rte_tm.h', 'rte_tm.h',
'rte_tm_driver.h') 'rte_tm_driver.h')
indirect_headers += files( indirect_headers += files(
'rte_ethdev_core.h', 'rte_ethdev_core.h',
'rte_eth_ctrl.h') 'rte_eth_ctrl.h')
driver_sdk_headers += files(
'ethdev_driver.h',
'ethdev_pci.h',
'ethdev_vdev.h')
deps += ['net', 'kvargs', 'meter', 'telemetry'] deps += ['net', 'kvargs', 'meter', 'telemetry']

View File

@ -67,6 +67,7 @@ foreach l:libraries
sources = [] sources = []
headers = [] headers = []
indirect_headers = [] # public headers not directly included by apps indirect_headers = [] # public headers not directly included by apps
driver_sdk_headers = [] # public headers included by drivers
includes = [] includes = []
cflags = default_cflags cflags = default_cflags
objs = [] # other object files to link against, used e.g. for objs = [] # other object files to link against, used e.g. for
@ -105,6 +106,9 @@ foreach l:libraries
dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1) dpdk_conf.set('RTE_LIB_' + name.to_upper(), 1)
install_headers(headers) install_headers(headers)
install_headers(indirect_headers) install_headers(indirect_headers)
if get_option('enable_driver_sdk')
install_headers(driver_sdk_headers)
endif
dpdk_chkinc_headers += headers dpdk_chkinc_headers += headers
libname = 'rte_' + name libname = 'rte_' + name

View File

@ -8,6 +8,8 @@ option('drivers_install_subdir', type: 'string', value: 'dpdk/pmds-<VERSION>',
description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.') description: 'Subdirectory of libdir where to install PMDs. Defaults to using a versioned subdirectory.')
option('enable_docs', type: 'boolean', value: false, option('enable_docs', type: 'boolean', value: false,
description: 'build documentation') description: 'build documentation')
option('enable_driver_sdk', type: 'boolean', value: false,
description: 'Install headers to build drivers.')
option('enable_kmods', type: 'boolean', value: false, option('enable_kmods', type: 'boolean', value: false,
description: 'build kernel modules') description: 'build kernel modules')
option('examples', type: 'string', value: '', option('examples', type: 'string', value: '',