DPDK patches and discussions
 help / color / mirror / Atom feed
From: Bruce Richardson <bruce.richardson@intel.com>
To: dev@dpdk.org
Cc: Bruce Richardson <bruce.richardson@intel.com>,
	Vladimir Medvedkin <vladimir.medvedkin@intel.com>,
	Ian Stokes <ian.stokes@intel.com>,
	Anatoly Burakov <anatoly.burakov@intel.com>
Subject: [PATCH 4/4] net/intel: allow building ice driver without iavf
Date: Tue, 28 Jan 2025 16:36:48 +0000	[thread overview]
Message-ID: <20250128163649.343336-5-bruce.richardson@intel.com> (raw)
In-Reply-To: <20250128163649.343336-1-bruce.richardson@intel.com>

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

diff --git a/drivers/net/intel/iavf/base/iavf_prototype.h b/drivers/net/intel/iavf/base/iavf_prototype.h
index 7c43a817bb..5d2ee0a785 100644
--- a/drivers/net/intel/iavf/base/iavf_prototype.h
+++ b/drivers/net/intel/iavf/base/iavf_prototype.h
@@ -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
diff --git a/drivers/net/intel/ice/meson.build b/drivers/net/intel/ice/meson.build
index 5faf887386..f990e62250 100644
--- a/drivers/net/intel/ice/meson.build
+++ b/drivers/net/intel/ice/meson.build
@@ -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')
 
-- 
2.43.0


  parent reply	other threads:[~2025-01-28 16:37 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 16:36 [PATCH 0/4] remove common iavf and idpf drivers Bruce Richardson
2025-01-28 16:36 ` [PATCH 1/4] drivers: merge common and net " Bruce Richardson
2025-01-28 16:36 ` [PATCH 2/4] net/idpf: re-enable unused variable warnings Bruce Richardson
2025-01-28 16:36 ` [PATCH 3/4] drivers: move iavf common folder to iavf net Bruce Richardson
2025-01-28 16:36 ` Bruce Richardson [this message]
2025-01-30 12:48 ` [PATCH v2 0/4] remove common iavf and idpf drivers Bruce Richardson
2025-01-30 12:48   ` [PATCH v2 1/4] drivers: merge common and net " Bruce Richardson
2025-01-30 12:48   ` [PATCH v2 2/4] net/idpf: re-enable unused variable warnings Bruce Richardson
2025-01-30 12:48   ` [PATCH v2 3/4] drivers: move iavf common folder to iavf net Bruce Richardson
2025-01-30 12:48   ` [PATCH v2 4/4] net/intel: allow building ice driver without iavf Bruce Richardson
2025-01-30 13:55   ` [PATCH v2 0/4] remove common iavf and idpf drivers David Marchand
2025-01-30 14:28     ` Bruce Richardson
2025-01-30 15:12 ` [PATCH v3 " Bruce Richardson
2025-01-30 15:12   ` [PATCH v3 1/4] drivers: merge common and net " Bruce Richardson
2025-01-30 15:12   ` [PATCH v3 2/4] net/idpf: re-enable unused variable warnings Bruce Richardson
2025-01-30 15:12   ` [PATCH v3 3/4] drivers: move iavf common folder to iavf net Bruce Richardson
2025-01-30 15:12   ` [PATCH v3 4/4] net/intel: allow building ice driver without iavf Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20250128163649.343336-5-bruce.richardson@intel.com \
    --to=bruce.richardson@intel.com \
    --cc=anatoly.burakov@intel.com \
    --cc=dev@dpdk.org \
    --cc=ian.stokes@intel.com \
    --cc=vladimir.medvedkin@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).