From patchwork Mon Apr 7 15:25:00 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152792 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 7388C46528; Mon, 7 Apr 2025 17:25:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5A9A340B90; Mon, 7 Apr 2025 17:25:20 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id D3B9540A7F for ; Mon, 7 Apr 2025 17:25:16 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039517; x=1775575517; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NNU/0d+l51+SpIVPBgrA0j/98tInPUKtGEaS8MoZLLE=; b=G6/Irbjybl9pr5r2qCxktPW/uUQwj0W/iZovZdEkjzep9Yo4q8VHcldb KjHZ3n0xt6IuzHIjWwPbQA4hLV8dh6vigpaaQfhc55JXi2LH90CDf5I8y HfS3rkDXuSU2o6dIz2EvsBH7+L3Vpfc+FTC35jrVr72b2T+CDKv5dZSxp PxFgh+ZoUBzLdFA/aoSnmEvIYUsxwmz2hH8WntHDhEO0QAtQB3XsgkX+Y iE6x7jEcZDYQhXTsA5DbzSfHY1HJRujLlgg7JqDxf6ycUG/FVww1P9sBQ YlLllcy+51HxDJ9sifbckV60/yMQls2rYrmuBt5H11kM1m83+LiEaogMz A==; X-CSE-ConnectionGUID: dOz2AXGmTA+guxmhRraa6Q== X-CSE-MsgGUID: YKyDWEamT22++08+nIfkcg== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809361" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809361" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:16 -0700 X-CSE-ConnectionGUID: HA2AAC+AQEWn3hRz9SO/Eg== X-CSE-MsgGUID: T+5I8G1XQyST7ik0C1vDaw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125567" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:15 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 01/10] build: add generic support for base code in drivers Date: Mon, 7 Apr 2025 16:25:00 +0100 Message-ID: <20250407152509.2203243-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Add support to the drivers meson.build file for base code files with extra cflags for compilation. This should remove the need for custom logic in each driver. In future, we may want to move the base code handling down the file a little in order to get lock checking. However, this lock checking is not done currently on base code builds, so not all drivers can safely pass these checks. Therefore, we handle the base code files before we add on the extra lock annotation flags. Signed-off-by: Bruce Richardson --- drivers/meson.build | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/meson.build b/drivers/meson.build index c15319dc24..b2d2537dc8 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -145,7 +145,13 @@ foreach subpath:subdirs pkgconfig_extra_libs = [] testpmd_sources = [] require_iova_in_mbuf = true + # for handling base code files which may need extra cflags + base_sources = [] + base_cflags = [] + if fs.is_dir(drv_path / 'base') + includes += include_directories(drv_path / 'base') + endif if name.contains('/') name = name.split('/')[1] endif @@ -216,6 +222,20 @@ foreach subpath:subdirs continue endif + # not all drivers base code is lock annotation safe, so do base code builds before + # adding on the lock annotation flags. NOTE: If no custom cflags, the lock annotation + # checks will be done though. + if base_cflags != [] + base_lib = static_library(lib_name + '_base_lib', + base_sources, + dependencies: static_deps, + include_directories: includes, + c_args: cflags + base_cflags) + objs += base_lib.extract_objects(base_sources) + else + sources += base_sources + endif + enabled_drivers += name lib_name = '_'.join(['rte', class, name]) cflags += '-DRTE_LOG_DEFAULT_LOGTYPE=' + '.'.join([log_prefix, name]) From patchwork Mon Apr 7 15:25:01 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152793 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id B30C346528; Mon, 7 Apr 2025 17:25:28 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 77CC640B98; Mon, 7 Apr 2025 17:25:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id B136B40A7F for ; Mon, 7 Apr 2025 17:25:17 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039518; x=1775575518; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=XcXR/z3tM6W21o70JP90dI0nkUl8KZQJBD9cP1mCAas=; b=mPt9oAynTmdMOTNm6e9z31bO7EWDTqAmXx55ni2Ti0ssU4b83pRiSSeQ btS4cAWH+gPfG/kzqewmRZ0YmJpQA84e3ySuI7fFEY2EBX1sSUTQp8VbF xxzvFkvCyA8Sjt1PDZ0DsVnur36LqYF63ox7w9sbFyZ9HNt2FT1qwQavK keX6Iz+yQH7iIDs7HFEirUCUK2WJDDX2d8fgrE6EvOO6ssJo8lkeLG1T4 q0Ibh9VjGEg1QsTPImxGiypIsYyvdDHQsO9KxjXA152JJ9OSxvumEFN2t gqwayKS/NyeGkaSDOKvwisy0KYld2GemZKLa5woW6106cSgxel5bqjLZK w==; X-CSE-ConnectionGUID: wEZ+L2atSE+L4tBpr8yIdw== X-CSE-MsgGUID: sYD74wB/STylGsnJZP+UqQ== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809363" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809363" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:17 -0700 X-CSE-ConnectionGUID: jhFOzjNuQB+yjXVBeJ+8gw== X-CSE-MsgGUID: qZIlEk+tSDWuA+iq9Q5rlQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125570" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:16 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Andrew Rybchenko Subject: [PATCH v2 02/10] common/sfc_efx: use common base code build handling Date: Mon, 7 Apr 2025 16:25:01 +0100 Message-ID: <20250407152509.2203243-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson Acked-by: Andrew Rybchenko --- drivers/common/sfc_efx/base/meson.build | 18 +++--------------- drivers/common/sfc_efx/meson.build | 3 --- 2 files changed, 3 insertions(+), 18 deletions(-) diff --git a/drivers/common/sfc_efx/base/meson.build b/drivers/common/sfc_efx/base/meson.build index c8deb4555e..58bb5f7b4a 100644 --- a/drivers/common/sfc_efx/base/meson.build +++ b/drivers/common/sfc_efx/base/meson.build @@ -5,7 +5,7 @@ # This software was jointly developed between OKTET Labs (under contract # for Solarflare) and Solarflare Communications, Inc. -sources = [ +base_sources = files( 'efx_bootcfg.c', 'efx_crc32.c', 'efx_ev.c', @@ -64,7 +64,7 @@ sources = [ 'rhead_tunnel.c', 'rhead_tx.c', 'rhead_virtio.c', -] +) if is_ms_compiler extra_flags = [ @@ -80,20 +80,8 @@ else ] endif -c_args = cflags foreach flag: extra_flags if cc.has_argument(flag) - c_args += flag + base_cflags += flag endif endforeach - -if build - base_lib = static_library('sfc_base', sources, - include_directories: includes, - dependencies: static_rte_eal, - c_args: c_args) - - base_objs = base_lib.extract_all_objects(recursive: true) -else - base_objs = [] -endif diff --git a/drivers/common/sfc_efx/meson.build b/drivers/common/sfc_efx/meson.build index 0cf0a23bf8..d8cb6d7b96 100644 --- a/drivers/common/sfc_efx/meson.build +++ b/drivers/common/sfc_efx/meson.build @@ -35,12 +35,9 @@ foreach flag: extra_flags endforeach subdir('base') -objs = [base_objs] deps += ['bus_pci'] sources = files( 'sfc_efx.c', 'sfc_efx_mcdi.c', ) - -includes += include_directories('base') From patchwork Mon Apr 7 15:25:02 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152794 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DA06146528; Mon, 7 Apr 2025 17:25:34 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 9DCDE40B9F; Mon, 7 Apr 2025 17:25:22 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 9509740A8A for ; Mon, 7 Apr 2025 17:25:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039519; x=1775575519; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=UtR/O3cfW27Xv/SYx6dMZLN8/EzVSnEkFnY/AWm01Pk=; b=ZvoxYtcKwfuM3dkJL0I93+q9VZhHnBCVB3EyvoaIkAyyHEgoNDkZ43C+ GfycPcZlNY5LJG0VdcKtaahVr6lzgOwZJ2+RA5itlJqtkHdBho/8CWkRI ilJhixshUB7KQNXUelxU1V6zNc6xxee+walVMyZ+hRfG5IT6AN+Gog9CK iKFJyfOw3L3EohAm3sXTeUQ1s1Hm2iumBg9tzJTcdM409G1LyLhXUacwj yNxlZolvVYXuIhHocr5F7zFF2kOsnRwJSDzsB06QPTbCcA2rsm2nWTyb1 r0XGLHlFgipwrWE3EpaAUXatPBC0F2xq6g0UZM9p6Od2ymqmozSa8+/vS Q==; X-CSE-ConnectionGUID: aJSj3Ax3SNSfwbxZxykW0w== X-CSE-MsgGUID: lKfNy9jnRRix41V+4YBBQQ== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809366" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809366" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:18 -0700 X-CSE-ConnectionGUID: 9v2SFT+pT2ep1J9QIUmYug== X-CSE-MsgGUID: 7SGoBM8/TZKLsKeff0aNyg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125573" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:17 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 03/10] net/hinic: use common base code build handling Date: Mon, 7 Apr 2025 16:25:02 +0100 Message-ID: <20250407152509.2203243-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/hinic/base/meson.build | 16 +++++----------- drivers/net/hinic/meson.build | 1 - 2 files changed, 5 insertions(+), 12 deletions(-) diff --git a/drivers/net/hinic/base/meson.build b/drivers/net/hinic/base/meson.build index 3aa53df881..9028acdf4d 100644 --- a/drivers/net/hinic/base/meson.build +++ b/drivers/net/hinic/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Huawei Technologies Co., Ltd -sources = [ +base_sources = files( 'hinic_pmd_api_cmd.c', 'hinic_pmd_cfg.c', 'hinic_pmd_cmdq.c', @@ -13,7 +13,7 @@ sources = [ 'hinic_pmd_nicio.c', 'hinic_pmd_wq.c', 'hinic_pmd_mbox.c', -] +) extra_flags = [] # The driver runs only on arch64 machine, remove 32bit warnings @@ -22,16 +22,10 @@ if not dpdk_conf.get('RTE_ARCH_64') endif foreach flag: extra_flags - if cc.has_argument(flag) - cflags += flag - endif + if cc.has_argument(flag) + cflags += flag + endif endforeach deps += ['hash'] -c_args = cflags - -base_lib = static_library('hinic_base', sources, - dependencies: [static_rte_eal, static_rte_ethdev, static_rte_bus_pci, static_rte_hash], - c_args: c_args) -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/hinic/meson.build b/drivers/net/hinic/meson.build index 8242e0052e..36cc9431a6 100644 --- a/drivers/net/hinic/meson.build +++ b/drivers/net/hinic/meson.build @@ -8,7 +8,6 @@ if is_windows endif subdir('base') -objs = [base_objs] sources = files( 'hinic_pmd_ethdev.c', From patchwork Mon Apr 7 15:25:03 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152795 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8751F46528; Mon, 7 Apr 2025 17:25:40 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E58E940BA5; Mon, 7 Apr 2025 17:25:23 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id A303840B8F for ; Mon, 7 Apr 2025 17:25:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039520; x=1775575520; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4lBMnhVn6bnnHIxlfafxaKZLmc+b9IXDuETamZ7EoyU=; b=TtNzHe2TQKVmuFXe9dCXQmKwfoZcjAqIoLoBp6CbVXLRugnKM8Yws4f4 115AwB8O02LDXQKy8d2A8atWQwyyNGYjFq89++wM/s7A5ObdV89BNKESD s53scCFdKChFofWVJrvBu7sfSlVCk1IIM1amiFtAiIDLxzK5aePSqhVnv zHjFiigAh9KU9AymkTA5f3lTIJ+hka451MMj4eHumlDr+yUUZXj8/ZwyP fc0Rv82SVTxUHCcJVaA1SLRKHLpgttvY7NqAUtXK5oWixc6Jdjz2APPq/ U6sqS8IrTm4ycF4fgVEGJZophW1G45xFGqRbEAz0I3H9kG1unQsdF/sv4 A==; X-CSE-ConnectionGUID: FfadXbQCQWi/i2bG1dIQZg== X-CSE-MsgGUID: cC77iLxVQbmO8pBC1UGDnQ== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809368" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809368" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:19 -0700 X-CSE-ConnectionGUID: 4zmLI43jQQS7fmk8cEU+gQ== X-CSE-MsgGUID: s6xUljZSTCqZv23ejOLaoQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125576" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:18 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 04/10] net/intel: use common base code build handling Date: Mon, 7 Apr 2025 16:25:03 +0100 Message-ID: <20250407152509.2203243-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the drivers. Signed-off-by: Bruce Richardson --- drivers/net/intel/e1000/meson.build | 3 --- drivers/net/intel/fm10k/meson.build | 3 --- drivers/net/intel/i40e/meson.build | 2 -- drivers/net/intel/iavf/meson.build | 1 - drivers/net/intel/ice/base/meson.build | 13 +++---------- drivers/net/intel/ice/meson.build | 2 -- drivers/net/intel/idpf/meson.build | 1 - drivers/net/intel/ixgbe/meson.build | 3 --- 8 files changed, 3 insertions(+), 25 deletions(-) diff --git a/drivers/net/intel/e1000/meson.build b/drivers/net/intel/e1000/meson.build index b52a843228..924fe4ecae 100644 --- a/drivers/net/intel/e1000/meson.build +++ b/drivers/net/intel/e1000/meson.build @@ -3,7 +3,6 @@ subdir('base') -sources += base_sources sources += files( 'e1000_logs.c', 'em_ethdev.c', @@ -24,5 +23,3 @@ if not is_windows 'igc_txrx.c', ) endif - -includes += include_directories('base') diff --git a/drivers/net/intel/fm10k/meson.build b/drivers/net/intel/fm10k/meson.build index e08a00cb49..fac4750f8d 100644 --- a/drivers/net/intel/fm10k/meson.build +++ b/drivers/net/intel/fm10k/meson.build @@ -9,7 +9,6 @@ endif subdir('base') -sources += base_sources sources += files( 'fm10k_ethdev.c', 'fm10k_rxtx.c', @@ -17,5 +16,3 @@ sources += files( if arch_subdir == 'x86' sources += files('fm10k_rxtx_vec.c') endif - -includes += include_directories('base') diff --git a/drivers/net/intel/i40e/meson.build b/drivers/net/intel/i40e/meson.build index 720706ff1e..49e7f899e6 100644 --- a/drivers/net/intel/i40e/meson.build +++ b/drivers/net/intel/i40e/meson.build @@ -19,7 +19,6 @@ endif subdir('base') -sources += base_sources sources += files( 'i40e_ethdev.c', 'i40e_rxtx.c', @@ -36,7 +35,6 @@ sources += files( testpmd_sources = files('i40e_testpmd.c') deps += ['hash'] -includes += include_directories('base') if arch_subdir == 'x86' sources += files('i40e_rxtx_vec_sse.c') diff --git a/drivers/net/intel/iavf/meson.build b/drivers/net/intel/iavf/meson.build index 7e03881529..3b1da8a796 100644 --- a/drivers/net/intel/iavf/meson.build +++ b/drivers/net/intel/iavf/meson.build @@ -24,7 +24,6 @@ sources = files( 'iavf_ipsec_crypto.c', 'iavf_fsub.c', ) -includes += include_directories('base') if arch_subdir == 'x86' sources += files('iavf_rxtx_vec_sse.c') diff --git a/drivers/net/intel/ice/base/meson.build b/drivers/net/intel/ice/base/meson.build index e7ba9c34bc..f46dbb265f 100644 --- a/drivers/net/intel/ice/base/meson.build +++ b/drivers/net/intel/ice/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018-2021 Intel Corporation -sources = [ +base_sources = files( 'ice_controlq.c', 'ice_common.c', 'ice_sched.c', @@ -29,7 +29,7 @@ sources = [ 'ice_ddp.c', 'ice_fwlog.c', 'ice_vf_mbx.c', -] +) if is_ms_compiler error_cflags = [ @@ -48,15 +48,8 @@ if (toolchain == 'gcc' and cc.version().version_compare('>=11.0.0')) error_cflags += ['-Wno-array-bounds'] endif -c_args = cflags - foreach flag: error_cflags if cc.has_argument(flag) - c_args += flag + base_cflags += flag endif endforeach - -base_lib = static_library('ice_base', sources, - dependencies: static_rte_eal, - c_args: c_args) -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/intel/ice/meson.build b/drivers/net/intel/ice/meson.build index 70ec746e50..8a20d0f297 100644 --- a/drivers/net/intel/ice/meson.build +++ b/drivers/net/intel/ice/meson.build @@ -2,7 +2,6 @@ # Copyright(c) 2018 Intel Corporation subdir('base') -objs = [base_objs] sources = files( 'ice_acl_filter.c', @@ -19,7 +18,6 @@ sources = files( testpmd_sources = files('ice_testpmd.c') deps += ['hash', 'net'] -includes += include_directories('base') if dpdk_conf.has('RTE_NET_IAVF') deps += 'net_iavf' diff --git a/drivers/net/intel/idpf/meson.build b/drivers/net/intel/idpf/meson.build index 44e59c6910..a805d02ea2 100644 --- a/drivers/net/intel/idpf/meson.build +++ b/drivers/net/intel/idpf/meson.build @@ -11,7 +11,6 @@ subdir('base') includes += include_directories('../iavf/base') -sources += base_sources sources += files( 'idpf_common_device.c', 'idpf_common_rxtx.c', diff --git a/drivers/net/intel/ixgbe/meson.build b/drivers/net/intel/ixgbe/meson.build index 23f5a6cb3e..d1122bb9cd 100644 --- a/drivers/net/intel/ixgbe/meson.build +++ b/drivers/net/intel/ixgbe/meson.build @@ -5,7 +5,6 @@ cflags += ['-DRTE_LIBRTE_IXGBE_BYPASS'] subdir('base') -sources += base_sources sources += files( 'ixgbe_82599_bypass.c', 'ixgbe_bypass.c', @@ -32,6 +31,4 @@ elif arch_subdir == 'arm' sources += files('ixgbe_recycle_mbufs_vec_common.c') endif -includes += include_directories('base') - headers = files('rte_pmd_ixgbe.h') From patchwork Mon Apr 7 15:25:04 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152796 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 19E0446528; Mon, 7 Apr 2025 17:25:47 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2A3AD40DCB; Mon, 7 Apr 2025 17:25:25 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 8686D40B95 for ; Mon, 7 Apr 2025 17:25:20 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039521; x=1775575521; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CP3gXYsJhuruklW7LTEPwDgPNFPaXNkzNaRNCxlSBOg=; b=Npy1Yt9gHYfUHGbLvVElMHSfRCP9d9qDsRIloZEPRAYFbNAsIMtl4XGv fu0xCDyCrhyFMw9bYuWOAyj7mAUqpOKia1KJbAPBvLY15Vz13MCPK9LP+ VujbDD+Mr3ssgY5qZbClHAlkXo+VyCtyaI+HmmqO9LQ4vnkYQqFM46F7u mVcgwLHd9KrqqR/HxBlwT+2pYkYQPTRyYWtZvdEiEgrZ3XWD2AkKLXvhd fLfiN8iwrFJ1RGba00pzUgBU44UJmYZeYwa3xAEEoJ8GairhCru6TupWh OK1m4zvLwbsmOjvavrU+RuL+rk99/OMU9J/9l8KH9gMa/TWO7L727RgeG w==; X-CSE-ConnectionGUID: BX/1AL8qRAOi3robrq2f1w== X-CSE-MsgGUID: WvGlIY8fSQGq08QyRHC0nw== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809369" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809369" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:20 -0700 X-CSE-ConnectionGUID: YgGD0kILRQOCjHj9In01Ag== X-CSE-MsgGUID: RorIeoQHRWCK4L/f3yT7VQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125579" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:19 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 05/10] net/ngbe: use common base code build handling Date: Mon, 7 Apr 2025 16:25:04 +0100 Message-ID: <20250407152509.2203243-6-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/ngbe/base/meson.build | 12 ++---------- drivers/net/ngbe/meson.build | 3 --- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/ngbe/base/meson.build b/drivers/net/ngbe/base/meson.build index 86e78d4024..6932f648af 100644 --- a/drivers/net/ngbe/base/meson.build +++ b/drivers/net/ngbe/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018-2021 Beijing WangXun Technology Co., Ltd. -sources = [ +base_sources = files( 'ngbe_eeprom.c', 'ngbe_hw.c', 'ngbe_mbx.c', @@ -11,14 +11,6 @@ sources = [ 'ngbe_phy_mvl.c', 'ngbe_phy_yt.c', 'ngbe_vf.c', -] - -error_cflags = [] +) cflags += no_wvla_cflag -c_args = cflags - -base_lib = static_library('ngbe_base', sources, - dependencies: [static_rte_eal, static_rte_ethdev, static_rte_bus_pci], - c_args: c_args) -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/ngbe/meson.build b/drivers/net/ngbe/meson.build index f4f8f7ee79..319eb23c35 100644 --- a/drivers/net/ngbe/meson.build +++ b/drivers/net/ngbe/meson.build @@ -8,7 +8,6 @@ if is_windows endif subdir('base') -objs = [base_objs] sources = files( 'ngbe_ethdev.c', @@ -25,5 +24,3 @@ if arch_subdir == 'x86' elif arch_subdir == 'arm' sources += files('ngbe_rxtx_vec_neon.c') endif - -includes += include_directories('base') From patchwork Mon Apr 7 15:25:05 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152797 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 44DFC46528; Mon, 7 Apr 2025 17:25:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C829C40DDA; Mon, 7 Apr 2025 17:25:26 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 79D5340B9A for ; Mon, 7 Apr 2025 17:25:21 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039522; x=1775575522; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=2aFzzD0MwjTMciy0zhNLMsPHL7tIVso+r651WXf2QpM=; b=lBh/w/a/NWXIXyuPPTISqiajZ8e0jh8gJyGG/SvhkX7gVH45aVuGTBud GN79yjvAJjUjCBvf+TRdDYK2xv3ZFzIoyyYP6Fk0kkCXHPD0AKJOP8fQ7 8TIzUYqav9YJBxt5HD45iYp2z7slipfUb9puVcKRNTa7NnPMhI1n5eoTm cOeve6Un4LU+4cz0/TcKKWYIZALpM45XfGRPNlToKNuvNFkDcro6MaF9c 7DsK+G36D3U12dFr1e24/A0TM9+T67vMjGDwRPxGtLGXkSalMUEOYeDAt yx3NJjns2xeZEeCzdqNJ8V9GE0ttsdkkmduq9xsv2bK6g0J9xjlKiCgbH w==; X-CSE-ConnectionGUID: Z4Mlng0rTpmXGhhzYo78gQ== X-CSE-MsgGUID: eoObrmrCRxOTIpqG6UlW5g== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809372" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809372" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:21 -0700 X-CSE-ConnectionGUID: PMAMpVszT5uFQjwtM1XUCA== X-CSE-MsgGUID: TVZPcohcQwC9/SHF+wVsfQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125582" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:20 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 06/10] net/octeontx: use common base code build handling Date: Mon, 7 Apr 2025 16:25:05 +0100 Message-ID: <20250407152509.2203243-7-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/octeontx/base/meson.build | 19 +------------------ drivers/net/octeontx/meson.build | 3 --- 2 files changed, 1 insertion(+), 21 deletions(-) diff --git a/drivers/net/octeontx/base/meson.build b/drivers/net/octeontx/base/meson.build index 8e5e8c1b55..244466bd36 100644 --- a/drivers/net/octeontx/base/meson.build +++ b/drivers/net/octeontx/base/meson.build @@ -1,25 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc -sources = [ +base_sources = files( 'octeontx_pkovf.c', 'octeontx_pkivf.c', 'octeontx_bgx.c', -] - -depends = ['ethdev', 'mempool_octeontx'] -static_objs = [] -foreach d: depends - if not is_variable('shared_rte_' + d) - subdir_done() - endif - static_objs += get_variable('static_rte_' + d) -endforeach - -c_args = cflags -base_lib = static_library('octeontx_base', sources, - c_args: c_args, - dependencies: static_objs, ) - -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/octeontx/meson.build b/drivers/net/octeontx/meson.build index 541d2d9d0b..fc8a5a73f2 100644 --- a/drivers/net/octeontx/meson.build +++ b/drivers/net/octeontx/meson.build @@ -8,7 +8,6 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') endif subdir('base') -objs = [base_objs] sources = files( 'octeontx_ethdev.c', @@ -18,6 +17,4 @@ sources = files( deps += ['mempool_octeontx', 'eventdev'] -includes += include_directories('base') - cflags += no_wvla_cflag From patchwork Mon Apr 7 15:25:06 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152798 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 8298346528; Mon, 7 Apr 2025 17:26:02 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBCAB40DF6; Mon, 7 Apr 2025 17:25:27 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 5825840B9A for ; Mon, 7 Apr 2025 17:25:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039523; x=1775575523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=3s/I7QUGE1fdScd20s/exUKDXKaHY1+lz5JDIfodIWY=; b=hRc56UC6rYAAN7xDhEoNgXEeVYZAfTVm0Nddjigq+MvEVb13bY4kPTX3 knmofNF0np4o5LY9VVAgdjngWTkAraPqz31r7Wv16rn/GAb0mlOTbJDDh O+om0OPal17DyUnrElu67GhmKMhKqdvj1qZMViw+dpS1pJGJNE4XGjrG7 xg8ph4bFHoV04m2VaoEarEb1JCC2GouhipbJNr0aw2lnflMNP+h0CqBCX lTOrTG5/XznW/X+Z9BTw5wN/KX4PVPil4Czl0DGnaaBJMQP7fYlln8s52 aMh0l+kQNMwHYQkFq+PPe6kkiydkpSOIHCUeyK1t4rREMitdZ504td1n9 A==; X-CSE-ConnectionGUID: ONJ6Q5OBT+SHeciBum1Kug== X-CSE-MsgGUID: Dx3pfWhpQMurTgnA88F8xQ== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809373" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809373" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:22 -0700 X-CSE-ConnectionGUID: r0t9s8KRRMqDQjrtPYeE7g== X-CSE-MsgGUID: Sbe8aQUuSNS7XjrGIG6RYQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125585" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:21 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 07/10] net/qede: use common base code build handling Date: Mon, 7 Apr 2025 16:25:06 +0100 Message-ID: <20250407152509.2203243-8-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/qede/base/meson.build | 17 +++++------------ drivers/net/qede/meson.build | 1 - 2 files changed, 5 insertions(+), 13 deletions(-) diff --git a/drivers/net/qede/base/meson.build b/drivers/net/qede/base/meson.build index 66251360bf..a6dad3ec7b 100644 --- a/drivers/net/qede/base/meson.build +++ b/drivers/net/qede/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi -sources = [ +base_sources = files( 'bcm_osal.c', 'ecore_cxt.c', 'ecore_dcbx.c', @@ -16,8 +16,7 @@ sources = [ 'ecore_spq.c', 'ecore_sriov.c', 'ecore_vf.c', -] - +) if is_ms_compiler error_cflags = [ @@ -51,14 +50,8 @@ else ] endif -c_args = cflags foreach flag: error_cflags - if cc.has_argument(flag) - c_args += flag - endif + if cc.has_argument(flag) + base_cflags += flag + endif endforeach - -base_lib = static_library('qede_base', sources, - dependencies: [static_rte_net, static_rte_bus_pci], - c_args: c_args) -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/qede/meson.build b/drivers/net/qede/meson.build index 3783e24db7..e1b21d6ff5 100644 --- a/drivers/net/qede/meson.build +++ b/drivers/net/qede/meson.build @@ -8,7 +8,6 @@ if is_windows endif subdir('base') -objs = [base_objs] sources = files( 'qede_debug.c', From patchwork Mon Apr 7 15:25:07 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152799 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 6827046528; Mon, 7 Apr 2025 17:26:09 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3EDB940DDD; Mon, 7 Apr 2025 17:25:29 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 3BE3040BA2 for ; Mon, 7 Apr 2025 17:25:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039523; x=1775575523; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=PYtQC7bgcuwo06DNX7miP6FiwMRNaCDQzb2KC3lrUsI=; b=flpBlXEtumDOV6uw7S0idzTFOfsWPrn1bDxXZDiyGvfbO70T1ezWvWkS 0bjHAy+RMQj8itb1MabTXkehj6wiJ7y8LZXyvUaAQhwI5QwD/bPnPB7B0 cG5sOpumUG+HDtv4xLJPYr9JcKzzhZ7gC1Oo2O6ybfBY/EABi5Ai5ba5o lvfuoA5C3CaE6okz6kvla5AupyjGFqkglUU5lW40R3bG+KIK0aEM7z4lE Nph6MfdkD0obv1nQmWrIeglDMFlyekODEEVKIPLuktHI8Fv9nxbXzXsyF wLLY65aFYRtVbXtwcgGKACFsZColJrcISR3zDlKTqjdLdsnUkx/3BUzMT A==; X-CSE-ConnectionGUID: J4yeEHLHRC2wwACxmSEx4A== X-CSE-MsgGUID: TRQ5aUzpToCQNu8+KuyJSw== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809375" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809375" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:23 -0700 X-CSE-ConnectionGUID: +c1mty33TfO67+ka5ZWkvw== X-CSE-MsgGUID: Zox777K9Q/eGEy5Wzzd/lg== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125588" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:22 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 08/10] net/thunderx: use common base code build handling Date: Mon, 7 Apr 2025 16:25:07 +0100 Message-ID: <20250407152509.2203243-9-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/thunderx/base/meson.build | 10 +--------- drivers/net/thunderx/meson.build | 3 --- 2 files changed, 1 insertion(+), 12 deletions(-) diff --git a/drivers/net/thunderx/base/meson.build b/drivers/net/thunderx/base/meson.build index cec45d0ae1..abf0b64e79 100644 --- a/drivers/net/thunderx/base/meson.build +++ b/drivers/net/thunderx/base/meson.build @@ -1,16 +1,8 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2017 Cavium, Inc -sources = [ +base_sources = files( 'nicvf_hw.c', 'nicvf_mbox.c', 'nicvf_bsvf.c', -] - -c_args = cflags -base_lib = static_library('nicvf_base', sources, - c_args: c_args, - dependencies: static_rte_ethdev ) - -base_objs = base_lib.extract_all_objects(recursive: true) diff --git a/drivers/net/thunderx/meson.build b/drivers/net/thunderx/meson.build index da665bd76f..03262af8ca 100644 --- a/drivers/net/thunderx/meson.build +++ b/drivers/net/thunderx/meson.build @@ -8,7 +8,6 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') endif subdir('base') -objs = [base_objs] sources = files( 'nicvf_ethdev.c', @@ -23,5 +22,3 @@ endif if cc.has_argument('-Wno-maybe-uninitialized') cflags += '-Wno-maybe-uninitialized' endif - -includes += include_directories('base') From patchwork Mon Apr 7 15:25:08 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152800 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 90B6F46528; Mon, 7 Apr 2025 17:26:15 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 64E0540E0C; Mon, 7 Apr 2025 17:25:30 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 1E50840C35 for ; Mon, 7 Apr 2025 17:25:23 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039524; x=1775575524; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=AnI+wpJ7YbhpdafFKc3njuN/5SeSoLtDq2JAMfL/aV0=; b=aupCtpAGFcQpdLp8sIMfB6u2T7Qoe2Yt4IYJ+gGy+cnCGx3NGUaz5h7Q mh3shkKgNCjCmvNxho859TI28URy/nY/J+t9aZ7RdCnjFsi0Y+QfZr7pn RDTS9f21K+NTV0J5fXGQADfv8lxPf5i8D77K/eW/eGzwM0b0QyYpPI2mQ Tuo4JI9Agz9jlmqxO+EVHeTrNItBd7TxaJV3maJkaNF/OZKZibxiscC2x NMMJvcjNOtnyYprREdF8E8tMbyMEZcXTb2C2h9qGU40Df9vWNh6IRRh+h ZLlcYNny/dxC0vdidHV29QyE6OVkQceGAgWU5/MMoGpO3iODg9y7qMx7P A==; X-CSE-ConnectionGUID: wBGXavLjSmmpgGi5ES0Xqw== X-CSE-MsgGUID: FaWw7/tMRhmGFLLmO9OhpA== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809376" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809376" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:24 -0700 X-CSE-ConnectionGUID: ZwxP/cDZTLW/w3sSWxMRTQ== X-CSE-MsgGUID: kbw25LubQlCcqNJc8q+PzQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125591" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:23 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson Subject: [PATCH v2 09/10] net/txgbe: use common base code build handling Date: Mon, 7 Apr 2025 16:25:08 +0100 Message-ID: <20250407152509.2203243-10-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. Signed-off-by: Bruce Richardson --- drivers/net/txgbe/base/meson.build | 18 ++---------------- drivers/net/txgbe/meson.build | 3 --- 2 files changed, 2 insertions(+), 19 deletions(-) diff --git a/drivers/net/txgbe/base/meson.build b/drivers/net/txgbe/base/meson.build index 4cf90a394a..0bb0782c92 100644 --- a/drivers/net/txgbe/base/meson.build +++ b/drivers/net/txgbe/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2015-2020 Beijing WangXun Technology Co., Ltd. -sources = [ +base_sources = files( 'txgbe_dcb_hw.c', 'txgbe_dcb.c', 'txgbe_eeprom.c', @@ -10,18 +10,4 @@ sources = [ 'txgbe_mng.c', 'txgbe_phy.c', 'txgbe_vf.c', -] - -error_cflags = [] - -c_args = cflags -foreach flag: error_cflags - if cc.has_argument(flag) - c_args += flag - endif -endforeach - -base_lib = static_library('txgbe_base', sources, - dependencies: [static_rte_eal, static_rte_net, static_rte_bus_pci], - c_args: c_args) -base_objs = base_lib.extract_all_objects(recursive: true) +) diff --git a/drivers/net/txgbe/meson.build b/drivers/net/txgbe/meson.build index d9ca3743e2..4dbbf597bb 100644 --- a/drivers/net/txgbe/meson.build +++ b/drivers/net/txgbe/meson.build @@ -8,7 +8,6 @@ if is_windows endif subdir('base') -objs = [base_objs] sources = files( 'txgbe_ethdev.c', @@ -32,6 +31,4 @@ elif arch_subdir == 'arm' sources += files('txgbe_rxtx_vec_neon.c') endif -includes += include_directories('base') - install_headers('rte_pmd_txgbe.h') From patchwork Mon Apr 7 15:25:09 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 152801 X-Patchwork-Delegate: david.marchand@redhat.com Return-Path: X-Original-To: patchwork@inbox.dpdk.org Delivered-To: patchwork@inbox.dpdk.org Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 9765146528; Mon, 7 Apr 2025 17:26:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 78D0340E11; Mon, 7 Apr 2025 17:25:31 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.7]) by mails.dpdk.org (Postfix) with ESMTP id 36CB640DCD for ; Mon, 7 Apr 2025 17:25:25 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1744039525; x=1775575525; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=r2zi+VzD/V5Y5z4DXB3PtYIIZKia/VyKchbH9SKG97s=; b=OlGHe/kYyfYrxMsl9UlDSuy/9CVU86EmsUfEea7R4EeEB9K88YudbYKa lb6mlv2geGtaxmgwdALt17e32Lg8P5zI8H12ATY1oGZ1K24wK4/KEtFKW 11Hn/dWa69f/92tPElVocBSw2qDlQi7vKz8egO8G23RmT0qTbwfyU8601 q4+R+HJ1Rwp2OozmddkunsNr0ncKJ+gJ0Mlpw7erYAo79xvvqwovcOIVY r4NTqFHardUyaYrvXxM0JliL5MYawpzBglwGt9a1JwM1MCmZ+S/wWUIaz syfZdC3xVYiQ4LUWUd/eLR2euUuhseuceOIPV01rPSbnjr4u92wPSGiyy w==; X-CSE-ConnectionGUID: P8R3beOGTOW2rKT/SYSI/Q== X-CSE-MsgGUID: 0xGChnZfQ0CHOLZfEz4g2g== X-IronPort-AV: E=McAfee;i="6700,10204,11397"; a="70809377" X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="70809377" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa101.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Apr 2025 08:25:25 -0700 X-CSE-ConnectionGUID: mv3g3u7MT6q54Dvj3PBH2A== X-CSE-MsgGUID: Kx9GwXcwTxm2BtjTVU6Buw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.15,194,1739865600"; d="scan'208";a="132125596" Received: from unknown (HELO silpixa00401385.ir.intel.com) ([10.237.214.31]) by fmviesa003.fm.intel.com with ESMTP; 07 Apr 2025 08:25:24 -0700 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Rosen Xu Subject: [PATCH v2 10/10] raw/ifpga: use common base code build handling Date: Mon, 7 Apr 2025 16:25:09 +0100 Message-ID: <20250407152509.2203243-11-bruce.richardson@intel.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20250407152509.2203243-1-bruce.richardson@intel.com> References: <20250331161000.9886-1-bruce.richardson@intel.com> <20250407152509.2203243-1-bruce.richardson@intel.com> MIME-Version: 1.0 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 Use the base code build handling logic in the drivers/meson.build file, rather than re-implementing it in the driver itself. While making changes similar to that in other drivers, also move content around dependencies from the base/meson.build file to the main driver meson.build file, so that the base code file only contains the list of base code files. Signed-off-by: Bruce Richardson Acked-by: Rosen Xu --- drivers/raw/ifpga/base/meson.build | 21 ++------------------- drivers/raw/ifpga/meson.build | 15 ++++++++++++--- 2 files changed, 14 insertions(+), 22 deletions(-) diff --git a/drivers/raw/ifpga/base/meson.build b/drivers/raw/ifpga/base/meson.build index 2de8e7ea22..efebff94e9 100644 --- a/drivers/raw/ifpga/base/meson.build +++ b/drivers/raw/ifpga/base/meson.build @@ -1,7 +1,7 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Intel Corporation -sources = [ +base_sources = files( 'ifpga_api.c', 'ifpga_enumerate.c', 'ifpga_feature_dev.c', @@ -23,21 +23,4 @@ sources = [ 'opae_i2c.c', 'opae_at24_eeprom.c', 'opae_eth_group.c', -] - -rtdep = dependency('librt', required: false) -if not rtdep.found() - rtdep = cc.find_library('rt', required: false) -endif -if not rtdep.found() - build = false - reason = 'missing dependency, "librt"' - subdir_done() -endif - -ext_deps += rtdep - -base_lib = static_library('ifpga_rawdev_base', sources, - dependencies: static_rte_eal, - c_args: cflags) -base_objs = base_lib.extract_all_objects(recursive: true) +) diff --git a/drivers/raw/ifpga/meson.build b/drivers/raw/ifpga/meson.build index 444799cfb2..4295ec04bd 100644 --- a/drivers/raw/ifpga/meson.build +++ b/drivers/raw/ifpga/meson.build @@ -7,8 +7,19 @@ if not has_libfdt subdir_done() endif +rtdep = dependency('librt', required: false) +if not rtdep.found() + rtdep = cc.find_library('rt', required: false) +endif +if not rtdep.found() + build = false + reason = 'missing dependency, "librt"' + subdir_done() +endif + +ext_deps += rtdep + subdir('base') -objs = [base_objs] deps += ['ethdev', 'rawdev', 'pci', 'bus_pci', 'kvargs', 'bus_vdev', 'bus_ifpga', 'net', 'net_i40e', 'net_ipn3ke'] @@ -17,6 +28,4 @@ sources = files('ifpga_rawdev.c', 'rte_pmd_ifpga.c', 'afu_pmd_core.c', 'afu_pmd_n3000.c', 'afu_pmd_he_lpbk.c', 'afu_pmd_he_mem.c', 'afu_pmd_he_hssi.c') -includes += include_directories('base') - headers = files('rte_pmd_ifpga.h')