[dpdk-stable] patch 'drivers/net: fix exposing internal headers' has been queued to stable release 19.11.4

luca.boccassi at gmail.com luca.boccassi at gmail.com
Fri Jul 24 13:59:40 CEST 2020


Hi,

FYI, your patch has been queued to stable release 19.11.4

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/20. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Thanks.

Luca Boccassi

---
>From 828839afbd5bb8aebb4b949c3583ff3d5b7ecda1 Mon Sep 17 00:00:00 2001
From: Ferruh Yigit <ferruh.yigit at intel.com>
Date: Fri, 10 Jul 2020 22:43:41 +0100
Subject: [PATCH] drivers/net: fix exposing internal headers

[ upstream commit 61ede39537f45e561dc80eaa23621ce3d2cf9e73 ]

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")

Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
Acked-by: Thomas Monjalon <thomas at monjalon.net>
---
 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 3b2774b3e..d8650db46 100644
--- a/app/test/meson.build
+++ b/app/test/meson.build
@@ -362,6 +362,9 @@ endif
 # specify -D_GNU_SOURCE unconditionally
 cflags += '-D_GNU_SOURCE'
 
+# 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 c0208569b..0100fc16e 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 2e893cc7b..81d0d0e03 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 37eea9b03..8d244bb49 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 915cdf076..4920f701d 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 f62fd761d..d1017c7b1 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.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2020-07-24 12:53:54.035317749 +0100
+++ 0142-drivers-net-fix-exposing-internal-headers.patch	2020-07-24 12:53:48.479010037 +0100
@@ -1,8 +1,10 @@
-From 61ede39537f45e561dc80eaa23621ce3d2cf9e73 Mon Sep 17 00:00:00 2001
+From 828839afbd5bb8aebb4b949c3583ff3d5b7ecda1 Mon Sep 17 00:00:00 2001
 From: Ferruh Yigit <ferruh.yigit at intel.com>
 Date: Fri, 10 Jul 2020 22:43:41 +0100
 Subject: [PATCH] drivers/net: fix exposing internal headers
 
+[ upstream commit 61ede39537f45e561dc80eaa23621ce3d2cf9e73 ]
+
 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.
@@ -19,7 +21,6 @@
 
 Fixes: ffc905f3b856 ("ethdev: separate driver APIs")
 Fixes: ec0dec44ecb9 ("net/atlantic: enable MACsec configuration")
-Cc: stable at dpdk.org
 
 Signed-off-by: Ferruh Yigit <ferruh.yigit at intel.com>
 Acked-by: Thomas Monjalon <thomas at monjalon.net>
@@ -33,12 +34,12 @@
  6 files changed, 12 insertions(+), 6 deletions(-)
 
 diff --git a/app/test/meson.build b/app/test/meson.build
-index e0d33ea5e..786a21397 100644
+index 3b2774b3e..d8650db46 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'
+@@ -362,6 +362,9 @@ endif
+ # specify -D_GNU_SOURCE unconditionally
+ cflags += '-D_GNU_SOURCE'
  
 +# Enable using internal APIs in unit tests
 +cflags += ['-DALLOW_INTERNAL_API']
@@ -87,7 +88,7 @@
   * Enable/Disable TX loopback
   *
 diff --git a/drivers/net/i40e/rte_pmd_i40e.h b/drivers/net/i40e/rte_pmd_i40e.h
-index 0f6715efc..fc3560c28 100644
+index 915cdf076..4920f701d 100644
 --- a/drivers/net/i40e/rte_pmd_i40e.h
 +++ b/drivers/net/i40e/rte_pmd_i40e.h
 @@ -14,7 +14,9 @@
@@ -102,7 +103,7 @@
  /**
   * 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 8b6bb99a5..90fc8160b 100644
+index f62fd761d..d1017c7b1 100644
 --- a/drivers/net/ixgbe/rte_pmd_ixgbe.h
 +++ b/drivers/net/ixgbe/rte_pmd_ixgbe.h
 @@ -11,7 +11,9 @@


More information about the stable mailing list