patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] [PATCH v7 1/3] drivers/net: fix build with internal API usage
       [not found] <20200710144208.499544-1-ferruh.yigit@intel.com>
@ 2020-07-10 21:43 ` Ferruh Yigit
  2020-07-10 22:07   ` Thomas Monjalon
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-07-10 21:43 UTC (permalink / raw)
  To: Igor Russkikh, Pavel Belous, Ajit Khaparde, Somnath Kotur,
	Hemant Agrawal, Sachin Saxena, Beilei Xing, Jeff Guo, Wei Zhao,
	Andrew Rybchenko, Thomas Monjalon, Shreyansh Jain
  Cc: dev, Ferruh Yigit, stable, David Marchand

Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
for applications and examples. Because they don't define
'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
This patch is preparation for future '__rte_internal' usage.

At first place, applications/examples should not include
'rte_ethdev_driver.h', this is happening because of PMD public header
files include 'rte_ethdev_driver.h' by mistake.

Updated PMD public header files to not include internal header files.

But for unit test application, 'app/test', enable accessing internal
APIs, since some unit tests need them.

Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
Cc: stable@dpdk.org

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
Cc: David Marchand <david.marchand@redhat.com>
---
 app/test/meson.build                    | 3 +++
 drivers/net/atlantic/rte_pmd_atlantic.h | 2 +-
 drivers/net/bnxt/rte_pmd_bnxt.h         | 3 ++-
 drivers/net/dpaa/rte_pmd_dpaa.h         | 2 --
 drivers/net/i40e/rte_pmd_i40e.h         | 4 +++-
 drivers/net/ixgbe/rte_pmd_ixgbe.h       | 4 +++-
 6 files changed, 12 insertions(+), 6 deletions(-)

diff --git a/app/test/meson.build b/app/test/meson.build
index e0d33ea5ef..786a213972 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -396,6 +396,9 @@ cflags += '-D_GNU_SOURCE'
 # Strict-aliasing rules are violated by uint8_t[] to context size casts.
 cflags += '-fno-strict-aliasing'
 
+# Enable using internal APIs in unit tests
+cflags += ['-DALLOW_INTERNAL_API']
+
 test_dep_objs = []
 if dpdk_conf.has('RTE_LIBRTE_COMPRESSDEV')
 	compress_test_dep = dependency('zlib', required: false)
diff --git a/drivers/net/atlantic/rte_pmd_atlantic.h b/drivers/net/atlantic/rte_pmd_atlantic.h
index c0208569b6..0100fc16e5 100644
--- a/drivers/net/atlantic/rte_pmd_atlantic.h
+++ b/drivers/net/atlantic/rte_pmd_atlantic.h
@@ -11,7 +11,7 @@
 #ifndef _PMD_ATLANTIC_H_
 #define _PMD_ATLANTIC_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
 
 /**
  * @warning
diff --git a/drivers/net/bnxt/rte_pmd_bnxt.h b/drivers/net/bnxt/rte_pmd_bnxt.h
index 2e893cc7bf..81d0d0e032 100644
--- a/drivers/net/bnxt/rte_pmd_bnxt.h
+++ b/drivers/net/bnxt/rte_pmd_bnxt.h
@@ -6,7 +6,8 @@
 #ifndef _PMD_BNXT_H_
 #define _PMD_BNXT_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /*
  * Response sent back to the caller after callback
diff --git a/drivers/net/dpaa/rte_pmd_dpaa.h b/drivers/net/dpaa/rte_pmd_dpaa.h
index 37eea9b032..8d244bb491 100644
--- a/drivers/net/dpaa/rte_pmd_dpaa.h
+++ b/drivers/net/dpaa/rte_pmd_dpaa.h
@@ -15,8 +15,6 @@
  *
  */
 
-#include <rte_ethdev_driver.h>
-
 /**
  * Enable/Disable TX loopback
  *
diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
index 0f6715efc8..fc3560c28c 100644
--- a/drivers/net/i40e/rte_pmd_i40e.h
+++ b/drivers/net/i40e/rte_pmd_i40e.h
@@ -14,7 +14,9 @@
  *
  */
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /**
  * Response sent back to i40e driver from user app after callback
diff --git a/drivers/net/ixgbe/rte_pmd_ixgbe.h b/drivers/net/ixgbe/rte_pmd_ixgbe.h
index 8b6bb99a58..90fc8160b1 100644
--- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
+++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
@@ -11,7 +11,9 @@
 #ifndef _PMD_IXGBE_H_
 #define _PMD_IXGBE_H_
 
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
+#include <rte_ethdev.h>
+#include <rte_ether.h>
 
 /**
  * Notify VF when PF link status changes.
-- 
2.25.4


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH v7 1/3] drivers/net: fix build with internal API usage
  2020-07-10 21:43 ` [dpdk-stable] [PATCH v7 1/3] drivers/net: fix build with internal API usage Ferruh Yigit
@ 2020-07-10 22:07   ` Thomas Monjalon
  2020-07-10 23:17     ` Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Monjalon @ 2020-07-10 22:07 UTC (permalink / raw)
  To: Ferruh Yigit
  Cc: Igor Russkikh, Pavel Belous, Ajit Khaparde, Somnath Kotur,
	Hemant Agrawal, Sachin Saxena, Beilei Xing, Jeff Guo, Wei Zhao,
	Andrew Rybchenko, Shreyansh Jain, dev, Ferruh Yigit, stable,
	David Marchand

10/07/2020 23:43, Ferruh Yigit:
> Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
> for applications and examples. Because they don't define
> 'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
> This patch is preparation for future '__rte_internal' usage.
> 
> At first place, applications/examples should not include
> 'rte_ethdev_driver.h', this is happening because of PMD public header
> files include 'rte_ethdev_driver.h' by mistake.
> 
> Updated PMD public header files to not include internal header files.
> 
> But for unit test application, 'app/test', enable accessing internal
> APIs, since some unit tests need them.
> 
> Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
> Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Not sure to understand the title but I have no better proposal.
For the explanations and the code,
Acked-by: Thomas Monjalon <thomas@monjalon.net>



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [PATCH v7 1/3] drivers/net: fix build with internal API usage
  2020-07-10 22:07   ` Thomas Monjalon
@ 2020-07-10 23:17     ` Ferruh Yigit
  2020-07-11  0:19       ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
  0 siblings, 1 reply; 4+ messages in thread
From: Ferruh Yigit @ 2020-07-10 23:17 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Igor Russkikh, Pavel Belous, Ajit Khaparde, Somnath Kotur,
	Hemant Agrawal, Sachin Saxena, Beilei Xing, Jeff Guo, Wei Zhao,
	Andrew Rybchenko, Shreyansh Jain, dev, stable, David Marchand

On 7/10/2020 11:07 PM, Thomas Monjalon wrote:
> 10/07/2020 23:43, Ferruh Yigit:
>> Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
>> for applications and examples. Because they don't define
>> 'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
>> This patch is preparation for future '__rte_internal' usage.
>>
>> At first place, applications/examples should not include
>> 'rte_ethdev_driver.h', this is happening because of PMD public header
>> files include 'rte_ethdev_driver.h' by mistake.
>>
>> Updated PMD public header files to not include internal header files.
>>
>> But for unit test application, 'app/test', enable accessing internal
>> APIs, since some unit tests need them.
>>
>> Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
>> Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Not sure to understand the title but I have no better proposal.

Agree, I will change to following:
drivers/net: fix exposing internal headers

> For the explanations and the code,
> Acked-by: Thomas Monjalon <thomas@monjalon.net>
> 
> 


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [dpdk-stable] [dpdk-dev] [PATCH v7 1/3] drivers/net: fix build with internal API usage
  2020-07-10 23:17     ` Ferruh Yigit
@ 2020-07-11  0:19       ` Ferruh Yigit
  0 siblings, 0 replies; 4+ messages in thread
From: Ferruh Yigit @ 2020-07-11  0:19 UTC (permalink / raw)
  To: Thomas Monjalon
  Cc: Igor Russkikh, Pavel Belous, Ajit Khaparde, Somnath Kotur,
	Hemant Agrawal, Sachin Saxena, Beilei Xing, Jeff Guo, Wei Zhao,
	Andrew Rybchenko, Shreyansh Jain, dev, stable, David Marchand

On 7/11/2020 12:17 AM, Ferruh Yigit wrote:
> On 7/10/2020 11:07 PM, Thomas Monjalon wrote:
>> 10/07/2020 23:43, Ferruh Yigit:
>>> Using '__rte_internal' tag in 'rte_ethdev_driver.h' causing build error
>>> for applications and examples. Because they don't define
>>> 'ALLOW_INTERNAL_API' flag and '__rte_internal' causes the error.
>>> This patch is preparation for future '__rte_internal' usage.
>>>
>>> At first place, applications/examples should not include
>>> 'rte_ethdev_driver.h', this is happening because of PMD public header
>>> files include 'rte_ethdev_driver.h' by mistake.
>>>
>>> Updated PMD public header files to not include internal header files.
>>>
>>> But for unit test application, 'app/test', enable accessing internal
>>> APIs, since some unit tests need them.
>>>
>>> Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
>>> Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
>>> Cc: stable@dpdk.org
>>>
>>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>>
>> Not sure to understand the title but I have no better proposal.
> 
> Agree, I will change to following:
> drivers/net: fix exposing internal headers
> 
>> For the explanations and the code,
>> Acked-by: Thomas Monjalon <thomas@monjalon.net>
>>
> 

Series applied to dpdk-next-net/master, thanks.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-07-11  0:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20200710144208.499544-1-ferruh.yigit@intel.com>
2020-07-10 21:43 ` [dpdk-stable] [PATCH v7 1/3] drivers/net: fix build with internal API usage Ferruh Yigit
2020-07-10 22:07   ` Thomas Monjalon
2020-07-10 23:17     ` Ferruh Yigit
2020-07-11  0:19       ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit

patches for DPDK stable branches

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://inbox.dpdk.org/stable/0 stable/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 stable stable/ https://inbox.dpdk.org/stable \
		stable@dpdk.org
	public-inbox-index stable

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.stable


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git