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 2EB6646151; Thu, 30 Jan 2025 16:13:01 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E693E40DDB; Thu, 30 Jan 2025 16:12:42 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.10]) by mails.dpdk.org (Postfix) with ESMTP id 21288406BB for ; Thu, 30 Jan 2025 16:12:38 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738249960; x=1769785960; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Iz1KGo5sijvN+11xfF7arpJySAHh5XFJ0HcEwWhRtO4=; b=TDoUQNOumYFUkFyxDeG0BxfeUmPgtAgfKOvdCI0FqlaznFGhkxWSI4hf jX8NfVjOiweQX0addGkPr2GkLPMXrOLNSuLOhisaG57tPkQxnIembPw+J z9KPJzciFFcVoQCZZ6MA7Zh26LCWe6DS+Q1Re3MHeL5DQYSQ1v4Qxmd97 bdr8IQCOgVeas4PPE8ruTGtboORRixyQTzxjE366oLU88YH/AEkJ58GdF pK9j5mTtArD0sc3KGPADwcl1OLVtfOfzRHYOLpfCjy3Wtmld9Ocq8T8QF oUI6aqKYyPgZY9foW2G3uwW2rLpR4YNl8AZgQeKSWHBa2ADyh35+4eOsW A==; X-CSE-ConnectionGUID: smANCLwhStKLRi9519Qf0Q== X-CSE-MsgGUID: j6EjcDb7RrOTGk9p72b/dw== X-IronPort-AV: E=McAfee;i="6700,10204,11331"; a="56224966" X-IronPort-AV: E=Sophos;i="6.13,245,1732608000"; d="scan'208";a="56224966" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by orvoesa102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2025 07:12:39 -0800 X-CSE-ConnectionGUID: UMzqplzYQ6KyB/5ltj37UQ== X-CSE-MsgGUID: QDmvuhQkTIKFZ1t5ONlobQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,245,1732608000"; d="scan'208";a="109181596" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa006.fm.intel.com with ESMTP; 30 Jan 2025 07:12:37 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Vladimir Medvedkin , Ian Stokes , Anatoly Burakov Subject: [PATCH v3 4/4] net/intel: allow building ice driver without iavf Date: Thu, 30 Jan 2025 15:12:21 +0000 Message-ID: <20250130151222.944561-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250130151222.944561-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250130151222.944561-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