DPDK patches and discussions
 help / color / mirror / Atom feed
From: Marcin Zapolski <marcinx.a.zapolski@intel.com>
To: dev@dpdk.org
Cc: Marcin Zapolski <marcinx.a.zapolski@intel.com>
Subject: [dpdk-dev] [RFC 19.11 2/2] ethdev: hide DPDK internal struct from public API
Date: Tue, 30 Jul 2019 14:49:50 +0200	[thread overview]
Message-ID: <20190730124950.1293-3-marcinx.a.zapolski@intel.com> (raw)
In-Reply-To: <20190730124950.1293-1-marcinx.a.zapolski@intel.com>

Remove rte_eth_dev, rte_eth_dev_data and rte_eth_dev_ops from
public API (make rte_ethdev_core APIs private). They are DPDK internal
structures and as such should not be accessed by user applications
directly.

Signed-off-by: Marcin Zapolski <marcinx.a.zapolski@intel.com>
---
 drivers/net/cxgbe/base/adapter.h               | 1 +
 drivers/net/netvsc/hn_nvs.c                    | 1 +
 drivers/net/netvsc/hn_rxtx.c                   | 1 +
 lib/librte_ethdev/ethdev_private.h             | 1 +
 lib/librte_ethdev/ethdev_profile.h             | 1 +
 lib/librte_ethdev/rte_ethdev.h                 | 3 ---
 lib/librte_ethdev/rte_ethdev_driver.h          | 1 +
 lib/librte_ethdev/rte_flow.c                   | 1 +
 lib/librte_ethdev/rte_flow_driver.h            | 1 +
 lib/librte_ethdev/rte_mtr.c                    | 1 +
 lib/librte_ethdev/rte_mtr_driver.h             | 1 +
 lib/librte_ethdev/rte_tm.c                     | 1 +
 lib/librte_ethdev/rte_tm_driver.h              | 1 +
 lib/librte_eventdev/rte_event_eth_rx_adapter.c | 1 +
 lib/librte_eventdev/rte_event_eth_tx_adapter.c | 1 +
 lib/librte_eventdev/rte_eventdev.c             | 1 +
 lib/librte_telemetry/rte_telemetry.c           | 1 +
 17 files changed, 16 insertions(+), 3 deletions(-)

diff --git a/drivers/net/cxgbe/base/adapter.h b/drivers/net/cxgbe/base/adapter.h
index e548f9f63..f303030ab 100644
--- a/drivers/net/cxgbe/base/adapter.h
+++ b/drivers/net/cxgbe/base/adapter.h
@@ -13,6 +13,7 @@
 #include <rte_io.h>
 #include <rte_rwlock.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
 
 #include "../cxgbe_compat.h"
 #include "../cxgbe_ofld.h"
diff --git a/drivers/net/netvsc/hn_nvs.c b/drivers/net/netvsc/hn_nvs.c
index 6b518685a..1c1a5cf05 100644
--- a/drivers/net/netvsc/hn_nvs.c
+++ b/drivers/net/netvsc/hn_nvs.c
@@ -17,6 +17,7 @@
 #include <unistd.h>
 
 #include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
 #include <rte_string_fns.h>
 #include <rte_memzone.h>
 #include <rte_malloc.h>
diff --git a/drivers/net/netvsc/hn_rxtx.c b/drivers/net/netvsc/hn_rxtx.c
index 7212780c1..d744976dc 100644
--- a/drivers/net/netvsc/hn_rxtx.c
+++ b/drivers/net/netvsc/hn_rxtx.c
@@ -13,6 +13,7 @@
 #include <malloc.h>
 
 #include <rte_ethdev.h>
+#include <rte_ethdev_driver.h>
 #include <rte_memcpy.h>
 #include <rte_string_fns.h>
 #include <rte_memzone.h>
diff --git a/lib/librte_ethdev/ethdev_private.h b/lib/librte_ethdev/ethdev_private.h
index 7b787bf97..9dca7600b 100644
--- a/lib/librte_ethdev/ethdev_private.h
+++ b/lib/librte_ethdev/ethdev_private.h
@@ -6,6 +6,7 @@
 #define _RTE_ETH_PRIVATE_H_
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/librte_ethdev/ethdev_profile.h b/lib/librte_ethdev/ethdev_profile.h
index 65031e6f3..99edb96b0 100644
--- a/lib/librte_ethdev/ethdev_profile.h
+++ b/lib/librte_ethdev/ethdev_profile.h
@@ -6,6 +6,7 @@
 #define _RTE_ETHDEV_PROFILE_H_
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 
 /**
  * Initialization of the Ethernet device profiling.
diff --git a/lib/librte_ethdev/rte_ethdev.h b/lib/librte_ethdev/rte_ethdev.h
index 3438cb681..a8559ca2d 100644
--- a/lib/librte_ethdev/rte_ethdev.h
+++ b/lib/librte_ethdev/rte_ethdev.h
@@ -3993,9 +3993,6 @@ rte_eth_dev_pool_ops_supported(uint16_t port_id, const char *pool);
 void *
 rte_eth_dev_get_sec_ctx(uint16_t port_id);
 
-
-#include <rte_ethdev_core.h>
-
 /**
  *
  * Retrieve a burst of input packets from a receive queue of an Ethernet
diff --git a/lib/librte_ethdev/rte_ethdev_driver.h b/lib/librte_ethdev/rte_ethdev_driver.h
index 936ff8c98..be6720949 100644
--- a/lib/librte_ethdev/rte_ethdev_driver.h
+++ b/lib/librte_ethdev/rte_ethdev_driver.h
@@ -16,6 +16,7 @@
  */
 
 #include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
 
 #ifdef __cplusplus
 extern "C" {
diff --git a/lib/librte_ethdev/rte_flow.c b/lib/librte_ethdev/rte_flow.c
index 18fcb018e..1ecc03fef 100644
--- a/lib/librte_ethdev/rte_flow.c
+++ b/lib/librte_ethdev/rte_flow.c
@@ -13,6 +13,7 @@
 #include <rte_branch_prediction.h>
 #include <rte_string_fns.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_flow_driver.h"
 #include "rte_flow.h"
 
diff --git a/lib/librte_ethdev/rte_flow_driver.h b/lib/librte_ethdev/rte_flow_driver.h
index a0359853e..ad6eb7b5a 100644
--- a/lib/librte_ethdev/rte_flow_driver.h
+++ b/lib/librte_ethdev/rte_flow_driver.h
@@ -18,6 +18,7 @@
 #include <stdint.h>
 
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_flow.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_mtr.c b/lib/librte_ethdev/rte_mtr.c
index 3073ac03f..485489262 100644
--- a/lib/librte_ethdev/rte_mtr.c
+++ b/lib/librte_ethdev/rte_mtr.c
@@ -7,6 +7,7 @@
 #include <rte_errno.h>
 #include "rte_compat.h"
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_mtr_driver.h"
 #include "rte_mtr.h"
 
diff --git a/lib/librte_ethdev/rte_mtr_driver.h b/lib/librte_ethdev/rte_mtr_driver.h
index 3ec7ffa2a..2fae4cace 100644
--- a/lib/librte_ethdev/rte_mtr_driver.h
+++ b/lib/librte_ethdev/rte_mtr_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_mtr.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_ethdev/rte_tm.c b/lib/librte_ethdev/rte_tm.c
index 9709454f3..b32329060 100644
--- a/lib/librte_ethdev/rte_tm.c
+++ b/lib/librte_ethdev/rte_tm.c
@@ -6,6 +6,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_tm_driver.h"
 #include "rte_tm.h"
 
diff --git a/lib/librte_ethdev/rte_tm_driver.h b/lib/librte_ethdev/rte_tm_driver.h
index 90114ff53..675e0c371 100644
--- a/lib/librte_ethdev/rte_tm_driver.h
+++ b/lib/librte_ethdev/rte_tm_driver.h
@@ -18,6 +18,7 @@
 
 #include <rte_errno.h>
 #include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
 #include "rte_tm.h"
 
 #ifdef __cplusplus
diff --git a/lib/librte_eventdev/rte_event_eth_rx_adapter.c b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
index 95dd47820..b0b642eb6 100644
--- a/lib/librte_eventdev/rte_event_eth_rx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_rx_adapter.c
@@ -12,6 +12,7 @@
 #include <rte_dev.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
 #include <rte_log.h>
 #include <rte_malloc.h>
 #include <rte_service_component.h>
diff --git a/lib/librte_eventdev/rte_event_eth_tx_adapter.c b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
index d02ef57f4..52f3f3c55 100644
--- a/lib/librte_eventdev/rte_event_eth_tx_adapter.c
+++ b/lib/librte_eventdev/rte_event_eth_tx_adapter.c
@@ -4,6 +4,7 @@
 #include <rte_spinlock.h>
 #include <rte_service_component.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
 
 #include "rte_eventdev_pmd.h"
 #include "rte_event_eth_tx_adapter.h"
diff --git a/lib/librte_eventdev/rte_eventdev.c b/lib/librte_eventdev/rte_eventdev.c
index f44c869cb..d29a8d7d9 100644
--- a/lib/librte_eventdev/rte_eventdev.c
+++ b/lib/librte_eventdev/rte_eventdev.c
@@ -30,6 +30,7 @@
 #include <rte_malloc.h>
 #include <rte_errno.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
 #include <rte_cryptodev.h>
 #include <rte_cryptodev_pmd.h>
 
diff --git a/lib/librte_telemetry/rte_telemetry.c b/lib/librte_telemetry/rte_telemetry.c
index eb20cc651..a544728e1 100644
--- a/lib/librte_telemetry/rte_telemetry.c
+++ b/lib/librte_telemetry/rte_telemetry.c
@@ -11,6 +11,7 @@
 
 #include <rte_eal.h>
 #include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
 #include <rte_metrics.h>
 #include <rte_option.h>
 #include <rte_string_fns.h>
-- 
2.17.1


  parent reply	other threads:[~2019-07-30 13:09 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-07-30 12:49 [dpdk-dev] [RFC 19.11 0/2] Hide " Marcin Zapolski
2019-07-30 12:49 ` [dpdk-dev] [RFC 19.11 1/2] ethdev: make DPDK core functions non-inline Marcin Zapolski
2019-07-30 15:01   ` Jerin Jacob Kollanukkaran
2019-07-30 15:32     ` Bruce Richardson
2019-07-30 15:25   ` Stephen Hemminger
2019-07-30 15:33     ` Bruce Richardson
2019-07-30 15:54       ` Stephen Hemminger
2019-07-30 16:04         ` Wiles, Keith
2019-07-30 16:11         ` Bruce Richardson
2019-07-30 16:23           ` Stephen Hemminger
2019-07-30 12:49 ` Marcin Zapolski [this message]
2019-07-30 14:53   ` [dpdk-dev] [RFC 19.11 2/2] ethdev: hide DPDK internal struct from public API Ferruh Yigit
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 0/3] Hide " Marcin Zapolski
2019-09-06 14:00   ` Bruce Richardson
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 1/3] ethdev: hide key ethdev structures " Marcin Zapolski
2019-09-06 14:37   ` Ferruh Yigit
2019-09-09  8:07     ` Zapolski, MarcinX A
2019-09-09  9:59       ` Ferruh Yigit
2019-09-09 10:02         ` Zapolski, MarcinX A
2019-09-09 10:24           ` Ferruh Yigit
2019-09-09 11:41             ` Zapolski, MarcinX A
2019-09-14 10:34             ` Jerin Jacob
2019-09-06 17:24   ` Stephen Hemminger
2019-09-09  9:01     ` Zapolski, MarcinX A
2019-09-10  9:59   ` Zapolski, MarcinX A
2019-09-10 10:06     ` Bruce Richardson
2019-09-10 10:13       ` Zapolski, MarcinX A
2019-09-10 12:19         ` Bruce Richardson
2019-09-10 12:22           ` Zapolski, MarcinX A
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 2/3] i40e: make driver compatible with changes in ethdev Marcin Zapolski
2019-09-06 13:18 ` [dpdk-dev] [RFC 19.11 v2 3/3] ixgbe: " Marcin Zapolski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190730124950.1293-3-marcinx.a.zapolski@intel.com \
    --to=marcinx.a.zapolski@intel.com \
    --cc=dev@dpdk.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).