From patchwork Tue Mar 14 14:29:54 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 125108 X-Patchwork-Delegate: thomas@monjalon.net 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 77AC241E90; Tue, 14 Mar 2023 15:30:28 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 68B9441611; Tue, 14 Mar 2023 15:30:28 +0100 (CET) Received: from wnew2-smtp.messagingengine.com (wnew2-smtp.messagingengine.com [64.147.123.27]) by mails.dpdk.org (Postfix) with ESMTP id EF03F40A7E for ; Tue, 14 Mar 2023 15:30:25 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailnew.west.internal (Postfix) with ESMTP id B58F52B066EE; Tue, 14 Mar 2023 10:30:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 14 Mar 2023 10:30:24 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1678804220; x=1678811420; bh=304tJv7c77cLJ128re7ywlo7KqqWrQ+tQXP dOmaO4Vs=; b=j+g1w4JkD5JpdMlNhxFRgklVGnoX2i3UCKOitlyiC0tdHsdmGeo Df8t9R8Z27w4MnKAiU2tig0XQNO6h6jCiKTMWfcqH+kizb/ZFoCWTfhZmv13rzY6 fw6bYmtYaPXBku0C1doICKQ1ilj4io3sVZ+Vb7MHpmcqCXhGleJ4sGi1d33UlOrq GBShE4Q8gT+kOC9Ycta+qIeQjdfeyxSAenRhJNhzR5hBWTzgl6VElTUhjWD11O1A lJmJbFTHhw7gpfe//IVa+tVYtyjOU1qoor37oMja2Pf/KISt9+iFinPx6/e04pWC niKLIJ4lSVABfJm2GoTgMZrcwoq1FKL5XzA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678804220; x=1678811420; bh=304tJv7c77cLJ128re7ywlo7KqqWrQ+tQXP dOmaO4Vs=; b=bOGNDcJl8wVyzFAuSgvT8bv/c4d7wQZGaUx5LMKG7oPzQ2rp0T9 853bW9HN9OVqN7/0G5KFrS0HCPiRC4SN0xyCxO+/ijJa1c8VeFk+vx2iPjOeAyGY oZqF6FPLklYNZTlqdIexr6U+C+C2vd6ZnsTHR/SarzQa8MKerNahZlMfz/AXbRVP BNJjVy/lt6h7Bmf7xiGtRe8bP7tp1hM8YrJeybOCRRS/jPQ13aAYlC8zNBZ6nv6D fNqysBu8ZlMTfeaX/GbQwmMNXUWqOho++NGyrReiz6MTznoX/6D7L8zZsIGI8LTc 1LG/TSaDVr4idLZLbYNIlB364+pqEfXcTiA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdeiffffgeefteelhfekueetueduffejgfelvedtieejudek gfevheetheehgeejnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 10:30:13 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: David Marchand , Bruce Richardson , Qi Zhang , =?utf-8?q?Morten_Br=C3=B8rup?= , Shijith Thotton , Olivier Matz , Ruifeng Wang , Parav Pandit , Xueming Li , Tomasz Duszynski , Long Li , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Jingjing Wu , Beilei Xing , Ankur Dwivedi , Anoob Joseph , Tejasree Kondoj , Kai Ji , Pablo de Lara , Radha Mohan Chintakuntla , Veerasenareddy Burru , Chengwen Feng , Kevin Laatz , Pavan Nikhilesh , =?utf-8?q?Mattias_R=C3=B6nnblom?= , Liang Ma , Peter Mccarthy , Jerin Jacob , Harry van Haaren , "Artem V. Andreev" , Andrew Rybchenko , Ashwin Sekhar T K , Srikanth Yalavarthi , "John W. Linville" , Ciara Loftus , Chas Williams , "Min Hu (Connor)" , Yuying Zhang , Gaetan Rivet , Dongdong Liu , Yisen Zhuang , Konstantin Ananyev , Qiming Yang , Jakub Grajciar , Tetsuya Mukawa , Jakub Palider , Sachin Saxena , Hemant Agrawal Subject: [PATCH v3 1/5] build: clarify configuration without IOVA field in mbuf Date: Tue, 14 Mar 2023 15:29:54 +0100 Message-Id: <20230314142958.3479004-2-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230314142958.3479004-1-thomas@monjalon.net> References: <20230219115529.3260580-1-thomas@monjalon.net> <20230314142958.3479004-1-thomas@monjalon.net> 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 impact of the option "enable_iova_as_pa" is explained for users. Also the code flag "RTE_IOVA_AS_PA" is renamed as "RTE_IOVA_IN_MBUF" in order to be more accurate (IOVA mode is decided at runtime), and more readable in the code. Similarly the drivers are using the variable "require_iova_in_mbuf" instead of "pmd_supports_disable_iova_as_pa" with an opposite meaning. By default, it is assumed that drivers require the IOVA field in mbuf. The drivers which support removing this field have to declare themselves. Some bus drivers are declared compatible. If the option "enable_iova_as_pa" is disabled, the unsupported drivers will be listed with the new reason text "requires IOVA in mbuf". Suggested-by: Bruce Richardson Signed-off-by: Thomas Monjalon Reviewed-by: Bruce Richardson Acked-by: Morten Brørup Acked-by: Chengwen Feng --- app/test/test_mbuf.c | 2 +- config/arm/meson.build | 4 ++-- config/meson.build | 2 +- drivers/bus/auxiliary/meson.build | 3 +++ drivers/bus/pci/meson.build | 2 ++ drivers/bus/platform/meson.build | 2 ++ drivers/bus/vdev/meson.build | 2 ++ drivers/bus/vmbus/meson.build | 3 ++- drivers/common/cnxk/meson.build | 2 +- drivers/common/iavf/meson.build | 3 ++- drivers/crypto/armv8/meson.build | 2 +- drivers/crypto/cnxk/meson.build | 2 +- drivers/crypto/ipsec_mb/meson.build | 2 +- drivers/crypto/null/meson.build | 2 +- drivers/crypto/openssl/meson.build | 2 +- drivers/dma/cnxk/meson.build | 2 +- drivers/dma/skeleton/meson.build | 2 +- drivers/event/cnxk/meson.build | 2 +- drivers/event/dsw/meson.build | 2 +- drivers/event/opdl/meson.build | 2 +- drivers/event/skeleton/meson.build | 2 +- drivers/event/sw/meson.build | 2 +- drivers/mempool/bucket/meson.build | 2 +- drivers/mempool/cnxk/meson.build | 2 +- drivers/mempool/ring/meson.build | 2 +- drivers/mempool/stack/meson.build | 2 +- drivers/meson.build | 6 +++--- drivers/ml/cnxk/meson.build | 4 ++-- drivers/net/af_packet/meson.build | 2 +- drivers/net/af_xdp/meson.build | 2 +- drivers/net/bonding/meson.build | 3 ++- drivers/net/cnxk/meson.build | 3 ++- drivers/net/cpfl/meson.build | 4 +--- drivers/net/failsafe/meson.build | 3 ++- drivers/net/hns3/meson.build | 4 +--- drivers/net/ice/ice_rxtx_common_avx.h | 12 ++++++------ drivers/net/ice/ice_rxtx_vec_sse.c | 4 ++-- drivers/net/ice/meson.build | 3 ++- drivers/net/memif/meson.build | 3 ++- drivers/net/null/meson.build | 2 +- drivers/net/pcap/meson.build | 3 ++- drivers/net/ring/meson.build | 2 +- drivers/net/tap/meson.build | 3 ++- drivers/raw/cnxk_bphy/meson.build | 2 +- drivers/raw/cnxk_gpio/meson.build | 2 +- drivers/raw/skeleton/meson.build | 2 +- lib/eal/linux/eal.c | 2 +- lib/mbuf/rte_mbuf.c | 2 +- lib/mbuf/rte_mbuf.h | 4 ++-- lib/mbuf/rte_mbuf_core.h | 8 ++++---- lib/mbuf/rte_mbuf_dyn.c | 2 +- lib/meson.build | 2 +- meson_options.txt | 2 +- 53 files changed, 81 insertions(+), 67 deletions(-) diff --git a/app/test/test_mbuf.c b/app/test/test_mbuf.c index 6cbb03b0af..81a6632d11 100644 --- a/app/test/test_mbuf.c +++ b/app/test/test_mbuf.c @@ -1232,7 +1232,7 @@ test_failing_mbuf_sanity_check(struct rte_mempool *pktmbuf_pool) return -1; } - if (RTE_IOVA_AS_PA) { + if (RTE_IOVA_IN_MBUF) { badbuf = *buf; rte_mbuf_iova_set(&badbuf, 0); if (verify_mbuf_check_panics(&badbuf)) { diff --git a/config/arm/meson.build b/config/arm/meson.build index 451dbada7d..5ff66248de 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -319,7 +319,7 @@ soc_cn10k = { ['RTE_MAX_LCORE', 24], ['RTE_MAX_NUMA_NODES', 1], ['RTE_MEMPOOL_ALIGN', 128], - ['RTE_IOVA_AS_PA', 0] + ['RTE_IOVA_IN_MBUF', 0] ], 'part_number': '0xd49', 'extra_march_features': ['crypto'], @@ -412,7 +412,7 @@ soc_cn9k = { 'part_number': '0xb2', 'numa': false, 'flags': [ - ['RTE_IOVA_AS_PA', 0] + ['RTE_IOVA_IN_MBUF', 0] ] } diff --git a/config/meson.build b/config/meson.build index fc3ac99a32..fa730a1b14 100644 --- a/config/meson.build +++ b/config/meson.build @@ -316,7 +316,7 @@ endif if get_option('mbuf_refcnt_atomic') dpdk_conf.set('RTE_MBUF_REFCNT_ATOMIC', true) endif -dpdk_conf.set10('RTE_IOVA_AS_PA', get_option('enable_iova_as_pa')) +dpdk_conf.set10('RTE_IOVA_IN_MBUF', get_option('enable_iova_as_pa')) compile_time_cpuflags = [] subdir(arch_subdir) diff --git a/drivers/bus/auxiliary/meson.build b/drivers/bus/auxiliary/meson.build index fcb1a349c4..10468fd130 100644 --- a/drivers/bus/auxiliary/meson.build +++ b/drivers/bus/auxiliary/meson.build @@ -11,4 +11,7 @@ if is_linux 'linux/auxiliary.c', ) endif + +require_iova_in_mbuf = false + deps += ['kvargs'] diff --git a/drivers/bus/pci/meson.build b/drivers/bus/pci/meson.build index f50f039a68..fede114dc7 100644 --- a/drivers/bus/pci/meson.build +++ b/drivers/bus/pci/meson.build @@ -30,4 +30,6 @@ if is_windows includes += include_directories('windows') endif +require_iova_in_mbuf = false + deps += ['kvargs'] diff --git a/drivers/bus/platform/meson.build b/drivers/bus/platform/meson.build index 417d7b81f8..8633cc4e75 100644 --- a/drivers/bus/platform/meson.build +++ b/drivers/bus/platform/meson.build @@ -8,6 +8,8 @@ if not is_linux subdir_done() endif +require_iova_in_mbuf = false + deps += ['kvargs'] sources = files( 'platform_params.c', diff --git a/drivers/bus/vdev/meson.build b/drivers/bus/vdev/meson.build index 1532ed4f35..50f0c8918d 100644 --- a/drivers/bus/vdev/meson.build +++ b/drivers/bus/vdev/meson.build @@ -8,4 +8,6 @@ sources = files( headers = files('rte_bus_vdev.h') driver_sdk_headers = files('bus_vdev_driver.h') +require_iova_in_mbuf = false + deps += ['kvargs'] diff --git a/drivers/bus/vmbus/meson.build b/drivers/bus/vmbus/meson.build index 34988d1d84..86ad9cc4d8 100644 --- a/drivers/bus/vmbus/meson.build +++ b/drivers/bus/vmbus/meson.build @@ -6,7 +6,6 @@ if is_windows subdir_done() endif - headers = files('rte_bus_vmbus.h','rte_vmbus_reg.h') driver_sdk_headers = files('bus_vmbus_driver.h') @@ -25,3 +24,5 @@ else build = false reason = 'only supported on Linux' endif + +require_iova_in_mbuf = false diff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build index b4aa0a050c..402c3249cd 100644 --- a/drivers/common/cnxk/meson.build +++ b/drivers/common/cnxk/meson.build @@ -88,4 +88,4 @@ sources += files('cnxk_telemetry_bphy.c', ) deps += ['bus_pci', 'net', 'telemetry'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/common/iavf/meson.build b/drivers/common/iavf/meson.build index af8a4983e0..273e88e921 100644 --- a/drivers/common/iavf/meson.build +++ b/drivers/common/iavf/meson.build @@ -6,4 +6,5 @@ sources = files('iavf_adminq.c', 'iavf_common.c', 'iavf_impl.c') if cc.has_argument('-Wno-pointer-to-int-cast') cflags += '-Wno-pointer-to-int-cast' endif -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/crypto/armv8/meson.build b/drivers/crypto/armv8/meson.build index 700fb80eb2..a735eb511c 100644 --- a/drivers/crypto/armv8/meson.build +++ b/drivers/crypto/armv8/meson.build @@ -17,4 +17,4 @@ endif ext_deps += dep deps += ['bus_vdev'] sources = files('rte_armv8_pmd.c', 'rte_armv8_pmd_ops.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/crypto/cnxk/meson.build b/drivers/crypto/cnxk/meson.build index a5acabab2b..3d9a0dbbf0 100644 --- a/drivers/crypto/cnxk/meson.build +++ b/drivers/crypto/cnxk/meson.build @@ -32,4 +32,4 @@ else cflags += [ '-ULA_IPSEC_DEBUG','-UCNXK_CRYPTODEV_DEBUG' ] endif -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/crypto/ipsec_mb/meson.build b/drivers/crypto/ipsec_mb/meson.build index ec147d2110..3057e6fd10 100644 --- a/drivers/crypto/ipsec_mb/meson.build +++ b/drivers/crypto/ipsec_mb/meson.build @@ -41,4 +41,4 @@ sources = files( 'pmd_zuc.c', ) deps += ['bus_vdev', 'net', 'security'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/crypto/null/meson.build b/drivers/crypto/null/meson.build index 59a7508f18..2e8b05ad28 100644 --- a/drivers/crypto/null/meson.build +++ b/drivers/crypto/null/meson.build @@ -9,4 +9,4 @@ endif deps += 'bus_vdev' sources = files('null_crypto_pmd.c', 'null_crypto_pmd_ops.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/crypto/openssl/meson.build b/drivers/crypto/openssl/meson.build index d165c32ae8..1ec63c216d 100644 --- a/drivers/crypto/openssl/meson.build +++ b/drivers/crypto/openssl/meson.build @@ -15,4 +15,4 @@ endif deps += 'bus_vdev' sources = files('rte_openssl_pmd.c', 'rte_openssl_pmd_ops.c') ext_deps += dep -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/dma/cnxk/meson.build b/drivers/dma/cnxk/meson.build index 252e5ff78b..b868fb14cb 100644 --- a/drivers/dma/cnxk/meson.build +++ b/drivers/dma/cnxk/meson.build @@ -3,4 +3,4 @@ deps += ['bus_pci', 'common_cnxk', 'dmadev'] sources = files('cnxk_dmadev.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/dma/skeleton/meson.build b/drivers/dma/skeleton/meson.build index 2b0422ce61..77055683ad 100644 --- a/drivers/dma/skeleton/meson.build +++ b/drivers/dma/skeleton/meson.build @@ -5,4 +5,4 @@ deps += ['dmadev', 'kvargs', 'ring', 'bus_vdev'] sources = files( 'skeleton_dmadev.c', ) -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/event/cnxk/meson.build b/drivers/event/cnxk/meson.build index aa42ab3a90..3517e79341 100644 --- a/drivers/event/cnxk/meson.build +++ b/drivers/event/cnxk/meson.build @@ -479,4 +479,4 @@ foreach flag: extra_flags endforeach deps += ['bus_pci', 'common_cnxk', 'net_cnxk', 'crypto_cnxk'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/event/dsw/meson.build b/drivers/event/dsw/meson.build index e6808c0f71..01af94165f 100644 --- a/drivers/event/dsw/meson.build +++ b/drivers/event/dsw/meson.build @@ -6,4 +6,4 @@ if cc.has_argument('-Wno-format-nonliteral') cflags += '-Wno-format-nonliteral' endif sources = files('dsw_evdev.c', 'dsw_event.c', 'dsw_xstats.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/event/opdl/meson.build b/drivers/event/opdl/meson.build index 7abef44609..8613b2a746 100644 --- a/drivers/event/opdl/meson.build +++ b/drivers/event/opdl/meson.build @@ -9,4 +9,4 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/event/skeleton/meson.build b/drivers/event/skeleton/meson.build index fa6a5e0a9f..6e788cfcee 100644 --- a/drivers/event/skeleton/meson.build +++ b/drivers/event/skeleton/meson.build @@ -3,4 +3,4 @@ sources = files('skeleton_eventdev.c') deps += ['bus_pci', 'bus_vdev'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/event/sw/meson.build b/drivers/event/sw/meson.build index 8d815dfa84..3a3ebd72a3 100644 --- a/drivers/event/sw/meson.build +++ b/drivers/event/sw/meson.build @@ -9,4 +9,4 @@ sources = files( 'sw_evdev.c', ) deps += ['hash', 'bus_vdev'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/mempool/bucket/meson.build b/drivers/mempool/bucket/meson.build index 94c060904b..d0ec523237 100644 --- a/drivers/mempool/bucket/meson.build +++ b/drivers/mempool/bucket/meson.build @@ -12,4 +12,4 @@ if is_windows endif sources = files('rte_mempool_bucket.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/mempool/cnxk/meson.build b/drivers/mempool/cnxk/meson.build index d8bcc41ca0..50856ecde8 100644 --- a/drivers/mempool/cnxk/meson.build +++ b/drivers/mempool/cnxk/meson.build @@ -17,4 +17,4 @@ sources = files( ) deps += ['eal', 'mbuf', 'kvargs', 'bus_pci', 'common_cnxk', 'mempool'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/mempool/ring/meson.build b/drivers/mempool/ring/meson.build index 65d203d4b7..a25e9ebc16 100644 --- a/drivers/mempool/ring/meson.build +++ b/drivers/mempool/ring/meson.build @@ -2,4 +2,4 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_mempool_ring.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/mempool/stack/meson.build b/drivers/mempool/stack/meson.build index 961e90fc04..95f69042ae 100644 --- a/drivers/mempool/stack/meson.build +++ b/drivers/mempool/stack/meson.build @@ -4,4 +4,4 @@ sources = files('rte_mempool_stack.c') deps += ['stack'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/meson.build b/drivers/meson.build index f5916dc9bb..b85bec235d 100644 --- a/drivers/meson.build +++ b/drivers/meson.build @@ -110,7 +110,7 @@ foreach subpath:subdirs ext_deps = [] pkgconfig_extra_libs = [] testpmd_sources = [] - pmd_supports_disable_iova_as_pa = false + require_iova_in_mbuf = true if not enable_drivers.contains(drv_path) build = false @@ -128,9 +128,9 @@ foreach subpath:subdirs # pull in driver directory which should update all the local variables subdir(drv_path) - if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not pmd_supports_disable_iova_as_pa and not always_enable.contains(drv_path) + if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 and require_iova_in_mbuf build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'requires IOVA in mbuf (set enable_iova_as_pa option)' endif # get dependency objs from strings diff --git a/drivers/ml/cnxk/meson.build b/drivers/ml/cnxk/meson.build index 393bc629b0..94fa4283b1 100644 --- a/drivers/ml/cnxk/meson.build +++ b/drivers/ml/cnxk/meson.build @@ -23,10 +23,10 @@ sources = files( deps += ['mldev', 'common_cnxk', 'kvargs', 'hash'] +require_iova_in_mbuf = false + if get_option('buildtype').contains('debug') cflags += [ '-DCNXK_ML_DEV_DEBUG' ] else cflags += [ '-UCNXK_ML_DEV_DEBUG' ] endif - -pmd_supports_disable_iova_as_pa = true diff --git a/drivers/net/af_packet/meson.build b/drivers/net/af_packet/meson.build index bab008d083..f45e4491d4 100644 --- a/drivers/net/af_packet/meson.build +++ b/drivers/net/af_packet/meson.build @@ -6,4 +6,4 @@ if not is_linux reason = 'only supported on Linux' endif sources = files('rte_eth_af_packet.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/net/af_xdp/meson.build b/drivers/net/af_xdp/meson.build index 979b914bb6..9a8dbb4d49 100644 --- a/drivers/net/af_xdp/meson.build +++ b/drivers/net/af_xdp/meson.build @@ -71,4 +71,4 @@ if build endif endif -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/net/bonding/meson.build b/drivers/net/bonding/meson.build index 29022712cb..87c567b149 100644 --- a/drivers/net/bonding/meson.build +++ b/drivers/net/bonding/meson.build @@ -22,4 +22,5 @@ deps += 'sched' # needed for rte_bitmap.h deps += ['ip_frag'] headers = files('rte_eth_bond.h', 'rte_eth_bond_8023ad.h') -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/cnxk/meson.build b/drivers/net/cnxk/meson.build index c7ca24d437..8b5773ce65 100644 --- a/drivers/net/cnxk/meson.build +++ b/drivers/net/cnxk/meson.build @@ -195,4 +195,5 @@ foreach flag: extra_flags endforeach headers = files('rte_pmd_cnxk.h') -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/cpfl/meson.build b/drivers/net/cpfl/meson.build index 2cf69258e2..8d62ebfd77 100644 --- a/drivers/net/cpfl/meson.build +++ b/drivers/net/cpfl/meson.build @@ -7,9 +7,7 @@ if is_windows subdir_done() endif -if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 subdir_done() endif diff --git a/drivers/net/failsafe/meson.build b/drivers/net/failsafe/meson.build index bf8f791984..3066d37995 100644 --- a/drivers/net/failsafe/meson.build +++ b/drivers/net/failsafe/meson.build @@ -27,4 +27,5 @@ sources = files( 'failsafe_ops.c', 'failsafe_rxtx.c', ) -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build index e1a5afa2ec..2c71105275 100644 --- a/drivers/net/hns3/meson.build +++ b/drivers/net/hns3/meson.build @@ -13,9 +13,7 @@ if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_ subdir_done() endif -if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 subdir_done() endif diff --git a/drivers/net/ice/ice_rxtx_common_avx.h b/drivers/net/ice/ice_rxtx_common_avx.h index e69e23997f..dacb87dcb0 100644 --- a/drivers/net/ice/ice_rxtx_common_avx.h +++ b/drivers/net/ice/ice_rxtx_common_avx.h @@ -54,7 +54,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) mb0 = rxep[0].mbuf; mb1 = rxep[1].mbuf; -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) != offsetof(struct rte_mbuf, buf_addr) + 8); @@ -62,7 +62,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr); vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr); -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* convert pa to dma_addr hdr/data */ dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0); dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1); @@ -105,7 +105,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) mb6 = rxep[6].mbuf; mb7 = rxep[7].mbuf; -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) != offsetof(struct rte_mbuf, buf_addr) + 8); @@ -142,7 +142,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) _mm512_inserti64x4(_mm512_castsi256_si512(vaddr4_5), vaddr6_7, 1); -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* convert pa to dma_addr hdr/data */ dma_addr0_3 = _mm512_unpackhi_epi64(vaddr0_3, vaddr0_3); dma_addr4_7 = _mm512_unpackhi_epi64(vaddr4_7, vaddr4_7); @@ -177,7 +177,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) mb2 = rxep[2].mbuf; mb3 = rxep[3].mbuf; -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) != offsetof(struct rte_mbuf, buf_addr) + 8); @@ -198,7 +198,7 @@ ice_rxq_rearm_common(struct ice_rx_queue *rxq, __rte_unused bool avx512) _mm256_inserti128_si256(_mm256_castsi128_si256(vaddr2), vaddr3, 1); -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* convert pa to dma_addr hdr/data */ dma_addr0_1 = _mm256_unpackhi_epi64(vaddr0_1, vaddr0_1); dma_addr2_3 = _mm256_unpackhi_epi64(vaddr2_3, vaddr2_3); diff --git a/drivers/net/ice/ice_rxtx_vec_sse.c b/drivers/net/ice/ice_rxtx_vec_sse.c index 72dfd58308..71fdd6ffb5 100644 --- a/drivers/net/ice/ice_rxtx_vec_sse.c +++ b/drivers/net/ice/ice_rxtx_vec_sse.c @@ -68,7 +68,7 @@ ice_rxq_rearm(struct ice_rx_queue *rxq) mb0 = rxep[0].mbuf; mb1 = rxep[1].mbuf; -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* load buf_addr(lo 64bit) and buf_iova(hi 64bit) */ RTE_BUILD_BUG_ON(offsetof(struct rte_mbuf, buf_iova) != offsetof(struct rte_mbuf, buf_addr) + 8); @@ -76,7 +76,7 @@ ice_rxq_rearm(struct ice_rx_queue *rxq) vaddr0 = _mm_loadu_si128((__m128i *)&mb0->buf_addr); vaddr1 = _mm_loadu_si128((__m128i *)&mb1->buf_addr); -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /* convert pa to dma_addr hdr/data */ dma_addr0 = _mm_unpackhi_epi64(vaddr0, vaddr0); dma_addr1 = _mm_unpackhi_epi64(vaddr1, vaddr1); diff --git a/drivers/net/ice/meson.build b/drivers/net/ice/meson.build index 123b190f72..460528854a 100644 --- a/drivers/net/ice/meson.build +++ b/drivers/net/ice/meson.build @@ -78,4 +78,5 @@ sources += files( 'ice_dcf_parent.c', 'ice_dcf_sched.c', ) -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/memif/meson.build b/drivers/net/memif/meson.build index 28416a982f..8b2aab1f39 100644 --- a/drivers/net/memif/meson.build +++ b/drivers/net/memif/meson.build @@ -12,4 +12,5 @@ sources = files( ) deps += ['hash'] -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/null/meson.build b/drivers/net/null/meson.build index a51f8f5211..bad7dc1af7 100644 --- a/drivers/net/null/meson.build +++ b/drivers/net/null/meson.build @@ -2,4 +2,4 @@ # Copyright(c) 2017 Intel Corporation sources = files('rte_eth_null.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/net/pcap/meson.build b/drivers/net/pcap/meson.build index a5a2971f0e..676c55018e 100644 --- a/drivers/net/pcap/meson.build +++ b/drivers/net/pcap/meson.build @@ -15,4 +15,5 @@ ext_deps += pcap_dep if is_windows ext_deps += cc.find_library('iphlpapi', required: true) endif -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/net/ring/meson.build b/drivers/net/ring/meson.build index 3534a3cc22..9b713c9370 100644 --- a/drivers/net/ring/meson.build +++ b/drivers/net/ring/meson.build @@ -3,4 +3,4 @@ sources = files('rte_eth_ring.c') headers = files('rte_eth_ring.h') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/net/tap/meson.build b/drivers/net/tap/meson.build index 4c9a9eac2b..5099ccdff1 100644 --- a/drivers/net/tap/meson.build +++ b/drivers/net/tap/meson.build @@ -35,4 +35,5 @@ foreach arg:args config.set(arg[0], cc.has_header_symbol(arg[1], arg[2])) endforeach configure_file(output : 'tap_autoconf.h', configuration : config) -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false diff --git a/drivers/raw/cnxk_bphy/meson.build b/drivers/raw/cnxk_bphy/meson.build index ffb0ee6b7e..bb5d2ffb80 100644 --- a/drivers/raw/cnxk_bphy/meson.build +++ b/drivers/raw/cnxk_bphy/meson.build @@ -10,4 +10,4 @@ sources = files( 'cnxk_bphy_irq.c', ) headers = files('rte_pmd_bphy.h') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/raw/cnxk_gpio/meson.build b/drivers/raw/cnxk_gpio/meson.build index f52a7be9eb..9d9a527392 100644 --- a/drivers/raw/cnxk_gpio/meson.build +++ b/drivers/raw/cnxk_gpio/meson.build @@ -9,4 +9,4 @@ sources = files( 'cnxk_gpio_selftest.c', ) headers = files('rte_pmd_cnxk_gpio.h') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/drivers/raw/skeleton/meson.build b/drivers/raw/skeleton/meson.build index bfb8fd8bcc..9d5fcf6514 100644 --- a/drivers/raw/skeleton/meson.build +++ b/drivers/raw/skeleton/meson.build @@ -6,4 +6,4 @@ sources = files( 'skeleton_rawdev.c', 'skeleton_rawdev_test.c', ) -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index 10cef8c905..c37868b7f0 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1129,7 +1129,7 @@ rte_eal_init(int argc, char **argv) return -1; } - if (rte_eal_iova_mode() == RTE_IOVA_PA && !RTE_IOVA_AS_PA) { + if (rte_eal_iova_mode() == RTE_IOVA_PA && !RTE_IOVA_IN_MBUF) { rte_eal_init_alert("Cannot use IOVA as 'PA' as it is disabled during build"); rte_errno = EINVAL; return -1; diff --git a/lib/mbuf/rte_mbuf.c b/lib/mbuf/rte_mbuf.c index cfd8062f1e..686e797c80 100644 --- a/lib/mbuf/rte_mbuf.c +++ b/lib/mbuf/rte_mbuf.c @@ -388,7 +388,7 @@ int rte_mbuf_check(const struct rte_mbuf *m, int is_header, *reason = "bad mbuf pool"; return -1; } - if (RTE_IOVA_AS_PA && rte_mbuf_iova_get(m) == 0) { + if (RTE_IOVA_IN_MBUF && rte_mbuf_iova_get(m) == 0) { *reason = "bad IO addr"; return -1; } diff --git a/lib/mbuf/rte_mbuf.h b/lib/mbuf/rte_mbuf.h index 3a82eb136d..bc41eac10d 100644 --- a/lib/mbuf/rte_mbuf.h +++ b/lib/mbuf/rte_mbuf.h @@ -146,7 +146,7 @@ static inline uint16_t rte_pktmbuf_priv_size(struct rte_mempool *mp); static inline rte_iova_t rte_mbuf_iova_get(const struct rte_mbuf *m) { -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF return m->buf_iova; #else return (rte_iova_t)m->buf_addr; @@ -164,7 +164,7 @@ rte_mbuf_iova_get(const struct rte_mbuf *m) static inline void rte_mbuf_iova_set(struct rte_mbuf *m, rte_iova_t iova) { -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF m->buf_iova = iova; #else RTE_SET_USED(m); diff --git a/lib/mbuf/rte_mbuf_core.h b/lib/mbuf/rte_mbuf_core.h index 93d66c63e6..c692c33ec4 100644 --- a/lib/mbuf/rte_mbuf_core.h +++ b/lib/mbuf/rte_mbuf_core.h @@ -466,11 +466,11 @@ struct rte_mbuf { RTE_MARKER cacheline0; void *buf_addr; /**< Virtual address of segment buffer. */ -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /** * Physical address of segment buffer. * This field is undefined if the build is configured to use only - * virtual address as IOVA (i.e. RTE_IOVA_AS_PA is 0). + * virtual address as IOVA (i.e. RTE_IOVA_IN_MBUF is 0). * Force alignment to 8-bytes, so as to ensure we have the exact * same mbuf cacheline0 layout for 32-bit and 64-bit. This makes * working on vector drivers easier. @@ -599,7 +599,7 @@ struct rte_mbuf { /* second cache line - fields only used in slow path or on TX */ RTE_MARKER cacheline1 __rte_cache_min_aligned; -#if RTE_IOVA_AS_PA +#if RTE_IOVA_IN_MBUF /** * Next segment of scattered packet. Must be NULL in the last * segment or in case of non-segmented packet. @@ -608,7 +608,7 @@ struct rte_mbuf { #else /** * Reserved for dynamic fields - * when the next pointer is in first cache line (i.e. RTE_IOVA_AS_PA is 0). + * when the next pointer is in first cache line (i.e. RTE_IOVA_IN_MBUF is 0). */ uint64_t dynfield2; #endif diff --git a/lib/mbuf/rte_mbuf_dyn.c b/lib/mbuf/rte_mbuf_dyn.c index 35839e938c..5049508bea 100644 --- a/lib/mbuf/rte_mbuf_dyn.c +++ b/lib/mbuf/rte_mbuf_dyn.c @@ -128,7 +128,7 @@ init_shared_mem(void) */ memset(shm, 0, sizeof(*shm)); mark_free(dynfield1); -#if !RTE_IOVA_AS_PA +#if !RTE_IOVA_IN_MBUF mark_free(dynfield2); #endif diff --git a/lib/meson.build b/lib/meson.build index 11dcebd1bc..0812ce6026 100644 --- a/lib/meson.build +++ b/lib/meson.build @@ -94,7 +94,7 @@ dpdk_libs_deprecated += [ disabled_libs = [] opt_disabled_libs = run_command(list_dir_globs, get_option('disable_libs'), check: true).stdout().split() -if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 opt_disabled_libs += ['kni'] endif foreach l:opt_disabled_libs diff --git a/meson_options.txt b/meson_options.txt index 08528492f7..82c8297065 100644 --- a/meson_options.txt +++ b/meson_options.txt @@ -41,7 +41,7 @@ option('max_lcores', type: 'string', value: 'default', description: option('max_numa_nodes', type: 'string', value: 'default', description: 'Set the highest NUMA node supported by EAL; "default" is different per-arch, "detect" detects the highest NUMA node on the build machine.') option('enable_iova_as_pa', type: 'boolean', value: true, description: - 'Support for IOVA as physical address. Disabling removes the buf_iova field of mbuf.') + 'Support the use of physical addresses for IO addresses, such as used by UIO or VFIO in no-IOMMU mode. When disabled, DPDK can only run with IOMMU support for address mappings, but will have more space available in the mbuf structure.') option('mbuf_refcnt_atomic', type: 'boolean', value: true, description: 'Atomically access the mbuf refcnt.') option('platform', type: 'string', value: 'native', description: From patchwork Tue Mar 14 14:29:55 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 125109 X-Patchwork-Delegate: thomas@monjalon.net 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 175CA41E90; Tue, 14 Mar 2023 15:30:36 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id CAA3842BFE; Tue, 14 Mar 2023 15:30:30 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id EF3D842BB1 for ; Tue, 14 Mar 2023 15:30:29 +0100 (CET) Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.west.internal (Postfix) with ESMTP id 489D5320094E; Tue, 14 Mar 2023 10:30:28 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Tue, 14 Mar 2023 10:30:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1678804227; x= 1678890627; bh=0J8LGN2KtqIHejnsAA/yRjKvr2xIcKLLYZaNXzn1Tdg=; b=j XXWYfzuuEMrQ4mpJKYvRpTHDDHxL9S4O6Y2jbOY3qK8Q+oWiQKYgmZzXWvzQNS4L kTcwjLjZVabE6aCAnTP3p36961JUZ8k23KcFChCT2+GBhs6CPqzzo5Voz6iUgE9f lacFeA4iEeahpn2hYXZBUHu7nTmG316YxBQ716w9s0XZM+CKWPc2wdBta307TXOT HcXEgANmx/2YebKGNiF9QdjeDUTXV9A7MMVJcQ4B1K4Ks2QObJPYlHu+fHTOb0/R wkQUPzaIDs7Pa1FaTslmHwUCNIZXTYJMPE3X1wp5S1+EmNTiNXsPW5yt8i1wZLRr LmheTuuDJFDflVcCf1e2g== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1678804227; x= 1678890627; bh=0J8LGN2KtqIHejnsAA/yRjKvr2xIcKLLYZaNXzn1Tdg=; b=S fzarZ9Z/6rT8mta9/PvcHeyoX3z8abdfARrIDIwn/h4RVM9F5E5WUwqQPkl7HT6+ sO48qBCyuXB7qyIKWXdoChe/Omb9UURn7vXz3kWyH4BxaDk3mk3ISKXSxeBufUaP 83R8DyWxtqbR0ROHDliNbhnKeIIw0EwOlTZkiDfnx/AG/gQe+oKE7CFAMtSTgIX8 mYNzfaysQ805wYah8rpOY9p64QlxRKlADDk7J4ZLlrV64eOxBSyNom+Hb9lXsTMj tM+5t51u9JcNQtufgclUElZgrTizEzGwhzFtNYCFQM1B0o6VvVhm6dQhAUG8rGGJ nAt9uTQ0BM/rR+31L025w== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 10:30:26 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: David Marchand , Bruce Richardson , Qi Zhang , =?utf-8?q?Morten_Br=C3=B8rup?= , Shijith Thotton , Chengwen Feng , Ruifeng Wang , Dongdong Liu , Yisen Zhuang Subject: [PATCH v3 2/5] net/hns3: support IOVA forced as VA Date: Tue, 14 Mar 2023 15:29:55 +0100 Message-Id: <20230314142958.3479004-3-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230314142958.3479004-1-thomas@monjalon.net> References: <20230219115529.3260580-1-thomas@monjalon.net> <20230314142958.3479004-1-thomas@monjalon.net> 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 From: Chengwen Feng Claim PMD does not require IOVA mbuf field, so it can build when disabling enable_iova_as_pa. Signed-off-by: Chengwen Feng Reviewed-by: Ruifeng Wang Acked-by: Dongdong Liu --- drivers/net/hns3/hns3_rxtx_vec_neon.h | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 13 +++++++++---- drivers/net/hns3/meson.build | 6 ++---- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/drivers/net/hns3/hns3_rxtx_vec_neon.h b/drivers/net/hns3/hns3_rxtx_vec_neon.h index 55d9bf817d..6c49c70fc7 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_neon.h +++ b/drivers/net/hns3/hns3_rxtx_vec_neon.h @@ -13,7 +13,7 @@ static inline void hns3_vec_tx(volatile struct hns3_desc *desc, struct rte_mbuf *pkt) { uint64x2_t val1 = { - pkt->buf_iova + pkt->data_off, + rte_pktmbuf_iova(pkt), ((uint64_t)pkt->data_len) << HNS3_TXD_SEND_SIZE_SHIFT }; uint64x2_t val2 = { diff --git a/drivers/net/hns3/hns3_rxtx_vec_sve.c b/drivers/net/hns3/hns3_rxtx_vec_sve.c index 6f23ba674d..8bfc3de049 100644 --- a/drivers/net/hns3/hns3_rxtx_vec_sve.c +++ b/drivers/net/hns3/hns3_rxtx_vec_sve.c @@ -261,10 +261,10 @@ hns3_rxq_rearm_mbuf_sve(struct hns3_rx_queue *rxq) for (i = 0; i < HNS3_DEFAULT_RXQ_REARM_THRESH; i += REARM_LOOP_STEP_NUM, rxep += REARM_LOOP_STEP_NUM, rxdp += REARM_LOOP_STEP_NUM) { uint64_t iova[REARM_LOOP_STEP_NUM]; - iova[0] = rxep[0].mbuf->buf_iova; - iova[1] = rxep[1].mbuf->buf_iova; - iova[2] = rxep[2].mbuf->buf_iova; - iova[3] = rxep[3].mbuf->buf_iova; + iova[0] = rte_mbuf_iova_get(rxep[0].mbuf); + iova[1] = rte_mbuf_iova_get(rxep[1].mbuf); + iova[2] = rte_mbuf_iova_get(rxep[2].mbuf); + iova[3] = rte_mbuf_iova_get(rxep[3].mbuf); svuint64_t siova = svld1_u64(PG64_256BIT, iova); siova = svadd_n_u64_z(PG64_256BIT, siova, RTE_PKTMBUF_HEADROOM); svuint64_t ol_base = svdup_n_u64(0); @@ -397,8 +397,13 @@ hns3_tx_fill_hw_ring_sve(struct hns3_tx_queue *txq, pg = svwhilelt_b64_u32(i, nb_pkts); base_addr = svld1_u64(pg, (uint64_t *)pkts); /* calc mbuf's field buf_iova address */ +#if RTE_IOVA_IN_MBUF buf_iova = svadd_n_u64_z(pg, base_addr, offsetof(struct rte_mbuf, buf_iova)); +#else + buf_iova = svadd_n_u64_z(pg, base_addr, + offsetof(struct rte_mbuf, buf_addr)); +#endif /* calc mbuf's field data_off address */ data_off = svadd_n_u64_z(pg, base_addr, offsetof(struct rte_mbuf, data_off)); diff --git a/drivers/net/hns3/meson.build b/drivers/net/hns3/meson.build index 2c71105275..97cb85dcc8 100644 --- a/drivers/net/hns3/meson.build +++ b/drivers/net/hns3/meson.build @@ -13,10 +13,6 @@ if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_ subdir_done() endif -if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 - subdir_done() -endif - sources = files( 'hns3_cmd.c', 'hns3_dcb.c', @@ -37,6 +33,8 @@ sources = files( 'hns3_dump.c', ) +require_iova_in_mbuf = false + deps += ['hash'] if arch_subdir == 'arm' and dpdk_conf.get('RTE_ARCH_64') From patchwork Tue Mar 14 14:29:56 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 125110 X-Patchwork-Delegate: thomas@monjalon.net 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 5C23C41E90; Tue, 14 Mar 2023 15:30:42 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id F23E941144; Tue, 14 Mar 2023 15:30:34 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 1765141144 for ; Tue, 14 Mar 2023 15:30:34 +0100 (CET) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id B563A3200984; Tue, 14 Mar 2023 10:30:32 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute2.internal (MEProxy); Tue, 14 Mar 2023 10:30:33 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1678804232; x= 1678890632; bh=uxfKwlWx9Ldn2Y4OPb1QH64/8e9Jmg6gEn9EW9AhD28=; b=z WnEQTlppgkR3Fuvr+0TqFftPn8LWWVov6DOoQNa3hZYaPkfPx3wkkgF8IlKxkovK 4IRBMnfdflc38ivJM9gvhrT1zxvtYrBydcDfC+4b80MFEVrqUsF678kcENf64LFJ fML8d9Z9quQx3y3OZgTZISWCTRTtHFDFWgxNOye/ntI0XKGd3K9ZZAPsv4kryJau q1eGUOlkNm+IIwFHzfAfCE6y+uzSmnozD8TimLFhIVLnyP0CAAUJG32Ik51tyL8T V9Mg+BhFEI1BB6G2kLO6jdRDyY063JYBcWMF+PFzvyfcBDKieFxc3p6aPmYOy7Gm PQX3Otewu6Usq50m6uFTQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1678804232; x= 1678890632; bh=uxfKwlWx9Ldn2Y4OPb1QH64/8e9Jmg6gEn9EW9AhD28=; b=f khPGv6Vrg+5M53ZN0710KGUahavz68UV2m3j2i8x5mWS2/94ABAG5pE7YGSqk6AQ OcdxTOzxIX+HGJF3tnXs3h/bVKeH+sAb1XDEgsq8xfMiPWwpnkSs52oaeh7aQkFY e9e5qrEWElebhD2goe0JXiekiSwd0JbGGA4TLT20YaMTIP4RxEcNHmgOzpfr84Q/ E3oxrT0NxtQ0VxhrERGgxKWO2Zw4Cghl/cpEia+aYghm5dt/hRGKTSuMkUlroHp3 bicUepSsDRrqxibR7adAzWvWPvIfwBPUZ7XssMXSc5O9z8slAGGvNO01uASVZ2sK 8o36Ulxlt4kvgOCPj1y0g== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 10:30:30 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: David Marchand , Bruce Richardson , Qi Zhang , =?utf-8?q?Morten_Br=C3=B8rup?= , Shijith Thotton , Chengwen Feng Subject: [PATCH v3 3/5] dma/hisilicon: support IOVA forced as VA Date: Tue, 14 Mar 2023 15:29:56 +0100 Message-Id: <20230314142958.3479004-4-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230314142958.3479004-1-thomas@monjalon.net> References: <20230219115529.3260580-1-thomas@monjalon.net> <20230314142958.3479004-1-thomas@monjalon.net> 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 From: Chengwen Feng Claim PMD does not require IOVA mbuf field, so it can build when disabling enable_iova_as_pa. Signed-off-by: Chengwen Feng --- drivers/dma/hisilicon/meson.build | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/dma/hisilicon/meson.build b/drivers/dma/hisilicon/meson.build index 0786772442..1098539e20 100644 --- a/drivers/dma/hisilicon/meson.build +++ b/drivers/dma/hisilicon/meson.build @@ -17,3 +17,5 @@ deps += ['bus_pci', 'dmadev'] sources = files( 'hisi_dmadev.c', ) + +require_iova_in_mbuf = false From patchwork Tue Mar 14 14:29:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 125111 X-Patchwork-Delegate: thomas@monjalon.net 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 8CAD541E90; Tue, 14 Mar 2023 15:30:48 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2CB744282D; Tue, 14 Mar 2023 15:30:40 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 4477141101 for ; Tue, 14 Mar 2023 15:30:38 +0100 (CET) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id 72BBC320097F; Tue, 14 Mar 2023 10:30:36 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Tue, 14 Mar 2023 10:30:37 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm2; t=1678804236; x= 1678890636; bh=p/G/bvoQePbXC4MOPZI7/j7x9erGBlyKrzleDF5gYmE=; b=a rM6qR5ZktJ+QT8R6VftQrWApj97s+c1rwqG59/oOs3Ze/mg29SfdpNoEp8lFKIXT dqZrIviPdq4oCwqelBCQFn6sVv9wjkYiBvj8RfSRbrVmhqdlOrY4ksGnNbJL3zjV QpJHnbWOsKhIOwHqXQVQiI5Af0HHGwiZ+EReEuqgWsKWQgSqUq2/BD1/K812QNjT SUxQeCMqRLJqJh87VLldj1xe2aLkTE83/Rya5eSO+lv1pleakI01lMO0vVg7X/oC FXG0dm0L/x4Vg8vt87Tj+sz3+viyBO17WNan/r5EpuJlpFEt/K0sPis8liNKzbJQ Jl7yvPkAz38fnVbET3FHg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t=1678804236; x= 1678890636; bh=p/G/bvoQePbXC4MOPZI7/j7x9erGBlyKrzleDF5gYmE=; b=D Ce0UjC5ac/SK7Wrn1LWUeJHWw5AaYNFnHwhuS5JCWtozda2v+679F8yYZDDiT5xZ LJdgQw4d0eEHxXr4vJRm9s58EnNQQJwhOcRmES0mROd08k+wKfHtcXajgeVCh80B U2oHXiLpcP2H1i3G83YSqwaqkRB8Cg+pLkqJqcF+LwY/KFVut1QMn0f91NrWossG aanjYJZFUVp38IYHGh2vpUAj2B9ZJeRzldgFoCcdGUDDUmVbZeimqHpZg18EQjr6 dFWMnsIf9ry8f8eFvkFBYg5YXi+gyvy784ML323eGEiDO2XLqtyi4MHh8+VqApDa cFSQ6eFz01Gn9cDqiXyMw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgieeiucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepvfhhohhm rghsucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenuc ggtffrrghtthgvrhhnpedvjefhudeghedvtdeijeeigeetuedugfejueekieeltdfhteev keehhfeilefhtdenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfh hrohhmpehthhhomhgrshesmhhonhhjrghlohhnrdhnvght X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 10:30:34 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: David Marchand , Bruce Richardson , Qi Zhang , =?utf-8?q?Morten_Br=C3=B8rup?= , Shijith Thotton , Mahipal Challa , Harman Kalra , Ashish Gupta , Fan Zhang Subject: [PATCH v3 4/5] compress/octeontx: support IOVA forced as VA Date: Tue, 14 Mar 2023 15:29:57 +0100 Message-Id: <20230314142958.3479004-5-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230314142958.3479004-1-thomas@monjalon.net> References: <20230219115529.3260580-1-thomas@monjalon.net> <20230314142958.3479004-1-thomas@monjalon.net> 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 From: Mahipal Challa Claim octeontx compress, common and mempool drivers do not require IOVA mbuf field, so they can build when disabling enable_iova_as_pa. Signed-off-by: Mahipal Challa --- drivers/common/octeontx/meson.build | 2 ++ drivers/compress/octeontx/meson.build | 2 ++ drivers/mempool/octeontx/meson.build | 2 ++ 3 files changed, 6 insertions(+) diff --git a/drivers/common/octeontx/meson.build b/drivers/common/octeontx/meson.build index dc060dfea1..a15e2febf5 100644 --- a/drivers/common/octeontx/meson.build +++ b/drivers/common/octeontx/meson.build @@ -9,3 +9,5 @@ if not is_linux or not dpdk_conf.get('RTE_ARCH_64') endif sources = files('octeontx_mbox.c') + +require_iova_in_mbuf = false diff --git a/drivers/compress/octeontx/meson.build b/drivers/compress/octeontx/meson.build index 3a29c3e609..16f973f4d7 100644 --- a/drivers/compress/octeontx/meson.build +++ b/drivers/compress/octeontx/meson.build @@ -11,3 +11,5 @@ sources = files('otx_zip.c', 'otx_zip_pmd.c') includes += include_directories('include') deps += ['mempool_octeontx', 'bus_pci'] ext_deps += dep + +require_iova_in_mbuf = false diff --git a/drivers/mempool/octeontx/meson.build b/drivers/mempool/octeontx/meson.build index fb05928129..3ccecac75d 100644 --- a/drivers/mempool/octeontx/meson.build +++ b/drivers/mempool/octeontx/meson.build @@ -13,3 +13,5 @@ sources = files( ) deps += ['mbuf', 'bus_pci', 'common_octeontx'] + +require_iova_in_mbuf = false From patchwork Tue Mar 14 14:29:58 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Thomas Monjalon X-Patchwork-Id: 125112 X-Patchwork-Delegate: thomas@monjalon.net 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 A748641E90; Tue, 14 Mar 2023 15:30:54 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 4F45042C4D; Tue, 14 Mar 2023 15:30:45 +0100 (CET) Received: from wout5-smtp.messagingengine.com (wout5-smtp.messagingengine.com [64.147.123.21]) by mails.dpdk.org (Postfix) with ESMTP id 290B441101; Tue, 14 Mar 2023 15:30:44 +0100 (CET) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.west.internal (Postfix) with ESMTP id 0F52B3200984; Tue, 14 Mar 2023 10:30:41 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute6.internal (MEProxy); Tue, 14 Mar 2023 10:30:43 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1678804241; x=1678890641; bh=6nPIIZrheKSp6ESNHI5w1FQuoHxL9AKQbVO YYRk3Q20=; b=uzEr4dtM0xc9UiqWw6R95ZH06l1Lys7O9IJ2LwHUbY3B5FbnL70 dnhikXgSV3PADBe3+i+o4WHj8DVJxYh0Gv6iVHWleii2pOtfZ6F5R3eWMJghLoHE hdE0bm6GJW441e2FYy4xC++M23MuhQ0CASsdwI/+qsceMujVALdWvaTmCxDHfC0E JPEB/NC0afn+omddI2RL7irzqeI0FMshQ1Q3L1I05AcQVK9oapsrepNFhDDjVf/c 73OcMY2FDvSRWuJ1jD593R6MRB6f8Noq6/XZlcuyIrVyO7rMyLnvCSf5wOV/tc9V RhGR5h7COsKiOUPMX6zRvcj6oyljjTYI2IQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm2; t= 1678804241; x=1678890641; bh=6nPIIZrheKSp6ESNHI5w1FQuoHxL9AKQbVO YYRk3Q20=; b=rsVyytx7IMvdKlMW09CpfWF9mop5OwK6hKt8OLVTh3ugThuxrqh SG8/sB0GnNbtHotM+G8aN2/5Wl1WQ5JsF03e5TKERoqTz34QpLyHO7HVmAOpvhaj bnIcrvt+AKOrZYo70INxYE0couFqgxzNByedvgBud1d2Srv3W8zLKe64V3VQiQTf GwUIYE3KldjeWmsf26Xmcy/ubJCvDrQHj9JL7R1lx8MSrK0XlYHxyqOcki2Xs7Or C+Gqa726QsSI2eyTsReVNC9L8wpyKrMRt0AqtP4/jzuVV9EUyRo6IFpM+Mn//3jM zo393oZZ4uOy+D35/wQ7TYLwMFLGctbTYnw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvddviedgieejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhggtgfgsehtkeertdertdejnecuhfhrohhmpefvhhho mhgrshcuofhonhhjrghlohhnuceothhhohhmrghssehmohhnjhgrlhhonhdrnhgvtheqne cuggftrfgrthhtvghrnheptdeiffffgeefteelhfekueetueduffejgfelvedtieejudek gfevheetheehgeejnecuvehluhhsthgvrhfuihiivgepudenucfrrghrrghmpehmrghilh hfrhhomhepthhhohhmrghssehmohhnjhgrlhhonhdrnhgvth X-ME-Proxy: Feedback-ID: i47234305:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Tue, 14 Mar 2023 10:30:39 -0400 (EDT) From: Thomas Monjalon To: dev@dpdk.org Cc: David Marchand , Bruce Richardson , Qi Zhang , =?utf-8?q?Morten_Br=C3=B8rup?= , Shijith Thotton , stable@dpdk.org, Jingjing Wu , Beilei Xing , Timothy McDaniel , Ajit Khaparde , Somnath Kotur , John Daley , Hyong Youb Kim , Yuying Zhang , Maxime Coquelin , Chenbo Xia , Olivier Matz Subject: [PATCH v3 5/5] drivers: skip build of sub-libs not supporting IOVA mode Date: Tue, 14 Mar 2023 15:29:58 +0100 Message-Id: <20230314142958.3479004-6-thomas@monjalon.net> X-Mailer: git-send-email 2.39.1 In-Reply-To: <20230314142958.3479004-1-thomas@monjalon.net> References: <20230219115529.3260580-1-thomas@monjalon.net> <20230314142958.3479004-1-thomas@monjalon.net> 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 If IOVA as PA is disabled and the driver requires the IOVA field, the build of the driver was disabled. Unfortunately some drivers were building some sub-libraries (with specific options for vector paths) which were not disabled. The build parsing of those drivers need to be skipped earlier to avoid defining the sub-libraries. Fixes: a986c2b7973d ("build: add option to configure IOVA mode as PA") Cc: stable@dpdk.org Signed-off-by: Thomas Monjalon Acked-by: Morten Brørup Acked-by: Shijith Thotton --- drivers/common/idpf/meson.build | 4 ++++ drivers/event/dlb2/meson.build | 5 ++++- drivers/net/bnxt/meson.build | 4 ++++ drivers/net/enic/meson.build | 4 ++++ drivers/net/i40e/meson.build | 4 ++++ drivers/net/iavf/meson.build | 3 +++ drivers/net/virtio/meson.build | 4 ++++ 7 files changed, 27 insertions(+), 1 deletion(-) diff --git a/drivers/common/idpf/meson.build b/drivers/common/idpf/meson.build index 58059ef443..63f60accd9 100644 --- a/drivers/common/idpf/meson.build +++ b/drivers/common/idpf/meson.build @@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 Intel Corporation +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + deps += ['mbuf'] sources = files( diff --git a/drivers/event/dlb2/meson.build b/drivers/event/dlb2/meson.build index a2e60273c5..515d1795fe 100644 --- a/drivers/event/dlb2/meson.build +++ b/drivers/event/dlb2/meson.build @@ -1,4 +1,3 @@ - # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019-2020 Intel Corporation @@ -8,6 +7,10 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') subdir_done() endif +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + sources = files( 'dlb2.c', 'dlb2_iface.c', diff --git a/drivers/net/bnxt/meson.build b/drivers/net/bnxt/meson.build index 09d494e90f..0288ed6262 100644 --- a/drivers/net/bnxt/meson.build +++ b/drivers/net/bnxt/meson.build @@ -8,6 +8,10 @@ if is_windows subdir_done() endif +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + headers = files('rte_pmd_bnxt.h') cflags_options = [ '-DSUPPORT_CFA_HW_ALL=1', diff --git a/drivers/net/enic/meson.build b/drivers/net/enic/meson.build index 7131a25f09..0a0992c3cb 100644 --- a/drivers/net/enic/meson.build +++ b/drivers/net/enic/meson.build @@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + sources = files( 'base/vnic_cq.c', 'base/vnic_dev.c', diff --git a/drivers/net/i40e/meson.build b/drivers/net/i40e/meson.build index e00c1a9ef9..8e53b87a65 100644 --- a/drivers/net/i40e/meson.build +++ b/drivers/net/i40e/meson.build @@ -13,6 +13,10 @@ if arch_subdir == 'riscv' subdir_done() endif +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + cflags += ['-DPF_DRIVER', '-DVF_DRIVER', '-DINTEGRATED_VF', diff --git a/drivers/net/iavf/meson.build b/drivers/net/iavf/meson.build index 6df771f917..fc09ffa2ae 100644 --- a/drivers/net/iavf/meson.build +++ b/drivers/net/iavf/meson.build @@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif cflags += ['-Wno-strict-aliasing'] diff --git a/drivers/net/virtio/meson.build b/drivers/net/virtio/meson.build index 0ffd77024e..ef016c1566 100644 --- a/drivers/net/virtio/meson.build +++ b/drivers/net/virtio/meson.build @@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif + sources += files( 'virtio.c', 'virtio_cvq.c',