[RFC,19.11,2/2] ethdev: hide DPDK internal struct from public API
Checks
Commit Message
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(-)
Comments
On 7/30/2019 1:49 PM, Marcin Zapolski wrote:
> 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>
Hi Marcin,
"rte_ethdev_core.h" has been created explicitly to hold the code that should be
private but needs to be public because of the static inline functions.
Since static inline functions removed, I think we should remove
"rte_ethdev_core.h" too.
And split its content to "ethdev_private.h" & "rte_ethdev_driver.h".
I didn't investigate details but code should go as much as possible to
"ethdev_private.h" and if it has to it should go to "rte_ethdev_driver.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"
@@ -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>
@@ -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>
@@ -6,6 +6,7 @@
#define _RTE_ETH_PRIVATE_H_
#include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
#ifdef __cplusplus
extern "C" {
@@ -6,6 +6,7 @@
#define _RTE_ETHDEV_PROFILE_H_
#include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
/**
* Initialization of the Ethernet device profiling.
@@ -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
@@ -16,6 +16,7 @@
*/
#include <rte_ethdev.h>
+#include <rte_ethdev_core.h>
#ifdef __cplusplus
extern "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"
@@ -18,6 +18,7 @@
#include <stdint.h>
#include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
#include "rte_flow.h"
#ifdef __cplusplus
@@ -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"
@@ -18,6 +18,7 @@
#include <rte_errno.h>
#include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
#include "rte_mtr.h"
#ifdef __cplusplus
@@ -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"
@@ -18,6 +18,7 @@
#include <rte_errno.h>
#include "rte_ethdev.h"
+#include "rte_ethdev_core.h"
#include "rte_tm.h"
#ifdef __cplusplus
@@ -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>
@@ -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"
@@ -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>
@@ -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>