Move the device module to the common library.
Signed-off-by: Chaoyong He <chaoyong.he@corigine.com>
Reviewed-by: Long Wu <long.wu@corigine.com>
Reviewed-by: Peng Zhang <peng.zhang@corigine.com>
---
drivers/common/nfp/meson.build | 1 +
drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.c | 0
drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.h | 3 +++
drivers/common/nfp/version.map | 1 +
drivers/net/nfp/meson.build | 1 -
drivers/net/nfp/nfp_net_common.h | 2 +-
drivers/net/nfp/nfpcore/nfp6000_pcie.h | 2 +-
7 files changed, 7 insertions(+), 3 deletions(-)
rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.c (100%)
rename drivers/{net/nfp/nfpcore => common/nfp}/nfp_dev.h (96%)
@@ -10,6 +10,7 @@ sources = files(
'nfp_common.c',
'nfp_common_log.c',
'nfp_common_pci.c',
+ 'nfp_dev.c',
)
deps += ['bus_pci', 'net']
similarity index 100%
rename from drivers/net/nfp/nfpcore/nfp_dev.c
rename to drivers/common/nfp/nfp_dev.c
similarity index 96%
rename from drivers/net/nfp/nfpcore/nfp_dev.h
rename to drivers/common/nfp/nfp_dev.h
@@ -8,6 +8,8 @@
#include <stdint.h>
+#include <rte_compat.h>
+
#define PCI_VENDOR_ID_NETRONOME 0x19ee
#define PCI_VENDOR_ID_CORIGINE 0x1da8
@@ -39,6 +41,7 @@ struct nfp_dev_info {
uint8_t pf_num_per_unit;
};
+__rte_internal
const struct nfp_dev_info *nfp_dev_info_get(uint16_t device_id);
#endif /* __NFP_DEV_H__ */
@@ -10,6 +10,7 @@ INTERNAL {
nfp_write_mac;
nfp_enable_queues;
nfp_disable_queues;
+ nfp_dev_info_get;
local: *;
};
@@ -16,7 +16,6 @@ sources = files(
'nfdk/nfp_nfdk_dp.c',
'nfpcore/nfp_cppcore.c',
'nfpcore/nfp_crc.c',
- 'nfpcore/nfp_dev.c',
'nfpcore/nfp_hwinfo.c',
'nfpcore/nfp_mip.c',
'nfpcore/nfp_mutex.c',
@@ -9,10 +9,10 @@
#include <bus_pci_driver.h>
#include <ethdev_driver.h>
#include <nfp_common.h>
+#include <nfp_dev.h>
#include <rte_spinlock.h>
#include "nfp_net_ctrl.h"
-#include "nfpcore/nfp_dev.h"
/* Interrupt definitions */
#define NFP_NET_IRQ_LSC_IDX 0
@@ -7,9 +7,9 @@
#define __NFP6000_PCIE_H__
#include <ethdev_pci.h>
+#include <nfp_dev.h>
#include "nfp_cpp.h"
-#include "nfp_dev.h"
const struct nfp_cpp_operations *nfp_cpp_transport_operations(void);