From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1236F460D6; Tue, 28 Jan 2025 17:37:32 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5FD6440E68; Tue, 28 Jan 2025 17:37:19 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.17]) by mails.dpdk.org (Postfix) with ESMTP id 054B640EDF for ; Tue, 28 Jan 2025 17:37:17 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738082238; x=1769618238; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Iz1KGo5sijvN+11xfF7arpJySAHh5XFJ0HcEwWhRtO4=; b=jjO01RxgidjL8IRs9eXoODhj4wJ93wUMkuhxaDdLqyu4g3K1Moa74j1Y NrgTTOCqg4/NDPxqDApc6Pl0KA9bCXI7KsN5wq5U9ZfelbgGQYJ5BSKHv sB0VDo85DxsH3BFrrLFCh76tR1+vUFfIUwGeIr0bNjpyi6OEz8hk4KBDy 78jeCTGcYbIET0bhum4pa3enptIr12954EC88oiBW5sqQbv4sSEel8ozX kd7M7r9lFjCm4oxFB+ldTocX6BASpnCdo/xXRnSb1kLSnxOFHg7MfIDG3 VYJOvdKJ2KjXZ8OI3BTxkCPbDFwbrqwkQo51P4BZjlNBHnAp1jFF35Te0 g==; X-CSE-ConnectionGUID: WMByQmYcQ7iEUbH8L9T6Sg== X-CSE-MsgGUID: WoW+ALDwQjSI3EohluX61w== X-IronPort-AV: E=McAfee;i="6700,10204,11329"; a="38606392" X-IronPort-AV: E=Sophos;i="6.13,241,1732608000"; d="scan'208";a="38606392" Received: from fmviesa005.fm.intel.com ([10.60.135.145]) by orvoesa109.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Jan 2025 08:37:18 -0800 X-CSE-ConnectionGUID: JJssMHgpTYi64x5WLI2Cbw== X-CSE-MsgGUID: vAB9WO/DR4+ZBwT9+mvA5Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="113403446" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa005.fm.intel.com with ESMTP; 28 Jan 2025 08:37:16 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Vladimir Medvedkin , Ian Stokes , Anatoly Burakov Subject: [PATCH 4/4] net/intel: allow building ice driver without iavf Date: Tue, 28 Jan 2025 16:36:48 +0000 Message-ID: <20250128163649.343336-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250128163649.343336-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org 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 --- 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 +/* 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