drivers/net: fix exposing internal headers

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: ffc905f3b8 ("ethdev: separate driver APIs")
Fixes: ec0dec44ec ("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>
This commit is contained in:
Ferruh Yigit 2020-07-10 22:43:41 +01:00
parent 198e745083
commit 61ede39537
6 changed files with 12 additions and 6 deletions

View File

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

View File

@ -11,7 +11,7 @@
#ifndef _PMD_ATLANTIC_H_
#define _PMD_ATLANTIC_H_
#include <rte_ethdev_driver.h>
#include <rte_compat.h>
/**
* @warning

View File

@ -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

View File

@ -15,8 +15,6 @@
*
*/
#include <rte_ethdev_driver.h>
/**
* Enable/Disable TX loopback
*

View File

@ -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

View File

@ -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.