Skip to content

Commit

Permalink
net/intel: allow building ice driver without iavf
Browse files Browse the repository at this point in the history
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 <[email protected]>
Acked-by: Ian Stokes <[email protected]>
  • Loading branch information
bruce-richardson committed Feb 11, 2025
1 parent 2d68cec commit 47be8c2
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
8 changes: 8 additions & 0 deletions drivers/net/intel/iavf/base/iavf_prototype.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 12 additions & 1 deletion drivers/net/intel/ice/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -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')

Expand Down

0 comments on commit 47be8c2

Please sign in to comment.