diff mbox series

[v2] ethdev: introduce enable_driver_sdk to install driver headers

Message ID 1615587606-29329-1-git-send-email-roretzla@linux.microsoft.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers show
Series [v2] ethdev: introduce enable_driver_sdk to install driver headers | expand

Checks

Context Check Description
ci/intel-Testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/iol-abi-testing success Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/github-robot success github build: passed
ci/travis-robot success travis build: passed
ci/Intel-compilation success Compilation OK
ci/checkpatch success coding style OK

Commit Message

Tyler Retzlaff March 12, 2021, 10:20 p.m. UTC
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>
---
 lib/librte_ethdev/meson.build | 6 ++++++
 lib/meson.build               | 4 ++++
 meson_options.txt             | 2 ++
 3 files changed, 12 insertions(+)

Comments

Bruce Richardson March 15, 2021, 10:06 a.m. UTC | #1
On Fri, Mar 12, 2021 at 02:20:06PM -0800, 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@linux.microsoft.com>
> ---
>  lib/librte_ethdev/meson.build | 6 ++++++
>  lib/meson.build               | 4 ++++
>  meson_options.txt             | 2 ++
>  3 files changed, 12 insertions(+)
> 
The infrastructure looks good to me. However, you need to add change to the
cryptodev, eventdev, etc. to add the headers from there too.
Ferruh Yigit March 23, 2021, 5:04 p.m. UTC | #2
On 3/12/2021 10:20 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@linux.microsoft.com>
> ---
>   lib/librte_ethdev/meson.build | 6 ++++++
>   lib/meson.build               | 4 ++++
>   meson_options.txt             | 2 ++
>   3 files changed, 12 insertions(+)
> 
> diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
> index c37b2e377..4353fa6b7 100644
> --- a/lib/librte_ethdev/meson.build
> +++ b/lib/librte_ethdev/meson.build
> @@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
>   	'rte_mtr_driver.h',
>   	'rte_tm.h',
>   	'rte_tm_driver.h')
> +
>   indirect_headers += files(
>   	'rte_ethdev_core.h',
>   	'rte_eth_ctrl.h')
>   
> +driver_sdk_headers += files(
> +	'ethdev_driver.h',
> +	'ethdev_pci.h',
> +	'ethdev_vdev.h')
> +
>   deps += ['net', 'kvargs', 'meter', 'telemetry']
> diff --git a/lib/meson.build b/lib/meson.build
> index 7712aa497..992ebdf63 100644
> --- a/lib/meson.build
> +++ b/lib/meson.build
> @@ -67,6 +67,7 @@ foreach l:libraries
>   	sources = []
>   	headers = []
>   	indirect_headers = [] # public headers not directly included by apps
> +	driver_sdk_headers = [] # public headers included by drivers
>   	includes = []
>   	cflags = default_cflags
>   	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)
>   		install_headers(headers)
>   		install_headers(indirect_headers)
> +		if get_option('enable_driver_sdk')
> +			install_headers(driver_sdk_headers)
> +		endif
>   		dpdk_chkinc_headers += headers
>   
>   		libname = 'rte_' + name
> diff --git a/meson_options.txt b/meson_options.txt
> index 6eff62e47..857874a19 100644
> --- a/meson_options.txt
> +++ b/meson_options.txt
> @@ -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.')
>   option('enable_docs', type: 'boolean', value: false,
>   	description: 'build documentation')
> +option('enable_driver_sdk', type: 'boolean', value: false,
> +	description: 'install internal driver plugin headers')
>   option('enable_kmods', type: 'boolean', value: false,
>   	description: 'build kernel modules')
>   option('examples', type: 'string', value: '',
> 

+Ed, who was looking way to install 'ark_ext.h' for Ark PMD.

Ed,
Can you please review the patch from your perspective?
Tyler Retzlaff March 24, 2021, 4:32 a.m. UTC | #3
On Tue, Mar 23, 2021 at 05:04:08PM +0000, Ferruh Yigit wrote:
> >diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
> >index c37b2e377..4353fa6b7 100644
> >--- a/lib/librte_ethdev/meson.build
> >+++ b/lib/librte_ethdev/meson.build
> >@@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
> >  	'rte_mtr_driver.h',
> >  	'rte_tm.h',
> >  	'rte_tm_driver.h')
> >+
> >  indirect_headers += files(
> >  	'rte_ethdev_core.h',
> >  	'rte_eth_ctrl.h')
> >+driver_sdk_headers += files(
> >+	'ethdev_driver.h',
> >+	'ethdev_pci.h',
> >+	'ethdev_vdev.h')
> >+
> >  deps += ['net', 'kvargs', 'meter', 'telemetry']
> 

i feel like i missed a reply here.  but just to clarify only ethdev will
be covered by this patch. inclusion of other driver headers was
discussed off list (sorry) and it emerged that it would result in
withdraw a number of driver api/abi that had not been marked as
__rte_internal.

for driver api that were being exported as 'stable' a deprecation notice
will need to be issued in order to make them part of the
driver_sdk_headers. for that reason only ethdev is being made available
under this option for now.

please ack/nack the patch as-is

thanks
Ferruh Yigit March 24, 2021, 11:27 a.m. UTC | #4
On 3/24/2021 4:32 AM, Tyler Retzlaff wrote:
> On Tue, Mar 23, 2021 at 05:04:08PM +0000, Ferruh Yigit wrote:
>>> diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
>>> index c37b2e377..4353fa6b7 100644
>>> --- a/lib/librte_ethdev/meson.build
>>> +++ b/lib/librte_ethdev/meson.build
>>> @@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
>>>   	'rte_mtr_driver.h',
>>>   	'rte_tm.h',
>>>   	'rte_tm_driver.h')
>>> +
>>>   indirect_headers += files(
>>>   	'rte_ethdev_core.h',
>>>   	'rte_eth_ctrl.h')
>>> +driver_sdk_headers += files(
>>> +	'ethdev_driver.h',
>>> +	'ethdev_pci.h',
>>> +	'ethdev_vdev.h')
>>> +
>>>   deps += ['net', 'kvargs', 'meter', 'telemetry']
>>
> 
> i feel like i missed a reply here.  but just to clarify only ethdev will
> be covered by this patch. inclusion of other driver headers was
> discussed off list (sorry) and it emerged that it would result in
> withdraw a number of driver api/abi that had not been marked as
> __rte_internal.
> 
> for driver api that were being exported as 'stable' a deprecation notice
> will need to be issued in order to make them part of the
> driver_sdk_headers. for that reason only ethdev is being made available
> under this option for now.
> 
> please ack/nack the patch as-is
> 

I am OK the patch for the ethdev part, hence
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>


But not sure how to manage the same problem for whole project, if install all 
headers in one patch, or add them gradually via separate patches by time ...
Thomas Monjalon March 24, 2021, 11:30 a.m. UTC | #5
24/03/2021 12:27, Ferruh Yigit:
> On 3/24/2021 4:32 AM, Tyler Retzlaff wrote:
> > On Tue, Mar 23, 2021 at 05:04:08PM +0000, Ferruh Yigit wrote:
> >>> diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
> >>> index c37b2e377..4353fa6b7 100644
> >>> --- a/lib/librte_ethdev/meson.build
> >>> +++ b/lib/librte_ethdev/meson.build
> >>> @@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
> >>>   	'rte_mtr_driver.h',
> >>>   	'rte_tm.h',
> >>>   	'rte_tm_driver.h')
> >>> +
> >>>   indirect_headers += files(
> >>>   	'rte_ethdev_core.h',
> >>>   	'rte_eth_ctrl.h')
> >>> +driver_sdk_headers += files(
> >>> +	'ethdev_driver.h',
> >>> +	'ethdev_pci.h',
> >>> +	'ethdev_vdev.h')
> >>> +
> >>>   deps += ['net', 'kvargs', 'meter', 'telemetry']
> >>
> > 
> > i feel like i missed a reply here.  but just to clarify only ethdev will
> > be covered by this patch. inclusion of other driver headers was
> > discussed off list (sorry) and it emerged that it would result in
> > withdraw a number of driver api/abi that had not been marked as
> > __rte_internal.
> > 
> > for driver api that were being exported as 'stable' a deprecation notice
> > will need to be issued in order to make them part of the
> > driver_sdk_headers. for that reason only ethdev is being made available
> > under this option for now.
> > 
> > please ack/nack the patch as-is
> > 
> 
> I am OK the patch for the ethdev part, hence
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> 
> But not sure how to manage the same problem for whole project, if install all 
> headers in one patch, or add them gradually via separate patches by time ...

We did a cleanup in ethdev but not in other driver classes.
When the cleanup will be done gradually, the headers
must move in this new category driver_sdk_headers.
Tyler Retzlaff March 24, 2021, 4:24 p.m. UTC | #6
On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
> 24/03/2021 12:27, Ferruh Yigit:
> > 
> > But not sure how to manage the same problem for whole project, if install all 
> > headers in one patch, or add them gradually via separate patches by time ...
> 
> We did a cleanup in ethdev but not in other driver classes.
> When the cleanup will be done gradually, the headers
> must move in this new category driver_sdk_headers.

yes, some headers are not installed now.  so they need only to have
their api marked __rte_internal and installed (since there should be no
external consumer as a function of not being installed)

the more difficult case is where headers were installed but the api were
not marked __rte_internal and appear in the stable version.map. for
those i guess deprecation notice has to be issued before marking as
internal.
Ferruh Yigit March 26, 2021, 12:02 p.m. UTC | #7
On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
> On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
>> 24/03/2021 12:27, Ferruh Yigit:
>>>
>>> But not sure how to manage the same problem for whole project, if install all
>>> headers in one patch, or add them gradually via separate patches by time ...
>>
>> We did a cleanup in ethdev but not in other driver classes.
>> When the cleanup will be done gradually, the headers
>> must move in this new category driver_sdk_headers.
> 
> yes, some headers are not installed now.  so they need only to have
> their api marked __rte_internal and installed (since there should be no
> external consumer as a function of not being installed)
> 
> the more difficult case is where headers were installed but the api were
> not marked __rte_internal and appear in the stable version.map. for
> those i guess deprecation notice has to be issued before marking as
> internal.
> 

Are you referring to any specific APIs, can you share list of them?
Tyler Retzlaff March 26, 2021, 8:52 p.m. UTC | #8
On Fri, Mar 26, 2021 at 12:02:55PM +0000, Ferruh Yigit wrote:
> On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
> >On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
> >>24/03/2021 12:27, Ferruh Yigit:
> >>>
> >>>But not sure how to manage the same problem for whole project, if install all
> >>>headers in one patch, or add them gradually via separate patches by time ...
> >>
> >>We did a cleanup in ethdev but not in other driver classes.
> >>When the cleanup will be done gradually, the headers
> >>must move in this new category driver_sdk_headers.
> >
> >yes, some headers are not installed now.  so they need only to have
> >their api marked __rte_internal and installed (since there should be no
> >external consumer as a function of not being installed)
> >
> >the more difficult case is where headers were installed but the api were
> >not marked __rte_internal and appear in the stable version.map. for
> >those i guess deprecation notice has to be issued before marking as
> >internal.
> >
> 
> Are you referring to any specific APIs, can you share list of them?

i can't remember the whole list but Thomas originally indicated the
following candidate list.

    baseband/ -> librte_bbdev/rte_bbdev_pmd.h
    bus/ -> rte_bus.h
    common/ -> no interface
    crypto/ -> librte_cryptodev/rte_cryptodev_pmd.h
    event/ -> librte_eventdev/
    mempool/ -> librte_mempool/
    net/ -> librte_ethdev/
    raw/ -> librte_rawdev/rte_rawdev_pmd.h
    regex/ -> librte_regexdev/rte_regexdev_driver.h
    vdpa/ -> librte_vhost/rte_vdpa_dev.h

some of these headers are not published, some are.
Ferruh Yigit March 29, 2021, 9:43 a.m. UTC | #9
On 3/26/2021 8:52 PM, Tyler Retzlaff wrote:
> On Fri, Mar 26, 2021 at 12:02:55PM +0000, Ferruh Yigit wrote:
>> On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
>>> On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
>>>> 24/03/2021 12:27, Ferruh Yigit:
>>>>>
>>>>> But not sure how to manage the same problem for whole project, if install all
>>>>> headers in one patch, or add them gradually via separate patches by time ...
>>>>
>>>> We did a cleanup in ethdev but not in other driver classes.
>>>> When the cleanup will be done gradually, the headers
>>>> must move in this new category driver_sdk_headers.
>>>
>>> yes, some headers are not installed now.  so they need only to have
>>> their api marked __rte_internal and installed (since there should be no
>>> external consumer as a function of not being installed)
>>>
>>> the more difficult case is where headers were installed but the api were
>>> not marked __rte_internal and appear in the stable version.map. for
>>> those i guess deprecation notice has to be issued before marking as
>>> internal.
>>>
>>
>> Are you referring to any specific APIs, can you share list of them?
> 
> i can't remember the whole list but Thomas originally indicated the
> following candidate list.
> 
>      baseband/ -> librte_bbdev/rte_bbdev_pmd.h
>      bus/ -> rte_bus.h
>      common/ -> no interface
>      crypto/ -> librte_cryptodev/rte_cryptodev_pmd.h
>      event/ -> librte_eventdev/
>      mempool/ -> librte_mempool/
>      net/ -> librte_ethdev/
>      raw/ -> librte_rawdev/rte_rawdev_pmd.h
>      regex/ -> librte_regexdev/rte_regexdev_driver.h
>      vdpa/ -> librte_vhost/rte_vdpa_dev.h
> 
> some of these headers are not published, some are.
> 

These are public headers, so they should not have '__rte_internal' functions, 
are you saying some of public headers has internal functions that are presented 
as public APIs?
Thomas Monjalon March 29, 2021, 12:10 p.m. UTC | #10
29/03/2021 11:43, Ferruh Yigit:
> On 3/26/2021 8:52 PM, Tyler Retzlaff wrote:
> > On Fri, Mar 26, 2021 at 12:02:55PM +0000, Ferruh Yigit wrote:
> >> On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
> >>> On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
> >>>> 24/03/2021 12:27, Ferruh Yigit:
> >>>>>
> >>>>> But not sure how to manage the same problem for whole project, if install all
> >>>>> headers in one patch, or add them gradually via separate patches by time ...
> >>>>
> >>>> We did a cleanup in ethdev but not in other driver classes.
> >>>> When the cleanup will be done gradually, the headers
> >>>> must move in this new category driver_sdk_headers.
> >>>
> >>> yes, some headers are not installed now.  so they need only to have
> >>> their api marked __rte_internal and installed (since there should be no
> >>> external consumer as a function of not being installed)
> >>>
> >>> the more difficult case is where headers were installed but the api were
> >>> not marked __rte_internal and appear in the stable version.map. for
> >>> those i guess deprecation notice has to be issued before marking as
> >>> internal.
> >>>
> >>
> >> Are you referring to any specific APIs, can you share list of them?
> > 
> > i can't remember the whole list but Thomas originally indicated the
> > following candidate list.
> > 
> >      baseband/ -> librte_bbdev/rte_bbdev_pmd.h
> >      bus/ -> rte_bus.h
> >      common/ -> no interface
> >      crypto/ -> librte_cryptodev/rte_cryptodev_pmd.h
> >      event/ -> librte_eventdev/
> >      mempool/ -> librte_mempool/
> >      net/ -> librte_ethdev/
> >      raw/ -> librte_rawdev/rte_rawdev_pmd.h
> >      regex/ -> librte_regexdev/rte_regexdev_driver.h
> >      vdpa/ -> librte_vhost/rte_vdpa_dev.h
> > 
> > some of these headers are not published, some are.
> > 
> 
> These are public headers, so they should not have '__rte_internal' functions, 
> are you saying some of public headers has internal functions that are presented 
> as public APIs?

These are the headers for use by the drivers.
We should classify them as SDK headers, not API.
Ferruh Yigit March 29, 2021, 3:23 p.m. UTC | #11
On 3/29/2021 1:10 PM, Thomas Monjalon wrote:
> 29/03/2021 11:43, Ferruh Yigit:
>> On 3/26/2021 8:52 PM, Tyler Retzlaff wrote:
>>> On Fri, Mar 26, 2021 at 12:02:55PM +0000, Ferruh Yigit wrote:
>>>> On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
>>>>> On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
>>>>>> 24/03/2021 12:27, Ferruh Yigit:
>>>>>>>
>>>>>>> But not sure how to manage the same problem for whole project, if install all
>>>>>>> headers in one patch, or add them gradually via separate patches by time ...
>>>>>>
>>>>>> We did a cleanup in ethdev but not in other driver classes.
>>>>>> When the cleanup will be done gradually, the headers
>>>>>> must move in this new category driver_sdk_headers.
>>>>>
>>>>> yes, some headers are not installed now.  so they need only to have
>>>>> their api marked __rte_internal and installed (since there should be no
>>>>> external consumer as a function of not being installed)
>>>>>
>>>>> the more difficult case is where headers were installed but the api were
>>>>> not marked __rte_internal and appear in the stable version.map. for
>>>>> those i guess deprecation notice has to be issued before marking as
>>>>> internal.
>>>>>
>>>>
>>>> Are you referring to any specific APIs, can you share list of them?
>>>
>>> i can't remember the whole list but Thomas originally indicated the
>>> following candidate list.
>>>
>>>       baseband/ -> librte_bbdev/rte_bbdev_pmd.h
>>>       bus/ -> rte_bus.h
>>>       common/ -> no interface
>>>       crypto/ -> librte_cryptodev/rte_cryptodev_pmd.h
>>>       event/ -> librte_eventdev/
>>>       mempool/ -> librte_mempool/
>>>       net/ -> librte_ethdev/
>>>       raw/ -> librte_rawdev/rte_rawdev_pmd.h
>>>       regex/ -> librte_regexdev/rte_regexdev_driver.h
>>>       vdpa/ -> librte_vhost/rte_vdpa_dev.h
>>>
>>> some of these headers are not published, some are.
>>>
>>
>> These are public headers, so they should not have '__rte_internal' functions,
>> are you saying some of public headers has internal functions that are presented
>> as public APIs?
> 
> These are the headers for use by the drivers.
> We should classify them as SDK headers, not API.
> 

Yes, you are right, they shouldn't be public header.

So, agree to Tyler's comment, that some of those functions needs to be removed 
from the stable API list first, which will take time.

I can proceed with the ethdev one, any objection?

And for the rest of the list, how can we fix them? I guess best option is to 
distribute the work to each library, but we need an owner of the task to follow 
and communicate it.
Thomas Monjalon March 29, 2021, 7:31 p.m. UTC | #12
29/03/2021 17:23, Ferruh Yigit:
> On 3/29/2021 1:10 PM, Thomas Monjalon wrote:
> > 29/03/2021 11:43, Ferruh Yigit:
> >> On 3/26/2021 8:52 PM, Tyler Retzlaff wrote:
> >>> On Fri, Mar 26, 2021 at 12:02:55PM +0000, Ferruh Yigit wrote:
> >>>> On 3/24/2021 4:24 PM, Tyler Retzlaff wrote:
> >>>>> On Wed, Mar 24, 2021 at 12:30:36PM +0100, Thomas Monjalon wrote:
> >>>>>> 24/03/2021 12:27, Ferruh Yigit:
> >>>>>>>
> >>>>>>> But not sure how to manage the same problem for whole project, if install all
> >>>>>>> headers in one patch, or add them gradually via separate patches by time ...
> >>>>>>
> >>>>>> We did a cleanup in ethdev but not in other driver classes.
> >>>>>> When the cleanup will be done gradually, the headers
> >>>>>> must move in this new category driver_sdk_headers.
> >>>>>
> >>>>> yes, some headers are not installed now.  so they need only to have
> >>>>> their api marked __rte_internal and installed (since there should be no
> >>>>> external consumer as a function of not being installed)
> >>>>>
> >>>>> the more difficult case is where headers were installed but the api were
> >>>>> not marked __rte_internal and appear in the stable version.map. for
> >>>>> those i guess deprecation notice has to be issued before marking as
> >>>>> internal.
> >>>>>
> >>>>
> >>>> Are you referring to any specific APIs, can you share list of them?
> >>>
> >>> i can't remember the whole list but Thomas originally indicated the
> >>> following candidate list.
> >>>
> >>>       baseband/ -> librte_bbdev/rte_bbdev_pmd.h
> >>>       bus/ -> rte_bus.h
> >>>       common/ -> no interface
> >>>       crypto/ -> librte_cryptodev/rte_cryptodev_pmd.h
> >>>       event/ -> librte_eventdev/
> >>>       mempool/ -> librte_mempool/
> >>>       net/ -> librte_ethdev/
> >>>       raw/ -> librte_rawdev/rte_rawdev_pmd.h
> >>>       regex/ -> librte_regexdev/rte_regexdev_driver.h
> >>>       vdpa/ -> librte_vhost/rte_vdpa_dev.h
> >>>
> >>> some of these headers are not published, some are.
> >>>
> >>
> >> These are public headers, so they should not have '__rte_internal' functions,
> >> are you saying some of public headers has internal functions that are presented
> >> as public APIs?
> > 
> > These are the headers for use by the drivers.
> > We should classify them as SDK headers, not API.
> > 
> 
> Yes, you are right, they shouldn't be public header.
> 
> So, agree to Tyler's comment, that some of those functions needs to be removed 
> from the stable API list first, which will take time.
> 
> I can proceed with the ethdev one, any objection?

+1

> And for the rest of the list, how can we fix them? I guess best option is to 
> distribute the work to each library, but we need an owner of the task to follow 
> and communicate it.

+1
+Cc techboard
Ferruh Yigit March 30, 2021, 12:50 p.m. UTC | #13
On 3/24/2021 11:27 AM, Ferruh Yigit wrote:
> On 3/24/2021 4:32 AM, Tyler Retzlaff wrote:
>> On Tue, Mar 23, 2021 at 05:04:08PM +0000, Ferruh Yigit wrote:
>>>> diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
>>>> index c37b2e377..4353fa6b7 100644
>>>> --- a/lib/librte_ethdev/meson.build
>>>> +++ b/lib/librte_ethdev/meson.build
>>>> @@ -20,8 +20,14 @@ headers = files('rte_ethdev.h',
>>>>       'rte_mtr_driver.h',
>>>>       'rte_tm.h',
>>>>       'rte_tm_driver.h')
>>>> +
>>>>   indirect_headers += files(
>>>>       'rte_ethdev_core.h',
>>>>       'rte_eth_ctrl.h')
>>>> +driver_sdk_headers += files(
>>>> +    'ethdev_driver.h',
>>>> +    'ethdev_pci.h',
>>>> +    'ethdev_vdev.h')
>>>> +
>>>>   deps += ['net', 'kvargs', 'meter', 'telemetry']
>>>
>>
>> i feel like i missed a reply here.  but just to clarify only ethdev will
>> be covered by this patch. inclusion of other driver headers was
>> discussed off list (sorry) and it emerged that it would result in
>> withdraw a number of driver api/abi that had not been marked as
>> __rte_internal.
>>
>> for driver api that were being exported as 'stable' a deprecation notice
>> will need to be issued in order to make them part of the
>> driver_sdk_headers. for that reason only ethdev is being made available
>> under this option for now.
>>
>> please ack/nack the patch as-is
>>
> 
> I am OK the patch for the ethdev part, hence
> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 

Applied to dpdk-next-net/main, thanks.
diff mbox series

Patch

diff --git a/lib/librte_ethdev/meson.build b/lib/librte_ethdev/meson.build
index c37b2e377..4353fa6b7 100644
--- a/lib/librte_ethdev/meson.build
+++ b/lib/librte_ethdev/meson.build
@@ -20,8 +20,14 @@  headers = files('rte_ethdev.h',
 	'rte_mtr_driver.h',
 	'rte_tm.h',
 	'rte_tm_driver.h')
+
 indirect_headers += files(
 	'rte_ethdev_core.h',
 	'rte_eth_ctrl.h')
 
+driver_sdk_headers += files(
+	'ethdev_driver.h',
+	'ethdev_pci.h',
+	'ethdev_vdev.h')
+
 deps += ['net', 'kvargs', 'meter', 'telemetry']
diff --git a/lib/meson.build b/lib/meson.build
index 7712aa497..992ebdf63 100644
--- a/lib/meson.build
+++ b/lib/meson.build
@@ -67,6 +67,7 @@  foreach l:libraries
 	sources = []
 	headers = []
 	indirect_headers = [] # public headers not directly included by apps
+	driver_sdk_headers = [] # public headers included by drivers
 	includes = []
 	cflags = default_cflags
 	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)
 		install_headers(headers)
 		install_headers(indirect_headers)
+		if get_option('enable_driver_sdk')
+			install_headers(driver_sdk_headers)
+		endif
 		dpdk_chkinc_headers += headers
 
 		libname = 'rte_' + name
diff --git a/meson_options.txt b/meson_options.txt
index 6eff62e47..857874a19 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -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.')
 option('enable_docs', type: 'boolean', value: false,
 	description: 'build documentation')
+option('enable_driver_sdk', type: 'boolean', value: false,
+	description: 'install internal driver plugin headers')
 option('enable_kmods', type: 'boolean', value: false,
 	description: 'build kernel modules')
 option('examples', type: 'string', value: '',