net/*/base: allow experimental APIs in base of avf and qede

Message ID 20181004131835.32734-1-i.maximets@samsung.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/*/base: allow experimental APIs in base of avf and qede |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK

Commit Message

Ilya Maximets Oct. 4, 2018, 1:18 p.m. UTC
  This functionality was missed while adding new drivers to
the meson build.

Fixes: 1d75caf81474 ("net/avf: add meson support")
Fixes: 30d3d0168301 ("net/qede: add in meson build")

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
---
 drivers/net/avf/base/meson.build  | 3 +++
 drivers/net/qede/base/meson.build | 3 +++
 2 files changed, 6 insertions(+)
  

Comments

Bruce Richardson Oct. 4, 2018, 1:37 p.m. UTC | #1
On Thu, Oct 04, 2018 at 04:18:35PM +0300, Ilya Maximets wrote:
> This functionality was missed while adding new drivers to
> the meson build.
> 
> Fixes: 1d75caf81474 ("net/avf: add meson support")
> Fixes: 30d3d0168301 ("net/qede: add in meson build")
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
  
Ferruh Yigit Oct. 4, 2018, 2:51 p.m. UTC | #2
On 10/4/2018 2:18 PM, Ilya Maximets wrote:
> This functionality was missed while adding new drivers to
> the meson build.

Is there any call from base code to experimental APIs? What do you think adding
this when we need it, since I have feeling that this may not be needed.

> 
> Fixes: 1d75caf81474 ("net/avf: add meson support")
> Fixes: 30d3d0168301 ("net/qede: add in meson build")
> 
> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
> ---
>  drivers/net/avf/base/meson.build  | 3 +++
>  drivers/net/qede/base/meson.build | 3 +++
>  2 files changed, 6 insertions(+)
> 
> diff --git a/drivers/net/avf/base/meson.build b/drivers/net/avf/base/meson.build
> index 90fd6b445..6f3d7192e 100644
> --- a/drivers/net/avf/base/meson.build
> +++ b/drivers/net/avf/base/meson.build
> @@ -8,6 +8,9 @@ sources = [
>  
>  error_cflags = ['-Wno-pointer-to-int-cast']
>  c_args = cflags
> +if allow_experimental_apis
> +	c_args += '-DALLOW_EXPERIMENTAL_API'
> +endif
>  foreach flag: error_cflags
>  	if cc.has_argument(flag)
>  		c_args += flag
> diff --git a/drivers/net/qede/base/meson.build b/drivers/net/qede/base/meson.build
> index 59b41c895..71b89737d 100644
> --- a/drivers/net/qede/base/meson.build
> +++ b/drivers/net/qede/base/meson.build
> @@ -45,6 +45,9 @@ error_cflags = [
>  	'-Wno-pointer-bool-conversion',
>  ]
>  c_args = cflags
> +if allow_experimental_apis
> +	c_args += '-DALLOW_EXPERIMENTAL_API'
> +endif
>  foreach flag: error_cflags
>          if cc.has_argument(flag)
>                  c_args += flag
>
  
Ilya Maximets Oct. 4, 2018, 3:10 p.m. UTC | #3
On 04.10.2018 17:51, Ferruh Yigit wrote:
> On 10/4/2018 2:18 PM, Ilya Maximets wrote:
>> This functionality was missed while adding new drivers to
>> the meson build.
> 
> Is there any call from base code to experimental APIs? What do you think adding
> this when we need it, since I have feeling that this may not be needed.

The patch itself does not enable the experimental APIs, it only
adds the ability to enable them in the future. It's actually
pretty hard for the person that not much familiar with meson to
find out why your code provides deprecation warnings. I spent
few hours trying to make it work but failed. After that Bruce found
that 'base' code parts ignores 'allow_experimental_apis' flag and
prepared the patch. Thank you, Bruce!
This patch possibly will save a few hours for someone like me, who
will try to enable experimental APIs for avf and qede drivers.

And I already need avf part for my patch set with nanosleep
based delay:
	http://patches.dpdk.org/cover/46088/

> 
>>
>> Fixes: 1d75caf81474 ("net/avf: add meson support")
>> Fixes: 30d3d0168301 ("net/qede: add in meson build")
>>
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
>>  drivers/net/avf/base/meson.build  | 3 +++
>>  drivers/net/qede/base/meson.build | 3 +++
>>  2 files changed, 6 insertions(+)
>>
>> diff --git a/drivers/net/avf/base/meson.build b/drivers/net/avf/base/meson.build
>> index 90fd6b445..6f3d7192e 100644
>> --- a/drivers/net/avf/base/meson.build
>> +++ b/drivers/net/avf/base/meson.build
>> @@ -8,6 +8,9 @@ sources = [
>>  
>>  error_cflags = ['-Wno-pointer-to-int-cast']
>>  c_args = cflags
>> +if allow_experimental_apis
>> +	c_args += '-DALLOW_EXPERIMENTAL_API'
>> +endif
>>  foreach flag: error_cflags
>>  	if cc.has_argument(flag)
>>  		c_args += flag
>> diff --git a/drivers/net/qede/base/meson.build b/drivers/net/qede/base/meson.build
>> index 59b41c895..71b89737d 100644
>> --- a/drivers/net/qede/base/meson.build
>> +++ b/drivers/net/qede/base/meson.build
>> @@ -45,6 +45,9 @@ error_cflags = [
>>  	'-Wno-pointer-bool-conversion',
>>  ]
>>  c_args = cflags
>> +if allow_experimental_apis
>> +	c_args += '-DALLOW_EXPERIMENTAL_API'
>> +endif
>>  foreach flag: error_cflags
>>          if cc.has_argument(flag)
>>                  c_args += flag
>>
> 
> 
>
  
Bruce Richardson Oct. 4, 2018, 3:23 p.m. UTC | #4
On Thu, Oct 04, 2018 at 06:10:12PM +0300, Ilya Maximets wrote:
> On 04.10.2018 17:51, Ferruh Yigit wrote:
> > On 10/4/2018 2:18 PM, Ilya Maximets wrote:
> >> This functionality was missed while adding new drivers to
> >> the meson build.
> > 
> > Is there any call from base code to experimental APIs? What do you think adding
> > this when we need it, since I have feeling that this may not be needed.
> 
> The patch itself does not enable the experimental APIs, it only
> adds the ability to enable them in the future. It's actually
> pretty hard for the person that not much familiar with meson to
> find out why your code provides deprecation warnings. I spent
> few hours trying to make it work but failed. After that Bruce found
> that 'base' code parts ignores 'allow_experimental_apis' flag and
> prepared the patch. Thank you, Bruce!
> This patch possibly will save a few hours for someone like me, who
> will try to enable experimental APIs for avf and qede drivers.
> 
> And I already need avf part for my patch set with nanosleep
> based delay:
> 	http://patches.dpdk.org/cover/46088/
> 
+1, I think it should be added, as it basically just is allowing
passthrough of the flag to the base drivers.

/Bruce
  
Ferruh Yigit Oct. 25, 2018, 1:29 p.m. UTC | #5
On 10/4/2018 4:10 PM, Ilya Maximets wrote:
> On 04.10.2018 17:51, Ferruh Yigit wrote:
>> On 10/4/2018 2:18 PM, Ilya Maximets wrote:
>>> This functionality was missed while adding new drivers to
>>> the meson build.
>>
>> Is there any call from base code to experimental APIs? What do you think adding
>> this when we need it, since I have feeling that this may not be needed.
> 
> The patch itself does not enable the experimental APIs, it only
> adds the ability to enable them in the future. It's actually
> pretty hard for the person that not much familiar with meson to
> find out why your code provides deprecation warnings. I spent
> few hours trying to make it work but failed. After that Bruce found
> that 'base' code parts ignores 'allow_experimental_apis' flag and
> prepared the patch. Thank you, Bruce!
> This patch possibly will save a few hours for someone like me, who
> will try to enable experimental APIs for avf and qede drivers.
> 
> And I already need avf part for my patch set with nanosleep
> based delay:
> 	http://patches.dpdk.org/cover/46088/

Taking into account that there is already a need,

Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
  
Ferruh Yigit Oct. 26, 2018, 1:56 p.m. UTC | #6
On 10/4/2018 2:37 PM, Bruce Richardson wrote:
> On Thu, Oct 04, 2018 at 04:18:35PM +0300, Ilya Maximets wrote:
>> This functionality was missed while adding new drivers to
>> the meson build.
>>
>> Fixes: 1d75caf81474 ("net/avf: add meson support")
>> Fixes: 30d3d0168301 ("net/qede: add in meson build")
>>
>> Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
>> ---
> Acked-by: Bruce Richardson <bruce.richardson@intel.com>

Applied to dpdk-next-net/master, thanks.
  

Patch

diff --git a/drivers/net/avf/base/meson.build b/drivers/net/avf/base/meson.build
index 90fd6b445..6f3d7192e 100644
--- a/drivers/net/avf/base/meson.build
+++ b/drivers/net/avf/base/meson.build
@@ -8,6 +8,9 @@  sources = [
 
 error_cflags = ['-Wno-pointer-to-int-cast']
 c_args = cflags
+if allow_experimental_apis
+	c_args += '-DALLOW_EXPERIMENTAL_API'
+endif
 foreach flag: error_cflags
 	if cc.has_argument(flag)
 		c_args += flag
diff --git a/drivers/net/qede/base/meson.build b/drivers/net/qede/base/meson.build
index 59b41c895..71b89737d 100644
--- a/drivers/net/qede/base/meson.build
+++ b/drivers/net/qede/base/meson.build
@@ -45,6 +45,9 @@  error_cflags = [
 	'-Wno-pointer-bool-conversion',
 ]
 c_args = cflags
+if allow_experimental_apis
+	c_args += '-DALLOW_EXPERIMENTAL_API'
+endif
 foreach flag: error_cflags
         if cc.has_argument(flag)
                 c_args += flag