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 461804614B; Thu, 30 Jan 2025 13:49:03 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9F90140693; Thu, 30 Jan 2025 13:48:44 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) by mails.dpdk.org (Postfix) with ESMTP id D4E9040687 for ; Thu, 30 Jan 2025 13:48:42 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738241323; x=1769777323; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Iz1KGo5sijvN+11xfF7arpJySAHh5XFJ0HcEwWhRtO4=; b=LUgQSEWQAyTGayoy55kRFhtdQoteiara4+HUTMrqGFv8fW9cC4EuhwOA DGu3kpu3+KEw9RFP0elpjFdLAaSn9wocgkEXEAgrg/1DdhHCOuYV5BauC huwcWS1jLuhfhRzwWjYIgd4X4d/bcAUoUJTVzl8iMi2B3l2HNl51x7ede Wxdc/ZjkBmeGrrBnRCHVFjoqCWaUVmIIe0rO4wbOZee82LwnGHjrw0GNz jJNP/Enod3fPKNchdr1psW7onuSp2yHn2T/A3sSleKzreH9P2NnUla4I1 ptKjKtz5wuO+evpWsNYnZ4HLY5QxfWDuT4GSv3S1cem/nKjCIQYwAbDin w==; X-CSE-ConnectionGUID: qUfc0rh/TiC630TxcmVM/w== X-CSE-MsgGUID: UhhsZYH/S3CICLgcxu5gLA== X-IronPort-AV: E=McAfee;i="6700,10204,11314"; a="50201736" X-IronPort-AV: E=Sophos;i="6.12,310,1728975600"; d="scan'208";a="50201736" Received: from fmviesa006.fm.intel.com ([10.60.135.146]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2025 04:48:43 -0800 X-CSE-ConnectionGUID: aqoaFz54RBuxjqjo3Dhb4w== X-CSE-MsgGUID: 701gx5YCRHqwt8ZoYqLzfg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.13,245,1732608000"; d="scan'208";a="109143845" 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 04:48:41 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Vladimir Medvedkin , Ian Stokes , Anatoly Burakov Subject: [PATCH v2 4/4] net/intel: allow building ice driver without iavf Date: Thu, 30 Jan 2025 12:48:19 +0000 Message-ID: <20250130124820.433890-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250130124820.433890-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250130124820.433890-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