[v4,4/4] net/intel: allow building ice driver without iavf
Checks
Commit Message
The ice PMD relies on a number of functions from the iavf base code,
which can be got by linking against that iavf driver. However, since
only three C files are necessary here, we can allow ice to be built
independently of iavf by including the base files directly in cases
where iavf is not part of the build. If it is part of the build, the
dependency remains as now.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
drivers/net/intel/iavf/base/iavf_prototype.h | 8 ++++++++
drivers/net/intel/ice/meson.build | 13 ++++++++++++-
2 files changed, 20 insertions(+), 1 deletion(-)
@@ -11,6 +11,14 @@
#include <rte_compat.h>
+/* functions only need exporting if this is being built into
+ * iavf driver itself. If included in ice driver, then no export
+ */
+#ifndef RTE_NET_IAVF
+#undef __rte_internal
+#define __rte_internal
+#endif
+
/* Prototypes for shared code functions that are not in
* the standard function pointer structures. These are
* mostly because they are needed even before the init
@@ -18,9 +18,20 @@ sources = files(
testpmd_sources = files('ice_testpmd.c')
-deps += ['hash', 'net', 'net_iavf']
+deps += ['hash', 'net']
includes += include_directories('base')
+if dpdk_conf.has('RTE_NET_IAVF')
+ deps += 'net_iavf'
+else
+ includes += include_directories('../iavf/base')
+ sources += files(
+ '../iavf/base/iavf_adminq.c',
+ '../iavf/base/iavf_common.c',
+ '../iavf/base/iavf_impl.c',
+ )
+endif
+
if arch_subdir == 'x86'
sources += files('ice_rxtx_vec_sse.c')