From patchwork Wed Feb 5 11:55:28 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 150966 X-Patchwork-Delegate: bruce.richardson@intel.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 79E894619A; Wed, 5 Feb 2025 12:55:50 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D950C402E5; Wed, 5 Feb 2025 12:55:48 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id A25C9402D0 for ; Wed, 5 Feb 2025 12:55:46 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738756547; x=1770292547; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=mx2wLlcrIoWotCTIxMVMwiKB5UquqQ+l+CeGVbkPjRM=; b=L0/wJ3DC8qfG6GYUMvnmp5wG+HDCchovrS94VuXCdUmtWCl+5pICeQ9s of71effxhllBWXeYlMbVBNjlRk714m92Im6rJGsONOVn5jcuBe280B1T+ wbR6BKhx9dBE5iCT8mFDJoBPuxLOwxlaxMLdSTasOnpn9OpbjYjjXKmTp GR7Q9527PGp0gTAoVyt7zBV+qzREhcB2JKJqf51yfJIphJn84EmjoYunV 5Daqc5L9lw0otS2k+3/BjrQGjlHNk70Q4O8WNmlgpOTYEOsjSO9hYIEPj IlOuSYfCmRs7XZk7GUW1K/jzXKnu3uGNUTJbQ7CyZ/gqy+aOg+j9ycFs1 g==; X-CSE-ConnectionGUID: MUPkexA+Qs2VsCyyAqfqzw== X-CSE-MsgGUID: VZMy2CvZReaXgGHLZOM5nw== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="49568719" X-IronPort-AV: E=Sophos;i="6.13,261,1732608000"; d="scan'208";a="49568719" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2025 03:55:46 -0800 X-CSE-ConnectionGUID: BXLu5mfHQVGkplfQFNcKkw== X-CSE-MsgGUID: PCtCjMv7Rli3Ki9xCHzsDQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="141781683" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa001.fm.intel.com with ESMTP; 05 Feb 2025 03:55:44 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Praveen Shetty , Thomas Monjalon , Jingjing Wu , Konstantin Ananyev Subject: [PATCH v4 1/4] drivers: merge common and net idpf drivers Date: Wed, 5 Feb 2025 11:55:28 +0000 Message-ID: <20250205115533.2746196-2-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250205115533.2746196-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250205115533.2746196-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 Rather than having some of the idpf code split out into the "common" directory, used by both a net/idpf and a net/cpfl driver, we can merge all idpf code together under net/idpf and have the cpfl driver depend on "net/idpf" rather than "common/idpf". Signed-off-by: Bruce Richardson Acked-by: Praveen Shetty --- devtools/libabigail.abignore | 1 + doc/guides/rel_notes/release_25_03.rst | 6 ++++ drivers/common/idpf/meson.build | 34 ------------------- drivers/common/meson.build | 1 - drivers/net/intel/cpfl/meson.build | 2 +- .../{common => net/intel}/idpf/base/README | 0 .../intel}/idpf/base/idpf_alloc.h | 0 .../intel}/idpf/base/idpf_controlq.c | 0 .../intel}/idpf/base/idpf_controlq.h | 0 .../intel}/idpf/base/idpf_controlq_api.h | 0 .../intel}/idpf/base/idpf_controlq_setup.c | 0 .../intel}/idpf/base/idpf_devids.h | 0 .../intel}/idpf/base/idpf_lan_pf_regs.h | 0 .../intel}/idpf/base/idpf_lan_txrx.h | 0 .../intel}/idpf/base/idpf_lan_vf_regs.h | 0 .../intel}/idpf/base/idpf_osdep.h | 0 .../intel}/idpf/base/idpf_prototype.h | 0 .../intel}/idpf/base/idpf_type.h | 0 .../intel}/idpf/base/meson.build | 0 .../intel}/idpf/base/siov_regs.h | 0 .../intel}/idpf/base/virtchnl2.h | 0 .../intel}/idpf/base/virtchnl2_lan_desc.h | 0 .../intel}/idpf/idpf_common_device.c | 0 .../intel}/idpf/idpf_common_device.h | 0 .../intel}/idpf/idpf_common_logs.h | 0 .../intel}/idpf/idpf_common_rxtx.c | 0 .../intel}/idpf/idpf_common_rxtx.h | 0 .../intel}/idpf/idpf_common_rxtx_avx512.c | 0 .../intel}/idpf/idpf_common_virtchnl.c | 0 .../intel}/idpf/idpf_common_virtchnl.h | 0 drivers/net/intel/idpf/meson.build | 20 +++++++++-- .../{common => net/intel}/idpf/version.map | 0 drivers/net/meson.build | 2 +- 33 files changed, 27 insertions(+), 39 deletions(-) delete mode 100644 drivers/common/idpf/meson.build rename drivers/{common => net/intel}/idpf/base/README (100%) rename drivers/{common => net/intel}/idpf/base/idpf_alloc.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_controlq.c (100%) rename drivers/{common => net/intel}/idpf/base/idpf_controlq.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_controlq_api.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_controlq_setup.c (100%) rename drivers/{common => net/intel}/idpf/base/idpf_devids.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_lan_pf_regs.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_lan_txrx.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_lan_vf_regs.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_osdep.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_prototype.h (100%) rename drivers/{common => net/intel}/idpf/base/idpf_type.h (100%) rename drivers/{common => net/intel}/idpf/base/meson.build (100%) rename drivers/{common => net/intel}/idpf/base/siov_regs.h (100%) rename drivers/{common => net/intel}/idpf/base/virtchnl2.h (100%) rename drivers/{common => net/intel}/idpf/base/virtchnl2_lan_desc.h (100%) rename drivers/{common => net/intel}/idpf/idpf_common_device.c (100%) rename drivers/{common => net/intel}/idpf/idpf_common_device.h (100%) rename drivers/{common => net/intel}/idpf/idpf_common_logs.h (100%) rename drivers/{common => net/intel}/idpf/idpf_common_rxtx.c (100%) rename drivers/{common => net/intel}/idpf/idpf_common_rxtx.h (100%) rename drivers/{common => net/intel}/idpf/idpf_common_rxtx_avx512.c (100%) rename drivers/{common => net/intel}/idpf/idpf_common_virtchnl.c (100%) rename drivers/{common => net/intel}/idpf/idpf_common_virtchnl.h (100%) rename drivers/{common => net/intel}/idpf/version.map (100%) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 21b8cd6113..1dee6a954f 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -25,6 +25,7 @@ ; ; SKIP_LIBRARY=librte_common_mlx5_glue ; SKIP_LIBRARY=librte_net_mlx4_glue +; SKIP_LIBRARY=librte_common_idpf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Experimental APIs exceptions ; diff --git a/doc/guides/rel_notes/release_25_03.rst b/doc/guides/rel_notes/release_25_03.rst index a88b04d958..79b1116f6e 100644 --- a/doc/guides/rel_notes/release_25_03.rst +++ b/doc/guides/rel_notes/release_25_03.rst @@ -115,6 +115,12 @@ API Changes but to enable/disable these drivers via Meson option requires use of the new paths. For example, ``-Denable_drivers=/net/i40e`` becomes ``-Denable_drivers=/net/intel/i40e``. +* The driver ``common/idpf`` has been merged into the ``net/intel/idpf`` driver. + This change should have no impact to end applications, but, + when specifying the ``idpf`` or ``cpfl`` net drivers to meson via ``-Denable_drivers`` option, + there is no longer any need to also specify the ``common/idpf`` driver. + Note, however, ``net/intel/cpfl`` driver now depends upon the ``net/intel/idpf`` driver. + ABI Changes ----------- diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build deleted file mode 100644 index 46fd45c03b..0000000000 --- a/drivers/common/idpf/meson.build +++ /dev/null @@ -1,34 +0,0 @@ -# SPDX-License-Identifier: BSD-3-Clause -# Copyright(c) 2022 Intel Corporation - -if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 - subdir_done() -endif - -includes += include_directories('../iavf') - -deps += ['mbuf'] - -sources = files( - 'idpf_common_device.c', - 'idpf_common_rxtx.c', - 'idpf_common_virtchnl.c', -) - -if arch_subdir == 'x86' - if cc_has_avx512 - cflags += ['-DCC_AVX512_SUPPORT'] - avx512_args = cflags + cc_avx512_flags - if cc.has_argument('-march=skylake-avx512') - avx512_args += '-march=skylake-avx512' - endif - idpf_common_avx512_lib = static_library('idpf_common_avx512_lib', - 'idpf_common_rxtx_avx512.c', - dependencies: [static_rte_mbuf,], - include_directories: includes, - c_args: avx512_args) - objs += idpf_common_avx512_lib.extract_objects('idpf_common_rxtx_avx512.c') - endif -endif - -subdir('base') diff --git a/drivers/common/meson.build b/drivers/common/meson.build index 8734af36aa..e1e3149d8f 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -6,7 +6,6 @@ drivers = [ 'cpt', 'dpaax', 'iavf', - 'idpf', 'ionic', 'mvep', 'octeontx', diff --git a/drivers/net/intel/cpfl/meson.build b/drivers/net/intel/cpfl/meson.build index 87fcfe0bb1..1f0269d50b 100644 --- a/drivers/net/intel/cpfl/meson.build +++ b/drivers/net/intel/cpfl/meson.build @@ -11,7 +11,7 @@ if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 subdir_done() endif -deps += ['hash', 'common_idpf'] +deps += ['hash', 'net_idpf'] sources = files( 'cpfl_ethdev.c', diff --git a/drivers/common/idpf/base/README b/drivers/net/intel/idpf/base/README similarity index 100% rename from drivers/common/idpf/base/README rename to drivers/net/intel/idpf/base/README diff --git a/drivers/common/idpf/base/idpf_alloc.h b/drivers/net/intel/idpf/base/idpf_alloc.h similarity index 100% rename from drivers/common/idpf/base/idpf_alloc.h rename to drivers/net/intel/idpf/base/idpf_alloc.h diff --git a/drivers/common/idpf/base/idpf_controlq.c b/drivers/net/intel/idpf/base/idpf_controlq.c similarity index 100% rename from drivers/common/idpf/base/idpf_controlq.c rename to drivers/net/intel/idpf/base/idpf_controlq.c diff --git a/drivers/common/idpf/base/idpf_controlq.h b/drivers/net/intel/idpf/base/idpf_controlq.h similarity index 100% rename from drivers/common/idpf/base/idpf_controlq.h rename to drivers/net/intel/idpf/base/idpf_controlq.h diff --git a/drivers/common/idpf/base/idpf_controlq_api.h b/drivers/net/intel/idpf/base/idpf_controlq_api.h similarity index 100% rename from drivers/common/idpf/base/idpf_controlq_api.h rename to drivers/net/intel/idpf/base/idpf_controlq_api.h diff --git a/drivers/common/idpf/base/idpf_controlq_setup.c b/drivers/net/intel/idpf/base/idpf_controlq_setup.c similarity index 100% rename from drivers/common/idpf/base/idpf_controlq_setup.c rename to drivers/net/intel/idpf/base/idpf_controlq_setup.c diff --git a/drivers/common/idpf/base/idpf_devids.h b/drivers/net/intel/idpf/base/idpf_devids.h similarity index 100% rename from drivers/common/idpf/base/idpf_devids.h rename to drivers/net/intel/idpf/base/idpf_devids.h diff --git a/drivers/common/idpf/base/idpf_lan_pf_regs.h b/drivers/net/intel/idpf/base/idpf_lan_pf_regs.h similarity index 100% rename from drivers/common/idpf/base/idpf_lan_pf_regs.h rename to drivers/net/intel/idpf/base/idpf_lan_pf_regs.h diff --git a/drivers/common/idpf/base/idpf_lan_txrx.h b/drivers/net/intel/idpf/base/idpf_lan_txrx.h similarity index 100% rename from drivers/common/idpf/base/idpf_lan_txrx.h rename to drivers/net/intel/idpf/base/idpf_lan_txrx.h diff --git a/drivers/common/idpf/base/idpf_lan_vf_regs.h b/drivers/net/intel/idpf/base/idpf_lan_vf_regs.h similarity index 100% rename from drivers/common/idpf/base/idpf_lan_vf_regs.h rename to drivers/net/intel/idpf/base/idpf_lan_vf_regs.h diff --git a/drivers/common/idpf/base/idpf_osdep.h b/drivers/net/intel/idpf/base/idpf_osdep.h similarity index 100% rename from drivers/common/idpf/base/idpf_osdep.h rename to drivers/net/intel/idpf/base/idpf_osdep.h diff --git a/drivers/common/idpf/base/idpf_prototype.h b/drivers/net/intel/idpf/base/idpf_prototype.h similarity index 100% rename from drivers/common/idpf/base/idpf_prototype.h rename to drivers/net/intel/idpf/base/idpf_prototype.h diff --git a/drivers/common/idpf/base/idpf_type.h b/drivers/net/intel/idpf/base/idpf_type.h similarity index 100% rename from drivers/common/idpf/base/idpf_type.h rename to drivers/net/intel/idpf/base/idpf_type.h diff --git a/drivers/common/idpf/base/meson.build b/drivers/net/intel/idpf/base/meson.build similarity index 100% rename from drivers/common/idpf/base/meson.build rename to drivers/net/intel/idpf/base/meson.build diff --git a/drivers/common/idpf/base/siov_regs.h b/drivers/net/intel/idpf/base/siov_regs.h similarity index 100% rename from drivers/common/idpf/base/siov_regs.h rename to drivers/net/intel/idpf/base/siov_regs.h diff --git a/drivers/common/idpf/base/virtchnl2.h b/drivers/net/intel/idpf/base/virtchnl2.h similarity index 100% rename from drivers/common/idpf/base/virtchnl2.h rename to drivers/net/intel/idpf/base/virtchnl2.h diff --git a/drivers/common/idpf/base/virtchnl2_lan_desc.h b/drivers/net/intel/idpf/base/virtchnl2_lan_desc.h similarity index 100% rename from drivers/common/idpf/base/virtchnl2_lan_desc.h rename to drivers/net/intel/idpf/base/virtchnl2_lan_desc.h diff --git a/drivers/common/idpf/idpf_common_device.c b/drivers/net/intel/idpf/idpf_common_device.c similarity index 100% rename from drivers/common/idpf/idpf_common_device.c rename to drivers/net/intel/idpf/idpf_common_device.c diff --git a/drivers/common/idpf/idpf_common_device.h b/drivers/net/intel/idpf/idpf_common_device.h similarity index 100% rename from drivers/common/idpf/idpf_common_device.h rename to drivers/net/intel/idpf/idpf_common_device.h diff --git a/drivers/common/idpf/idpf_common_logs.h b/drivers/net/intel/idpf/idpf_common_logs.h similarity index 100% rename from drivers/common/idpf/idpf_common_logs.h rename to drivers/net/intel/idpf/idpf_common_logs.h diff --git a/drivers/common/idpf/idpf_common_rxtx.c b/drivers/net/intel/idpf/idpf_common_rxtx.c similarity index 100% rename from drivers/common/idpf/idpf_common_rxtx.c rename to drivers/net/intel/idpf/idpf_common_rxtx.c diff --git a/drivers/common/idpf/idpf_common_rxtx.h b/drivers/net/intel/idpf/idpf_common_rxtx.h similarity index 100% rename from drivers/common/idpf/idpf_common_rxtx.h rename to drivers/net/intel/idpf/idpf_common_rxtx.h diff --git a/drivers/common/idpf/idpf_common_rxtx_avx512.c b/drivers/net/intel/idpf/idpf_common_rxtx_avx512.c similarity index 100% rename from drivers/common/idpf/idpf_common_rxtx_avx512.c rename to drivers/net/intel/idpf/idpf_common_rxtx_avx512.c diff --git a/drivers/common/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c similarity index 100% rename from drivers/common/idpf/idpf_common_virtchnl.c rename to drivers/net/intel/idpf/idpf_common_virtchnl.c diff --git a/drivers/common/idpf/idpf_common_virtchnl.h b/drivers/net/intel/idpf/idpf_common_virtchnl.h similarity index 100% rename from drivers/common/idpf/idpf_common_virtchnl.h rename to drivers/net/intel/idpf/idpf_common_virtchnl.h diff --git a/drivers/net/intel/idpf/meson.build b/drivers/net/intel/idpf/meson.build index 34cbdc4da0..52405b5b35 100644 --- a/drivers/net/intel/idpf/meson.build +++ b/drivers/net/intel/idpf/meson.build @@ -7,13 +7,29 @@ if is_windows subdir_done() endif -deps += ['common_idpf'] +includes += include_directories('../../../common/iavf') sources = files( + 'idpf_common_device.c', + 'idpf_common_rxtx.c', + 'idpf_common_virtchnl.c', + 'idpf_ethdev.c', 'idpf_rxtx.c', ) -if arch_subdir == 'x86'and cc_has_avx512 +if arch_subdir == 'x86' and cc_has_avx512 cflags += ['-DCC_AVX512_SUPPORT'] + avx512_args = cflags + cc_avx512_flags + if cc.has_argument('-march=skylake-avx512') + avx512_args += '-march=skylake-avx512' + endif + idpf_common_avx512_lib = static_library('idpf_common_avx512_lib', + 'idpf_common_rxtx_avx512.c', + dependencies: static_rte_mbuf, + include_directories: includes, + c_args: avx512_args) + objs += idpf_common_avx512_lib.extract_objects('idpf_common_rxtx_avx512.c') endif + +subdir('base') diff --git a/drivers/common/idpf/version.map b/drivers/net/intel/idpf/version.map similarity index 100% rename from drivers/common/idpf/version.map rename to drivers/net/intel/idpf/version.map diff --git a/drivers/net/meson.build b/drivers/net/meson.build index 02a3f5a0b6..bcf6f9dc73 100644 --- a/drivers/net/meson.build +++ b/drivers/net/meson.build @@ -24,7 +24,6 @@ drivers = [ 'gve', 'hinic', 'hns3', - 'intel/cpfl', 'intel/e1000', 'intel/fm10k', 'intel/i40e', @@ -34,6 +33,7 @@ drivers = [ 'intel/igc', 'intel/ipn3ke', 'intel/ixgbe', + 'intel/cpfl', # depends on idpf, so must come after it 'ionic', 'mana', 'memif', From patchwork Wed Feb 5 11:55:29 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 150967 X-Patchwork-Delegate: bruce.richardson@intel.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 A0A5C4619A; Wed, 5 Feb 2025 12:55:58 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 6215C4064A; Wed, 5 Feb 2025 12:55:50 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 895D2402D0 for ; Wed, 5 Feb 2025 12:55:48 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738756549; x=1770292549; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=NNo+JHpdM7rhrL/ag3GegqYlLk8r/31+sZtowFDSX1Q=; b=Z5yp6nH+tZIskvNehogjqAU3DVCRRRqgp755xeRoWl43gxg4UTj00+GR udp7Wsj5J/h+j7/GasVRUGolRYWQ8xZmbPRT4UiVnv6IZSJ3OjjMIZCC2 o1W1lJ02UvD2Lp+MjSCfr0THR5d3A/VzJiqlrJ5XRvaWytKiyBnOHjptW qsy5Ha9EziQQu+vtYarmKYX9pZg/AKwWglrLS6NqP/okw71RXbaVDt03K aoL5L9f9fC9CNo8WqxcRQehaLLyoCxZcjXe0pNnaQGAxJAg+L6L0W83Og /ateBCZOOL/hEUDWPhS85+y4EDYz7IpNcpm2Y1BUVT3aIhBmIKuU1ZYKx Q==; X-CSE-ConnectionGUID: uoNxpXh1RROwMFFLkd3nOQ== X-CSE-MsgGUID: ZagHUTqoSOSBdRKE6uzPQw== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="49568727" X-IronPort-AV: E=Sophos;i="6.13,261,1732608000"; d="scan'208";a="49568727" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2025 03:55:48 -0800 X-CSE-ConnectionGUID: tmHuo3k2SIW86tiqo8eQSQ== X-CSE-MsgGUID: 34w8te7NQSC5LedrVIaKNw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="141781710" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa001.fm.intel.com with ESMTP; 05 Feb 2025 03:55:46 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Praveen Shetty , Jingjing Wu Subject: [PATCH v4 2/4] net/idpf: re-enable unused variable warnings Date: Wed, 5 Feb 2025 11:55:29 +0000 Message-ID: <20250205115533.2746196-3-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250205115533.2746196-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250205115533.2746196-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 The idpf driver was being built with warnings disabled for unused variables. However, while the warning was being disabled in the base code directory, all suppressed warnings were in the main directory. Therefore, just remove the unused variables and re-enable the warnings. Signed-off-by: Bruce Richardson Acked-by: Praveen Shetty --- drivers/net/intel/idpf/base/meson.build | 9 --------- drivers/net/intel/idpf/idpf_common_rxtx.c | 2 -- drivers/net/intel/idpf/idpf_common_virtchnl.c | 4 ++-- 3 files changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/net/intel/idpf/base/meson.build b/drivers/net/intel/idpf/base/meson.build index f30ec7dfc2..7316e0a805 100644 --- a/drivers/net/intel/idpf/base/meson.build +++ b/drivers/net/intel/idpf/base/meson.build @@ -5,12 +5,3 @@ sources += files( 'idpf_controlq.c', 'idpf_controlq_setup.c', ) - -error_cflags = [ - '-Wno-unused-variable', -] -foreach flag: error_cflags - if cc.has_argument(flag) - cflags += flag - endif -endforeach diff --git a/drivers/net/intel/idpf/idpf_common_rxtx.c b/drivers/net/intel/idpf/idpf_common_rxtx.c index a04e54ce26..9b17279181 100644 --- a/drivers/net/intel/idpf/idpf_common_rxtx.c +++ b/drivers/net/intel/idpf/idpf_common_rxtx.c @@ -1178,7 +1178,6 @@ idpf_dp_singleq_recv_scatter_pkts(void *rx_queue, struct rte_mbuf **rx_pkts, struct rte_mbuf *last_seg = rxq->pkt_last_seg; struct rte_mbuf *rxm; struct rte_mbuf *nmb; - struct rte_eth_dev *dev; const uint32_t *ptype_tbl = rxq->adapter->ptype_tbl; uint16_t rx_id = rxq->rx_tail; uint16_t rx_packet_len; @@ -1310,7 +1309,6 @@ idpf_xmit_cleanup(struct idpf_tx_queue *txq) uint16_t nb_tx_desc = txq->nb_tx_desc; uint16_t desc_to_clean_to; uint16_t nb_tx_to_clean; - uint16_t i; volatile struct idpf_base_tx_desc *txd = txq->tx_ring; diff --git a/drivers/net/intel/idpf/idpf_common_virtchnl.c b/drivers/net/intel/idpf/idpf_common_virtchnl.c index de511da788..0ae1d55d79 100644 --- a/drivers/net/intel/idpf/idpf_common_virtchnl.c +++ b/drivers/net/intel/idpf/idpf_common_virtchnl.c @@ -362,7 +362,7 @@ idpf_vc_queue_grps_add(struct idpf_vport *vport, { struct idpf_adapter *adapter = vport->adapter; struct idpf_cmd_info args; - int size, qg_info_size; + int size; int err = -1; size = sizeof(*p2p_queue_grps_info) + @@ -1044,7 +1044,7 @@ int idpf_vc_rxq_config_by_info(struct idpf_vport *vport, struct virtchnl2_rxq_in struct idpf_adapter *adapter = vport->adapter; struct virtchnl2_config_rx_queues *vc_rxqs = NULL; struct idpf_cmd_info args; - int size, err, i; + int size, err; size = sizeof(*vc_rxqs) + (num_qs - 1) * sizeof(struct virtchnl2_rxq_info); From patchwork Wed Feb 5 11:55:30 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 150968 X-Patchwork-Delegate: bruce.richardson@intel.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 313754619A; Wed, 5 Feb 2025 12:56:04 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8839E402F2; Wed, 5 Feb 2025 12:55:53 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id 1D04440654 for ; Wed, 5 Feb 2025 12:55:51 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738756553; x=1770292553; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=kWit+9gA9VTZ0sJttj52PIMDZxVhC+/fiaBng0bc0p4=; b=KU+4hCpZpHfpq0lD6lzBsP4LcAe5CARCJOOmf6mcxh7yV1z7OrXTxOPE OXliyro62sYNF2yirFbDjiJ6YMrik5fSjPz20I32lhDSCw/jCRbooM7xN iGm5aZkjZkhJzcsvvXSsF/AKQNeWyNn0AbgVJE9uwJ3uLxW7SeoIm+ONa dPo65IL228Q48uVxz0fDD4S1OtDxAgG8tsP75u/E7Rc0PgDuIsXreTTPA F+1T3Kv8m28GEG9LhGNnny6F4v5+eSNjEfr9Dvg0AmfETzKvRMD5jm5R2 9AxTRMevxlKYyaQZ341b/8kGneQAgWPu9sWxC0LL6/buPae85DAO8ZB3U Q==; X-CSE-ConnectionGUID: CUB3Lb+EQBGtxPFVdRe3Dg== X-CSE-MsgGUID: EN5SA4jeTgWJ8KqgJH48yg== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="49568733" X-IronPort-AV: E=Sophos;i="6.13,261,1732608000"; d="scan'208";a="49568733" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2025 03:55:52 -0800 X-CSE-ConnectionGUID: 2UX3qPJOR6yYVsgmVYkjgQ== X-CSE-MsgGUID: JMv52FwITgaSlDStO3kOvQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="141781724" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa001.fm.intel.com with ESMTP; 05 Feb 2025 03:55:49 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Thomas Monjalon , Vladimir Medvedkin , Ian Stokes , Anatoly Burakov , Jingjing Wu , Praveen Shetty Subject: [PATCH v4 3/4] drivers: move iavf common folder to iavf net Date: Wed, 5 Feb 2025 11:55:30 +0000 Message-ID: <20250205115533.2746196-4-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250205115533.2746196-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250205115533.2746196-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 The common/iavf driver folder contains the base code for the iavf driver, which is also linked against by the ice driver and others. However, there is no need for this to be in common, and we can move it to the net/intel/iavf as a base code driver. This involves updating dependencies that were on common/iavf to net/iavf Signed-off-by: Bruce Richardson --- devtools/libabigail.abignore | 1 + doc/guides/rel_notes/release_25_03.rst | 5 ++++- drivers/common/iavf/version.map | 13 ------------- drivers/common/meson.build | 1 - .../{common/iavf => net/intel/iavf/base}/README | 0 .../iavf => net/intel/iavf/base}/iavf_adminq.c | 0 .../iavf => net/intel/iavf/base}/iavf_adminq.h | 0 .../iavf => net/intel/iavf/base}/iavf_adminq_cmd.h | 0 .../iavf => net/intel/iavf/base}/iavf_alloc.h | 0 .../iavf => net/intel/iavf/base}/iavf_common.c | 0 .../iavf => net/intel/iavf/base}/iavf_devids.h | 0 .../iavf => net/intel/iavf/base}/iavf_impl.c | 0 .../iavf => net/intel/iavf/base}/iavf_osdep.h | 0 .../iavf => net/intel/iavf/base}/iavf_prototype.h | 0 .../iavf => net/intel/iavf/base}/iavf_register.h | 0 .../iavf => net/intel/iavf/base}/iavf_status.h | 0 .../iavf => net/intel/iavf/base}/iavf_type.h | 0 .../iavf => net/intel/iavf/base}/meson.build | 0 .../iavf => net/intel/iavf/base}/virtchnl.h | 0 .../intel/iavf/base}/virtchnl_inline_ipsec.h | 0 drivers/net/intel/iavf/meson.build | 13 +++++++++---- drivers/net/intel/iavf/version.map | 14 ++++++++++++++ drivers/net/intel/ice/meson.build | 7 +++---- drivers/net/intel/idpf/meson.build | 2 +- 24 files changed, 32 insertions(+), 24 deletions(-) delete mode 100644 drivers/common/iavf/version.map rename drivers/{common/iavf => net/intel/iavf/base}/README (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_adminq.c (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_adminq.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_adminq_cmd.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_alloc.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_common.c (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_devids.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_impl.c (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_osdep.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_prototype.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_register.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_status.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/iavf_type.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/meson.build (100%) rename drivers/{common/iavf => net/intel/iavf/base}/virtchnl.h (100%) rename drivers/{common/iavf => net/intel/iavf/base}/virtchnl_inline_ipsec.h (100%) diff --git a/devtools/libabigail.abignore b/devtools/libabigail.abignore index 1dee6a954f..4d7079abbc 100644 --- a/devtools/libabigail.abignore +++ b/devtools/libabigail.abignore @@ -26,6 +26,7 @@ ; SKIP_LIBRARY=librte_common_mlx5_glue ; SKIP_LIBRARY=librte_net_mlx4_glue ; SKIP_LIBRARY=librte_common_idpf +; SKIP_LIBRARY=librte_common_iavf ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ; Experimental APIs exceptions ; diff --git a/doc/guides/rel_notes/release_25_03.rst b/doc/guides/rel_notes/release_25_03.rst index 79b1116f6e..1f22efa79f 100644 --- a/doc/guides/rel_notes/release_25_03.rst +++ b/doc/guides/rel_notes/release_25_03.rst @@ -116,9 +116,12 @@ API Changes For example, ``-Denable_drivers=/net/i40e`` becomes ``-Denable_drivers=/net/intel/i40e``. * The driver ``common/idpf`` has been merged into the ``net/intel/idpf`` driver. - This change should have no impact to end applications, but, + Similarly, the ``common/iavf`` driver has been merged into the ``net/intel/iavf`` driver. + These changes should have no impact to end applications, but, when specifying the ``idpf`` or ``cpfl`` net drivers to meson via ``-Denable_drivers`` option, there is no longer any need to also specify the ``common/idpf`` driver. + In the same way, when specifying the ``iavf`` or ``ice`` net drivers, + there is no need to also specify the ``common/iavf`` driver. Note, however, ``net/intel/cpfl`` driver now depends upon the ``net/intel/idpf`` driver. diff --git a/drivers/common/iavf/version.map b/drivers/common/iavf/version.map deleted file mode 100644 index 6c1427cca4..0000000000 --- a/drivers/common/iavf/version.map +++ /dev/null @@ -1,13 +0,0 @@ -INTERNAL { - global: - - iavf_aq_send_msg_to_pf; - iavf_clean_arq_element; - iavf_init_adminq; - iavf_set_mac_type; - iavf_shutdown_adminq; - iavf_vf_parse_hw_config; - iavf_vf_reset; - - local: *; -}; diff --git a/drivers/common/meson.build b/drivers/common/meson.build index e1e3149d8f..dc096aab0a 100644 --- a/drivers/common/meson.build +++ b/drivers/common/meson.build @@ -5,7 +5,6 @@ std_deps = ['eal'] drivers = [ 'cpt', 'dpaax', - 'iavf', 'ionic', 'mvep', 'octeontx', diff --git a/drivers/common/iavf/README b/drivers/net/intel/iavf/base/README similarity index 100% rename from drivers/common/iavf/README rename to drivers/net/intel/iavf/base/README diff --git a/drivers/common/iavf/iavf_adminq.c b/drivers/net/intel/iavf/base/iavf_adminq.c similarity index 100% rename from drivers/common/iavf/iavf_adminq.c rename to drivers/net/intel/iavf/base/iavf_adminq.c diff --git a/drivers/common/iavf/iavf_adminq.h b/drivers/net/intel/iavf/base/iavf_adminq.h similarity index 100% rename from drivers/common/iavf/iavf_adminq.h rename to drivers/net/intel/iavf/base/iavf_adminq.h diff --git a/drivers/common/iavf/iavf_adminq_cmd.h b/drivers/net/intel/iavf/base/iavf_adminq_cmd.h similarity index 100% rename from drivers/common/iavf/iavf_adminq_cmd.h rename to drivers/net/intel/iavf/base/iavf_adminq_cmd.h diff --git a/drivers/common/iavf/iavf_alloc.h b/drivers/net/intel/iavf/base/iavf_alloc.h similarity index 100% rename from drivers/common/iavf/iavf_alloc.h rename to drivers/net/intel/iavf/base/iavf_alloc.h diff --git a/drivers/common/iavf/iavf_common.c b/drivers/net/intel/iavf/base/iavf_common.c similarity index 100% rename from drivers/common/iavf/iavf_common.c rename to drivers/net/intel/iavf/base/iavf_common.c diff --git a/drivers/common/iavf/iavf_devids.h b/drivers/net/intel/iavf/base/iavf_devids.h similarity index 100% rename from drivers/common/iavf/iavf_devids.h rename to drivers/net/intel/iavf/base/iavf_devids.h diff --git a/drivers/common/iavf/iavf_impl.c b/drivers/net/intel/iavf/base/iavf_impl.c similarity index 100% rename from drivers/common/iavf/iavf_impl.c rename to drivers/net/intel/iavf/base/iavf_impl.c diff --git a/drivers/common/iavf/iavf_osdep.h b/drivers/net/intel/iavf/base/iavf_osdep.h similarity index 100% rename from drivers/common/iavf/iavf_osdep.h rename to drivers/net/intel/iavf/base/iavf_osdep.h diff --git a/drivers/common/iavf/iavf_prototype.h b/drivers/net/intel/iavf/base/iavf_prototype.h similarity index 100% rename from drivers/common/iavf/iavf_prototype.h rename to drivers/net/intel/iavf/base/iavf_prototype.h diff --git a/drivers/common/iavf/iavf_register.h b/drivers/net/intel/iavf/base/iavf_register.h similarity index 100% rename from drivers/common/iavf/iavf_register.h rename to drivers/net/intel/iavf/base/iavf_register.h diff --git a/drivers/common/iavf/iavf_status.h b/drivers/net/intel/iavf/base/iavf_status.h similarity index 100% rename from drivers/common/iavf/iavf_status.h rename to drivers/net/intel/iavf/base/iavf_status.h diff --git a/drivers/common/iavf/iavf_type.h b/drivers/net/intel/iavf/base/iavf_type.h similarity index 100% rename from drivers/common/iavf/iavf_type.h rename to drivers/net/intel/iavf/base/iavf_type.h diff --git a/drivers/common/iavf/meson.build b/drivers/net/intel/iavf/base/meson.build similarity index 100% rename from drivers/common/iavf/meson.build rename to drivers/net/intel/iavf/base/meson.build diff --git a/drivers/common/iavf/virtchnl.h b/drivers/net/intel/iavf/base/virtchnl.h similarity index 100% rename from drivers/common/iavf/virtchnl.h rename to drivers/net/intel/iavf/base/virtchnl.h diff --git a/drivers/common/iavf/virtchnl_inline_ipsec.h b/drivers/net/intel/iavf/base/virtchnl_inline_ipsec.h similarity index 100% rename from drivers/common/iavf/virtchnl_inline_ipsec.h rename to drivers/net/intel/iavf/base/virtchnl_inline_ipsec.h diff --git a/drivers/net/intel/iavf/meson.build b/drivers/net/intel/iavf/meson.build index d9b605f55a..c823d618e3 100644 --- a/drivers/net/intel/iavf/meson.build +++ b/drivers/net/intel/iavf/meson.build @@ -7,9 +7,13 @@ endif testpmd_sources = files('iavf_testpmd.c') -deps += ['common_iavf', 'security', 'cryptodev'] +deps += ['security', 'cryptodev'] sources = files( + 'base/iavf_adminq.c', + 'base/iavf_common.c', + 'base/iavf_impl.c', + 'iavf_ethdev.c', 'iavf_rxtx.c', 'iavf_vchnl.c', @@ -20,8 +24,9 @@ sources = files( 'iavf_ipsec_crypto.c', 'iavf_fsub.c', ) +includes += include_directories('base') -if arch_subdir == 'x86' and is_variable('static_rte_common_iavf') +if arch_subdir == 'x86' sources += files('iavf_rxtx_vec_sse.c') if is_windows and cc.get_id() != 'clang' @@ -30,7 +35,7 @@ if arch_subdir == 'x86' and is_variable('static_rte_common_iavf') iavf_avx2_lib = static_library('iavf_avx2_lib', 'iavf_rxtx_vec_avx2.c', - dependencies: [static_rte_ethdev, static_rte_common_iavf], + dependencies: [static_rte_ethdev], include_directories: includes, c_args: [cflags, '-mavx2']) objs += iavf_avx2_lib.extract_objects('iavf_rxtx_vec_avx2.c') @@ -43,7 +48,7 @@ if arch_subdir == 'x86' and is_variable('static_rte_common_iavf') endif iavf_avx512_lib = static_library('iavf_avx512_lib', 'iavf_rxtx_vec_avx512.c', - dependencies: [static_rte_ethdev, static_rte_common_iavf], + dependencies: [static_rte_ethdev], include_directories: includes, c_args: avx512_args) objs += iavf_avx512_lib.extract_objects('iavf_rxtx_vec_avx512.c') diff --git a/drivers/net/intel/iavf/version.map b/drivers/net/intel/iavf/version.map index 98de64cca2..d18dea64dd 100644 --- a/drivers/net/intel/iavf/version.map +++ b/drivers/net/intel/iavf/version.map @@ -17,3 +17,17 @@ EXPERIMENTAL { # added in 21.11 rte_pmd_ifd_dynflag_proto_xtr_ipsec_crypto_said_mask; }; + +INTERNAL { + global: + + iavf_aq_send_msg_to_pf; + iavf_clean_arq_element; + iavf_init_adminq; + iavf_set_mac_type; + iavf_shutdown_adminq; + iavf_vf_parse_hw_config; + iavf_vf_reset; + + local: *; +}; diff --git a/drivers/net/intel/ice/meson.build b/drivers/net/intel/ice/meson.build index beaf21e176..5faf887386 100644 --- a/drivers/net/intel/ice/meson.build +++ b/drivers/net/intel/ice/meson.build @@ -18,7 +18,7 @@ sources = files( testpmd_sources = files('ice_testpmd.c') -deps += ['hash', 'net', 'common_iavf'] +deps += ['hash', 'net', 'net_iavf'] includes += include_directories('base') if arch_subdir == 'x86' @@ -30,7 +30,7 @@ if arch_subdir == 'x86' ice_avx2_lib = static_library('ice_avx2_lib', 'ice_rxtx_vec_avx2.c', - dependencies: [static_rte_ethdev, static_rte_kvargs, static_rte_hash], + dependencies: [static_rte_ethdev, static_rte_hash], include_directories: includes, c_args: [cflags, '-mavx2']) objs += ice_avx2_lib.extract_objects('ice_rxtx_vec_avx2.c') @@ -43,8 +43,7 @@ if arch_subdir == 'x86' endif ice_avx512_lib = static_library('ice_avx512_lib', 'ice_rxtx_vec_avx512.c', - dependencies: [static_rte_ethdev, - static_rte_kvargs, static_rte_hash], + dependencies: [static_rte_ethdev, static_rte_hash], include_directories: includes, c_args: avx512_args) objs += ice_avx512_lib.extract_objects('ice_rxtx_vec_avx512.c') diff --git a/drivers/net/intel/idpf/meson.build b/drivers/net/intel/idpf/meson.build index 52405b5b35..e4559bf861 100644 --- a/drivers/net/intel/idpf/meson.build +++ b/drivers/net/intel/idpf/meson.build @@ -7,7 +7,7 @@ if is_windows subdir_done() endif -includes += include_directories('../../../common/iavf') +includes += include_directories('../iavf/base') sources = files( 'idpf_common_device.c', From patchwork Wed Feb 5 11:55:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bruce Richardson X-Patchwork-Id: 150969 X-Patchwork-Delegate: bruce.richardson@intel.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 0D72C4619A; Wed, 5 Feb 2025 12:56:10 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A0F5040659; Wed, 5 Feb 2025 12:55:56 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.11]) by mails.dpdk.org (Postfix) with ESMTP id EB12F40657 for ; Wed, 5 Feb 2025 12:55:54 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1738756555; x=1770292555; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=oVuHUbJdBxIFfTvqtHjLsdRwG19XavEANKRb+UjGySw=; b=P0JoB38dTQa5P6DPS8yADwHmtC4Hnu7rFm6fuq8NRihuFwQebKuaHieB 9D+XwwALoEl7jR1F5Eh9nwdHUL2G88tRETB8zuWJMYilV+grPm6jfeBzL TF5Nzdpnd9IjImWoeyOTz6oryZT1njLLERlNM86qJGBgAV4NpCdyqAnyO TR0cfs0UcPKDGnv4FWY4xee6UrpsqWuGzaL1uLRd19aBlRfDrYVwxtCaz eQy3sN1ODkxHYTbN3tugjCZdL8hssmm2+yUnNfNia/bnomTDQIjh0curF EgMkTbmEYXg+anV/eelW8apOpioghBu5171C87FJxZwBQPe68dGl5HuhT A==; X-CSE-ConnectionGUID: BIFpKoHsQwaLZXbpRVegWw== X-CSE-MsgGUID: 3qvX9QdTTpCq/8bozNIjmw== X-IronPort-AV: E=McAfee;i="6700,10204,11336"; a="49568742" X-IronPort-AV: E=Sophos;i="6.13,261,1732608000"; d="scan'208";a="49568742" Received: from fmviesa001.fm.intel.com ([10.60.135.141]) by orvoesa103.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 05 Feb 2025 03:55:55 -0800 X-CSE-ConnectionGUID: En0/gjE9TF6OBVX4088EDA== X-CSE-MsgGUID: 4CWbCPbwQpa/eV1btw5f0A== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.12,224,1728975600"; d="scan'208";a="141781739" Received: from silpixa00401197coob.ir.intel.com (HELO silpixa00401385.ir.intel.com) ([10.237.214.45]) by fmviesa001.fm.intel.com with ESMTP; 05 Feb 2025 03:55:53 -0800 From: Bruce Richardson To: dev@dpdk.org Cc: Bruce Richardson , Vladimir Medvedkin , Ian Stokes , Anatoly Burakov Subject: [PATCH v4 4/4] net/intel: allow building ice driver without iavf Date: Wed, 5 Feb 2025 11:55:31 +0000 Message-ID: <20250205115533.2746196-5-bruce.richardson@intel.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20250205115533.2746196-1-bruce.richardson@intel.com> References: <20250128163649.343336-1-bruce.richardson@intel.com> <20250205115533.2746196-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 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..ff7f84597a 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')