[dpdk-dev] [PATCH] ethdev: introduce enable_driver_sdk to install driver headers

Ferruh Yigit ferruh.yigit at intel.com
Fri Mar 12 16:19:36 CET 2021


On 3/11/2021 7:27 PM, Tyler Retzlaff wrote:
> 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 at linux.microsoft.com>
> ---
> 
> it's still unclear to me if we should be renaming the headers:
> 
>    ethdev_driver.h -> rte_ethdev_driver.h
>    ethdev_pci.h -> rte_ethdev_pci.h
>    ethdev_vdev.h -> rte_ethdev_vdev.h
> 
>   lib/librte_ethdev/meson.build | 5 +++++
>   meson_options.txt             | 2 ++
>   2 files changed, 7 insertions(+)
> 
> diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
> index c37b2e377..7ecdec6f0 100644
> --- a/lib/librte_ethdev/meson.build
> +++ b/lib/librte_ethdev/meson.build
> @@ -20,6 +20,11 @@ headers = files('rte_ethdev.h',
>   	'rte_mtr_driver.h',
>   	'rte_tm.h',
>   	'rte_tm_driver.h')
> +if get_option('enable_driver_sdk')
> +headers += files('ethdev_driver.h',
> +	'ethdev_pci.h',
> +	'ethdev_vdev.h')
> +endif

Instead of adding the "get_option('enable_driver_sdk')" checks to the modules, 
what about a more generic solution, like:

modules assign relevant headers into a new variable, let's say 'pmd_headers', 
and in a high level meson file, all 'pmd_headers' are installed if 
'enable_driver_sdk' enabled?


More information about the dev mailing list