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>
Acked-by: Thomas Monjalon <thomas@monjalon.net>
# 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)
#ifndef _PMD_ATLANTIC_H_
#define _PMD_ATLANTIC_H_
-#include <rte_ethdev_driver.h>
+#include <rte_compat.h>
/**
* @warning
#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
*
*/
-#include <rte_ethdev_driver.h>
-
/**
* Enable/Disable TX loopback
*
*
*/
-#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
#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.