drivers: skip build of sub-libs not supporting IOVA mode
Subsystems (6)
PATCH 1/1 drivers: skip build of sub-libs not supporting IOVA mode
If IOVA as PA is disabled and the driver does not support IOVA as VA, 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.
--- drivers/common/idpf/meson.build | 4 ++++ drivers/event/dlb2/meson.build | 5 ++++- drivers/meson.build | 4 ++-- drivers/net/bnxt/meson.build | 4 ++++ drivers/net/enic/meson.build | 4 ++++ drivers/net/hns3/meson.build | 4 +--- drivers/net/i40e/meson.build | 4 ++++ drivers/net/iavf/meson.build | 3 +++ drivers/net/virtio/meson.build | 4 ++++ 9 files changed, 30 insertions(+), 6 deletions(-)
drivers/common/idpf/meson.build +4 -0
@@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 Intel Corporation +if not get_option('enable_iova_as_pa') + subdir_done() +endif + deps += ['mbuf'] sources = files(
drivers/event/dlb2/meson.build +4 -1
@@ -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 not get_option('enable_iova_as_pa') + subdir_done() +endif + sources = files( 'dlb2.c', 'dlb2_iface.c',
drivers/meson.build +2 -2
@@ -127,9 +127,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 not get_option('enable_iova_as_pa') and not pmd_supports_disable_iova_as_pa and not always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'IOVA as VA not supported' endif # get dependency objs from strings
drivers/net/bnxt/meson.build +4 -0
@@ -8,6 +8,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + headers = files('rte_pmd_bnxt.h') cflags_options = [ '-DSUPPORT_CFA_HW_ALL=1',
drivers/net/enic/meson.build +4 -0
@@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + sources = files( 'base/vnic_cq.c', 'base/vnic_dev.c',
drivers/net/hns3/meson.build +1 -3
@@ -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 not get_option('enable_iova_as_pa') subdir_done() endif
drivers/net/i40e/meson.build +4 -0
@@ -13,6 +13,10 @@ if arch_subdir == 'riscv' subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + cflags += ['-DPF_DRIVER', '-DVF_DRIVER', '-DINTEGRATED_VF',
drivers/net/iavf/meson.build +3 -0
@@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if not get_option('enable_iova_as_pa') + subdir_done() +endif cflags += ['-Wno-strict-aliasing']
drivers/net/virtio/meson.build +4 -0
@@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + sources += files( 'virtio.c', 'virtio_cvq.c',
Signature · 1 line
2.39.1
Quoted 92 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Sunday, February 19, 2023 7:55 PM
To: [email protected]
Cc: David Marchand <[email protected]>; Richardson, Bruce <[email protected]>; Zhang, Qi Z <[email protected]>; [email protected]; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; McDaniel, Timothy <[email protected]>; Ajit Khaparde <[email protected]>; Somnath Kotur <[email protected]>; Daley, John <[email protected]>; Hyong Youb Kim <[email protected]>; Dongdong Liu <[email protected]>; Yisen Zhuang <[email protected]>; Zhang, Yuying <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>; Shijith Thotton <[email protected]>; Matz, Olivier <[email protected]>
Subject: [PATCH] drivers: skip build of sub-libs not supporting IOVA modeIf IOVA as PA is disabled and the driver does not support IOVA as VA, 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")Signed-off-by Thomas Monjalon <[email protected]>--- drivers/common/idpf/meson.build | 4 ++++ drivers/event/dlb2/meson.build | 5 ++++- drivers/meson.build | 4 ++-- drivers/net/bnxt/meson.build | 4 ++++ drivers/net/enic/meson.build | 4 ++++ drivers/net/hns3/meson.build | 4 +--- drivers/net/i40e/meson.build | 4 ++++ drivers/net/iavf/meson.build | 3 +++ drivers/net/virtio/meson.build | 4 ++++ 9 files changed, 30 insertions(+), 6 deletions(-)(quoted diff) +0
-0b/drivers/common/idpf/meson.build index
58059ef443..74c0e92cac100644drivers/common/idpf/meson.build +0
-0@@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 IntelCorporation
drivers/common/idpf/meson.build +4
-0+if not get_option('enable_iova_as_pa') + subdir_done() +endif + deps += ['mbuf'] sources = files((quoted diff) +0
-0b/drivers/event/dlb2/meson.build index
a2e60273c5..8ae7db0011100644drivers/event/dlb2/meson.build +0
-1@@ -1,4 +1,3 @@ - # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2019-2020 IntelCorporation
drivers/event/dlb2/meson.build +4
-0@@ -8,6 +7,10 @@ if not is_linux or not dpdk_conf.has('RTE_ARCH_X86_64') subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + sources = files( 'dlb2.c', 'dlb2_iface.c',drivers/meson.build index renamed from drivers/meson.build +0
-0
0618c31a69..9c10e2633d100644drivers/meson.build +0
-1@@ -127,9 +127,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_paand notalways_enable.contains(drv_path)
drivers/meson.build foreach subpath:subdirs · line 133
Quoted 7 lines
drivers/meson.build +4
-1+ if not get_option('enable_iova_as_pa') and not + pmd_supports_disable_iova_as_pa and not + always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'IOVA as VA not supported' endif
If we check enable_iova_as_pa for each unsupported driver , do we still need "pmd_supports_disable_iova_as_pa"?
02/03/2023 14:52, Zhang, Qi Z:
Quoted 13 lines
From: Thomas Monjalon <[email protected]>
Quoted 12 lines
If IOVA as PA is disabled and the driver does not support IOVA as VA, 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")Signed-off-by Thomas Monjalon <[email protected]>
[...]
Quoted 6 lines
Quoted 6 lines
drivers/meson.build +0
-0@@ -127,9 +127,9 @@ foreach subpath:subdirs # pull in driver directory which should update all the local variables subdir(drv_path)
Quoted 12 lines
drivers/meson.build foreach subpath:subdirs · line 133
Quoted 10 lines
drivers/meson.build +0
-1- if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not
pmd_supports_disable_iova_as_paand notalways_enable.contains(drv_path)drivers/meson.build +4
-1+ if not get_option('enable_iova_as_pa') and not + pmd_supports_disable_iova_as_pa and not + always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'IOVA as VA not supported' endifIf we check
enable_iova_as_pafor each unsupported driver , do we still need "pmd_supports_disable_iova_as_pa"?
They are a bit redundant.
The idea is to use pmd_supports_disable_iova_as_pa (could be renamed) as it is simpler to use.
But in the case of drivers having sub-libs (always enabled), we need an extra check of enable_iova_as_pa inside the driver file.
Quoted 54 lines
-----Original Message-----
From: Thomas Monjalon <[email protected]>
Sent: Thursday, March 2, 2023 9:58 PM
To: Zhang, Qi Z <[email protected]>
Cc: [email protected]; David Marchand <[email protected]>; Richardson, Bruce <[email protected]>; [email protected]; Wu, Jingjing <[email protected]>; Xing, Beilei <[email protected]>; McDaniel, Timothy <[email protected]>; Ajit Khaparde <[email protected]>; Somnath Kotur <[email protected]>; Daley, John <[email protected]>; Hyong Youb Kim <[email protected]>; Dongdong Liu <[email protected]>; Yisen Zhuang <[email protected]>; Zhang, Yuying <[email protected]>; Maxime Coquelin <[email protected]>; Xia, Chenbo <[email protected]>; Shijith Thotton <[email protected]>; Matz, Olivier <[email protected]>
Subject: Re: [PATCH] drivers: skip build of sub-libs not supporting IOVA mode02/03/2023 14:52, Zhang, Qi Z:
Quoted 14 lines
From: Thomas Monjalon <[email protected]>
Quoted 13 lines
If IOVA as PA is disabled and the driver does not support IOVA as VA, 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 asPA")
Cc: [email protected]Signed-off-by Thomas Monjalon <[email protected]>[...]
Quoted 4 lines
drivers/meson.build foreach subpath:subdirs · line 127
Quoted 4 lines
drivers/meson.build +0
-0@@ -127,9 +127,9 @@ foreach subpath:subdirs # pull in driver directory which should update all the localvariables
Quoted 13 lines
Quoted 12 lines
drivers/meson.build +0
-1subdir(drv_path) - if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not
pmd_supports_disable_iova_as_paand notalways_enable.contains(drv_path)drivers/meson.build +4
-1+ if not get_option('enable_iova_as_pa') and not + pmd_supports_disable_iova_as_pa and not + always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'IOVA as VA not supported' endif
Quoted 4 lines
Quoted 1 line
If we check
enable_iova_as_pafor each unsupported driver , do we stillneed "
pmd_supports_disable_iova_as_pa"?They are a bit redundant.
That's why I prefer my previous solution for i40e and iavf,
because, someday we may claim pmd_supports_disable_iova_as_pa = true but still leave avx part not be fixed.
Quoted 9 lines
The idea is to use
pmd_supports_disable_iova_as_pa(could be renamed) as it is simpler to use.
But in the case of drivers having sub-libs (always enabled), we need an extra check ofenable_iova_as_painside the driver file.
02/03/2023 15:16, Zhang, Qi Z:
Quoted 35 lines
From: Thomas Monjalon <[email protected]>
Quoted 34 lines
02/03/2023 14:52, Zhang, Qi Z:
Quoted 14 lines
From: Thomas Monjalon <[email protected]>
Quoted 13 lines
If IOVA as PA is disabled and the driver does not support IOVA as VA, 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 asPA")
Cc: [email protected]Signed-off-by Thomas Monjalon <[email protected]>[...]
Quoted 4 lines
drivers/meson.build foreach subpath:subdirs · line 127
Quoted 4 lines
drivers/meson.build +0
-0@@ -127,9 +127,9 @@ foreach subpath:subdirs # pull in driver directory which should update all the localvariables
Quoted 13 lines
Quoted 12 lines
drivers/meson.build +0
-1subdir(drv_path) - if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 and not
pmd_supports_disable_iova_as_paand notalways_enable.contains(drv_path)drivers/meson.build +4
-1+ if not get_option('enable_iova_as_pa') and not + pmd_supports_disable_iova_as_pa and not + always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'IOVA as VA not supported' endif
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
If we check
enable_iova_as_pafor each unsupported driver , do we stillneed "
pmd_supports_disable_iova_as_pa"?They are a bit redundant.
That's why I prefer my previous solution for i40e and iavf,
because, someday we may claimpmd_supports_disable_iova_as_pa= true but still leave avx part not be fixed.
Both are in the same file, so I don't see how it could be missed, especially if those lines are placed together.
We have a variable used commonly with a standardized message, we must use it, at least to allow easy grep of this support.
Quoted 4 lines
Quoted 4 lines
The idea is to use
pmd_supports_disable_iova_as_pa(could be renamed) as it is simpler to use.
But in the case of drivers having sub-libs (always enabled), we need an extra check ofenable_iova_as_painside the driver file.
Quoted 8 lines
From: Thomas Monjalon [mailto:[email protected]]
Sent: Sunday, 19 February 2023 12.55If IOVA as PA is disabled and the driver does not support IOVA as VA, 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.
Quoted 8 lines
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")Signed-off-by Thomas Monjalon <[email protected]>---
Quoted 5 lines
If IOVA as PA is disabled and the driver does not support IOVA as VA, 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.
Quoted 8 lines
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")Signed-off-by Thomas Monjalon <[email protected]>---
v2 cover refactor diasbling IOVA as PA
In reply to Thomas MonjalonAs discussed recently in some email threads,
it looks simpler to reword the feature "enabling IOVA as PA" to "requiring IOVA in mbuf".
The Meson option name is not changed (compatibility is kept) but the variables are renamed.
The second patch (which can be applied alone)
is fixing the build when IOVA as PA is disabled.
v2: renames
Thomas Monjalon (2):
build: clarify configuration without IOVA field in mbuf
drivers: skip build of sub-libs not supporting IOVA mode
app/test/test_mbuf.c | 2 +- config/arm/meson.build | 4 ++-- config/meson.build | 2 +- doc/guides/rel_notes/release_22_11.rst | 2 +- drivers/common/cnxk/meson.build | 2 +- drivers/common/iavf/meson.build | 2 +- drivers/common/idpf/meson.build | 4 ++++ 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/dlb2/meson.build | 5 ++++- 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/net/af_packet/meson.build | 2 +- drivers/net/af_xdp/meson.build | 2 +- drivers/net/bnxt/meson.build | 4 ++++ drivers/net/bonding/meson.build | 2 +- drivers/net/cnxk/meson.build | 2 +- drivers/net/enic/meson.build | 4 ++++ drivers/net/failsafe/meson.build | 2 +- drivers/net/hns3/meson.build | 4 +--- drivers/net/i40e/meson.build | 4 ++++ drivers/net/iavf/meson.build | 3 +++ drivers/net/ice/ice_rxtx_common_avx.h | 12 ++++++------ drivers/net/ice/ice_rxtx_vec_sse.c | 4 ++-- drivers/net/ice/meson.build | 2 +- drivers/net/memif/meson.build | 2 +- drivers/net/null/meson.build | 2 +- drivers/net/pcap/meson.build | 2 +- drivers/net/ring/meson.build | 2 +- drivers/net/tap/meson.build | 2 +- drivers/net/virtio/meson.build | 4 ++++ 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 +- 54 files changed, 87 insertions(+), 63 deletions(-)
Signature · 1 line
2.39.1
PATCH v2 1/2 build: clarify configuration without IOVA field in mbuf
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.
If the option "enable_iova_as_pa" is disabled, the unsupported drivers will be listed with the new reason text "requires IOVA in mbuf".
--- app/test/test_mbuf.c | 2 +- config/arm/meson.build | 4 ++-- config/meson.build | 2 +- doc/guides/rel_notes/release_22_11.rst | 2 +- drivers/common/cnxk/meson.build | 2 +- drivers/common/iavf/meson.build | 2 +- 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/net/af_packet/meson.build | 2 +- drivers/net/af_xdp/meson.build | 2 +- drivers/net/bonding/meson.build | 2 +- drivers/net/cnxk/meson.build | 2 +- drivers/net/failsafe/meson.build | 2 +- 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 | 2 +- drivers/net/memif/meson.build | 2 +- drivers/net/null/meson.build | 2 +- drivers/net/pcap/meson.build | 2 +- drivers/net/ring/meson.build | 2 +- drivers/net/tap/meson.build | 2 +- 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 +- 47 files changed, 60 insertions(+), 62 deletions(-)
app/test/test_mbuf.c +1 -1
@@ -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)) {
config/arm/meson.build +2 -2
@@ -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] ] }
config/meson.build +1 -1
@@ -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)
doc/guides/rel_notes/release_22_11.rst +1 -1
@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0. * ethdev: enum ``RTE_FLOW_ITEM`` was affected by deprecation procedure.
drivers/common/cnxk/meson.build +1 -1
@@ -87,4 +87,4 @@ sources += files('cnxk_telemetry_bphy.c', ) deps += ['bus_pci', 'net', 'telemetry'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/common/iavf/meson.build +1 -1
@@ -6,4 +6,4 @@ 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
drivers/crypto/armv8/meson.build +1 -1
@@ -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
drivers/crypto/cnxk/meson.build +1 -1
@@ -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
drivers/crypto/ipsec_mb/meson.build +1 -1
@@ -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
drivers/crypto/null/meson.build +1 -1
@@ -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
drivers/crypto/openssl/meson.build +1 -1
@@ -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
drivers/dma/cnxk/meson.build +1 -1
@@ -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
drivers/dma/skeleton/meson.build +1 -1
@@ -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
drivers/event/cnxk/meson.build +1 -1
@@ -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
drivers/event/dsw/meson.build +1 -1
@@ -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
drivers/event/opdl/meson.build +1 -1
@@ -9,4 +9,4 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/event/skeleton/meson.build +1 -1
@@ -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
drivers/event/sw/meson.build +1 -1
@@ -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
drivers/mempool/bucket/meson.build +1 -1
@@ -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
drivers/mempool/cnxk/meson.build +1 -1
@@ -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
drivers/mempool/ring/meson.build +1 -1
@@ -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
drivers/mempool/stack/meson.build +1 -1
@@ -4,4 +4,4 @@ sources = files('rte_mempool_stack.c') deps += ['stack'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/meson.build +3 -3
@@ -109,7 +109,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
@@ -127,9 +127,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 not get_option('enable_iova_as_pa') and require_iova_in_mbuf and not always_enable.contains(drv_path) build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'requires IOVA in mbuf' endif # get dependency objs from strings
drivers/net/af_packet/meson.build +1 -1
@@ -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
drivers/net/af_xdp/meson.build +1 -1
@@ -71,4 +71,4 @@ if build endif endif -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/bonding/meson.build +1 -1
@@ -22,4 +22,4 @@ 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
drivers/net/cnxk/meson.build +1 -1
@@ -195,4 +195,4 @@ foreach flag: extra_flags endforeach headers = files('rte_pmd_cnxk.h') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/failsafe/meson.build +1 -1
@@ -27,4 +27,4 @@ sources = files( 'failsafe_ops.c', 'failsafe_rxtx.c', ) -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/hns3/meson.build +1 -3
@@ -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 not get_option('enable_iova_as_pa') subdir_done() endif
drivers/net/ice/ice_rxtx_common_avx.h +6 -6
@@ -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);
drivers/net/ice/ice_rxtx_vec_sse.c +2 -2
@@ -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);
drivers/net/ice/meson.build +1 -1
@@ -78,4 +78,4 @@ sources += files( 'ice_dcf_parent.c', 'ice_dcf_sched.c', ) -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/memif/meson.build +1 -1
@@ -12,4 +12,4 @@ sources = files( ) deps += ['hash'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/null/meson.build +1 -1
@@ -8,4 +8,4 @@ if is_windows endif sources = files('rte_eth_null.c') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/pcap/meson.build +1 -1
@@ -15,4 +15,4 @@ 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
drivers/net/ring/meson.build +1 -1
@@ -9,4 +9,4 @@ endif sources = files('rte_eth_ring.c') headers = files('rte_eth_ring.h') -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/tap/meson.build +1 -1
@@ -35,4 +35,4 @@ 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
drivers/raw/cnxk_bphy/meson.build +1 -1
@@ -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
drivers/raw/cnxk_gpio/meson.build +1 -1
@@ -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
drivers/raw/skeleton/meson.build +1 -1
@@ -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
lib/eal/linux/eal.c +1 -1
@@ -1134,7 +1134,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 ;
lib/mbuf/rte_mbuf.c +1 -1
@@ -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 ; }
lib/mbuf/rte_mbuf.h +2 -2
@@ -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);
lib/mbuf/rte_mbuf_core.h +4 -4
@@ -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
lib/mbuf/rte_mbuf_dyn.c +1 -1
@@ -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
lib/meson.build +1 -1
@@ -93,7 +93,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 not get_option('enable_iova_as_pa') opt_disabled_libs += ['kni'] endif foreach l:opt_disabled_libs
meson_options.txt +1 -1
@@ -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:
Signature · 1 line
2.39.1
RE: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
Quoted 15 lines
From: Thomas Monjalon [mailto:[email protected]]
Sent: Monday, 6 March 2023 17.13The 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.
Quoted 6 lines
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 <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>---
Good clean-up.
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
In reply to Thomas MonjalonQuoted 11 lines · Thomas Monjalon
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.
Quoted 6 lines
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 <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>---
Couple of comments inline below.
Quoted 1 line
app/test/test_mbuf.c | 2 +-
<snip>
drivers/meson.build foreach subpath:subdirs · line 130
Quoted 6 lines
drivers/meson.build +1
-1@@ -127,9 +127,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 not get_option('enable_iova_as_pa') and require_iova_in_mbuf and not always_enable.contains(drv_path)
I don't particularly like the always_enable check at the end. If a driver is set to always-enable and it doesn't support the configured mode, we should throw an error immediately IMHO, rather than silently continuing to build the driver.
drivers/meson.build foreach subpath:subdirs · line 133
Quoted 4 lines
drivers/meson.build +1
-1build = false - reason = 'driver does not support disabling IOVA as PA mode' + reason = 'requires IOVA in mbuf' endif
I think the reason given is more accurate, but for those users not familiar with the internals of DPDK builds it could be confusing. I think the message needs to reference the 'enable_iova_as_pa' option. How about?
reason = 'requires IOVA in mbuf (set enable_iova_as_pa option)'
/Bruce
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
06/03/2023 17:39, Bruce Richardson:
Quoted 8 lines · Thomas Monjalon
drivers/meson.build foreach subpath:subdirs · line 130
Quoted 2 lines
drivers/meson.build +1
-1- 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 not get_option('enable_iova_as_pa') and require_iova_in_mbuf and not always_enable.contains(drv_path)I don't particularly like the
always_enablecheck at the end. If a driver is set to always-enable and it doesn't support the configured mode, we should throw an error immediately IMHO, rather than silently continuing to build the driver.
We can think about the "forced enabling" as a developer test. But the developer could change the meson file to enable it. So I'm OK to replace it with an error.
Quoted 10 lines
drivers/meson.build foreach subpath:subdirs · line 133
Quoted 4 lines
build = false
drivers/meson.build +1
-1- reason = 'driver does not support disabling IOVA as PA mode' + reason = 'requires IOVA in mbuf' endifI think the reason given is more accurate, but for those users not familiar with the internals of DPDK builds it could be confusing. I think the message needs to reference the '
enable_iova_as_pa' option. How about?reason = 'requires IOVA in mbuf (set
enable_iova_as_paoption)'
OK good
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
In reply to Thomas MonjalonQuoted 17 lines · Thomas Monjalon
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.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 <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>---
...
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 12 lines
compile_time_cpuflags= []
subdir(arch_subdir)doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.
Should add to release 23.03 rst.
The original 22.11 still have RTE_IOVA_AS_PA definition.
...
Quoted 5 lines
drivers/net/hns3/meson.build +0
-0
drivers/net/hns3/meson.build if arch_subdir != 'x86' and arch_subdir != 'arm' or not dpdk_conf.get('RTE_ARCH_ · line 18
Quoted 9 lines
drivers/net/hns3/meson.build +1
-3@@ -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 not get_option('enable_iova_as_pa') subdir_done() endif
Suggest keep original, and replace RTE_IOVA_AS_PA with RTE_IOVA_IN_MBUF:
if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0
subdir_done()
endif
Meson build 0.63.0 already support deprecated a option by a new option. When update to the new meson verion, the drivers' meson.build will not be modified.
Quoted 3 lines
drivers/net/ice/ice_rxtx_common_avx.h +0
-0
...
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
09/03/2023 02:43, fengchengwen:
Quoted 11 lines · Thomas Monjalon
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.Should add to release 23.03 rst.
Yes we could add a note in API changes.
Quoted 1 line
The original 22.11 still have
RTE_IOVA_AS_PAdefinition.
Yes it was not a good idea to rename in the release notes.
Quoted 11 lines
doc/guides/rel_notes/release_22_11.rst ABI Changes
Quoted 6 lines
doc/guides/rel_notes/release_22_11.rst +1
-3-if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if not get_option('enable_iova_as_pa') subdir_done() endifSuggest keep original, and replace
RTE_IOVA_AS_PAwithRTE_IOVA_IN_MBUF:
ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0
subdir_done()
endif
Why testing the C macro in Meson?
It looks simpler to check the Meson option in Meson.
Quoted 2 lines
Meson build 0.63.0 already support deprecated a option by a new option. When update to the new meson verion, the drivers' meson.build will not be modified.
I don't understand this comment.
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
Quoted 31 lines · Thomas Monjalon
09/03/2023 02:43, fengchengwen:
Quoted 11 lines · Thomas Monjalon
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.Should add to release 23.03 rst.
Yes we could add a note in API changes.
Quoted 1 line
The original 22.11 still have
RTE_IOVA_AS_PAdefinition.Yes it was not a good idea to rename in the release notes.
Quoted 11 lines
doc/guides/rel_notes/release_22_11.rst ABI Changes
Quoted 6 lines
doc/guides/rel_notes/release_22_11.rst +1
-3-if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if not get_option('enable_iova_as_pa') subdir_done() endifSuggest keep original, and replace
RTE_IOVA_AS_PAwithRTE_IOVA_IN_MBUF:
ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0
subdir_done()
endif
Quoted 2 lines
Why testing the C macro in Meson?
It looks simpler to check the Meson option in Meson.
The macro was create in meson.build: config/meson.build:319:dpdk_conf.set10('RTE_IOVA_AS_PA', get_option('enable_iova_as_pa')) It can be regarded as alias of enable_iova_as_pa.
This commit was mainly used to improve comprehensibility. so we should limit the 'enable_iova_as_pa' usage scope. and the 'if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0' is more comprehensibility than 'if not get_option('enable_iova_as_pa')'
Quoted 5 lines
Quoted 3 lines
Meson build 0.63.0 already support deprecated a option by a new option. When update to the new meson verion, the drivers' meson.build will not be modified.
I don't understand this comment.
I mean: the option "enable_iova_as_pa" need deprecated future.
Based on this, I think we should limit 'enable_iova_as_pa' usage scope, this allows us to reduce the amount of change effort when it's about to deprecated.
Quoted 4 lines
.
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
09/03/2023 12:23, fengchengwen:
Quoted 32 lines · Thomas Monjalon
Quoted 31 lines
09/03/2023 02:43, fengchengwen:
Quoted 11 lines · Thomas Monjalon
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.Should add to release 23.03 rst.
Yes we could add a note in API changes.
Quoted 1 line
The original 22.11 still have
RTE_IOVA_AS_PAdefinition.Yes it was not a good idea to rename in the release notes.
Quoted 11 lines
doc/guides/rel_notes/release_22_11.rst ABI Changes
Quoted 6 lines
doc/guides/rel_notes/release_22_11.rst +1
-3-if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if not get_option('enable_iova_as_pa') subdir_done() endifSuggest keep original, and replace
RTE_IOVA_AS_PAwithRTE_IOVA_IN_MBUF:
ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0
subdir_done()
endif
Quoted 5 lines
Quoted 2 lines
Why testing the C macro in Meson?
It looks simpler to check the Meson option in Meson.The macro was create in meson.build: config/meson.build:319:dpdk_conf.set10('RTE_IOVA_AS_PA',
get_option('enable_iova_as_pa')) It can be regarded as alias ofenable_iova_as_pa.
It is not strictly an alias, because it can be overriden via CFLAGS.
Quoted 2 lines
This commit was mainly used to improve comprehensibility. so we should limit the '
enable_iova_as_pa' usage scope. and the 'ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0' is more comprehensibility than 'if notget_option('enable_iova_as_pa')'
To me, using Meson option in Meson files is more obvious.
Bruce, what do you think?
Quoted 6 lines
Quoted 4 lines
Quoted 2 lines
Meson build 0.63.0 already support deprecated a option by a new option. When update to the new meson verion, the drivers' meson.build will not be modified.
I don't understand this comment.
I mean: the option "
enable_iova_as_pa" need deprecated future.
Why deprecating this option?
Quoted 2 lines
Based on this, I think we should limit '
enable_iova_as_pa' usage scope, this allows us to reduce the amount of change effort when it's about to deprecated.
I don't plan to deprecate this option.
And in general, we should avoid deprecating a compilation option.
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
Quoted 39 lines · Thomas Monjalon
09/03/2023 12:23, fengchengwen:
Quoted 32 lines · Thomas Monjalon
Quoted 31 lines
09/03/2023 02:43, fengchengwen:
Quoted 11 lines · Thomas Monjalon
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.Should add to release 23.03 rst.
Yes we could add a note in API changes.
Quoted 1 line
The original 22.11 still have
RTE_IOVA_AS_PAdefinition.Yes it was not a good idea to rename in the release notes.
Quoted 11 lines
doc/guides/rel_notes/release_22_11.rst ABI Changes
Quoted 6 lines
doc/guides/rel_notes/release_22_11.rst +1
-3-if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if not get_option('enable_iova_as_pa') subdir_done() endifSuggest keep original, and replace
RTE_IOVA_AS_PAwithRTE_IOVA_IN_MBUF:
ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0
subdir_done()
endifQuoted 5 lines
Quoted 2 lines
Why testing the C macro in Meson?
It looks simpler to check the Meson option in Meson.The macro was create in meson.build: config/meson.build:319:dpdk_conf.set10('RTE_IOVA_AS_PA',
get_option('enable_iova_as_pa')) It can be regarded as alias ofenable_iova_as_pa.
Quoted 9 lines
It is not strictly an alias, because it can be overriden via CFLAGS.
Quoted 2 lines
This commit was mainly used to improve comprehensibility. so we should limit the '
enable_iova_as_pa' usage scope. and the 'ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0' is more comprehensibility than 'if notget_option('enable_iova_as_pa')'To me, using Meson option in Meson files is more obvious.
Bruce, what do you think?
I'm not sure it matters much! However, I think of the two, using the reference to IOVA_IN_MBUF is clearer. It also allows the same terminology to be used in meson and C files. If we don't want to do a dpdk_conf lookup, we can always assign the option to a meson variable called iova_in_mbuf.
/Bruce
Re: [PATCH v2 1/2] build: clarify configuration without IOVA field in mbuf
09/03/2023 14:10, Bruce Richardson:
Quoted 47 lines · Thomas Monjalon
Quoted 46 lines
09/03/2023 12:23, fengchengwen:
Quoted 32 lines · Thomas Monjalon
Quoted 31 lines
09/03/2023 02:43, fengchengwen:
Quoted 11 lines · Thomas Monjalon
doc/guides/rel_notes/release_22_11.rst ABI Changes · line 507
Quoted 8 lines
doc/guides/rel_notes/release_22_11.rst +1
-1@@ -504,7 +504,7 @@ ABI Changes ``rte-worker-<lcore_id>`` so that DPDK can accommodate lcores higher than 99. * mbuf: Replaced ``buf_iova`` field with ``next`` field and added a new field - ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_AS_PA`` is 0. + ``dynfield2`` at its place in second cacheline if ``RTE_IOVA_IN_MBUF`` is 0.Should add to release 23.03 rst.
Yes we could add a note in API changes.
Quoted 1 line
The original 22.11 still have
RTE_IOVA_AS_PAdefinition.Yes it was not a good idea to rename in the release notes.
Quoted 11 lines
doc/guides/rel_notes/release_22_11.rst ABI Changes
Quoted 6 lines
doc/guides/rel_notes/release_22_11.rst +1
-3-if dpdk_conf.get('RTE_IOVA_AS_PA') == 0 - build = false - reason = 'driver does not support disabling IOVA as PA mode' +if not get_option('enable_iova_as_pa') subdir_done() endifSuggest keep original, and replace
RTE_IOVA_AS_PAwithRTE_IOVA_IN_MBUF:
ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0
subdir_done()
endifQuoted 5 lines
Quoted 2 lines
Why testing the C macro in Meson?
It looks simpler to check the Meson option in Meson.The macro was create in meson.build: config/meson.build:319:dpdk_conf.set10('RTE_IOVA_AS_PA',
get_option('enable_iova_as_pa')) It can be regarded as alias ofenable_iova_as_pa.It is not strictly an alias, because it can be overriden via CFLAGS.
Quoted 2 lines
This commit was mainly used to improve comprehensibility. so we should limit the '
enable_iova_as_pa' usage scope. and the 'ifdpdk_conf.get('RTE_IOVA_IN_MBUF')== 0' is more comprehensibility than 'if notget_option('enable_iova_as_pa')'To me, using Meson option in Meson files is more obvious.
Quoted 7 lines
Quoted 2 lines
Bruce, what do you think?
I'm not sure it matters much! However, I think of the two, using the reference to
IOVA_IN_MBUFis clearer. It also allows the same terminology to be used in meson and C files. If we don't want to do adpdk_conflookup, we can always assign the option to a meson variable callediova_in_mbuf.
OK I'll query the C macro in the Meson files.
PATCH v2 2/2 drivers: skip build of sub-libs not supporting IOVA mode
In reply to Thomas MonjalonIf 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.
--- 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(-)
drivers/common/idpf/meson.build +4 -0
@@ -1,6 +1,10 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2022 Intel Corporation +if not get_option('enable_iova_as_pa') + subdir_done() +endif + deps += ['mbuf'] sources = files(
drivers/event/dlb2/meson.build +4 -1
@@ -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 not get_option('enable_iova_as_pa') + subdir_done() +endif + sources = files( 'dlb2.c', 'dlb2_iface.c',
drivers/net/bnxt/meson.build +4 -0
@@ -8,6 +8,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + headers = files('rte_pmd_bnxt.h') cflags_options = [ '-DSUPPORT_CFA_HW_ALL=1',
drivers/net/enic/meson.build +4 -0
@@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + sources = files( 'base/vnic_cq.c', 'base/vnic_dev.c',
drivers/net/i40e/meson.build +4 -0
@@ -13,6 +13,10 @@ if arch_subdir == 'riscv' subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + cflags += ['-DPF_DRIVER', '-DVF_DRIVER', '-DINTEGRATED_VF',
drivers/net/iavf/meson.build +3 -0
@@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if not get_option('enable_iova_as_pa') + subdir_done() +endif cflags += ['-Wno-strict-aliasing']
drivers/net/virtio/meson.build +4 -0
@@ -7,6 +7,10 @@ if is_windows subdir_done() endif +if not get_option('enable_iova_as_pa') + subdir_done() +endif + sources += files( 'virtio.c', 'virtio_cvq.c',
Signature · 1 line
2.39.1
v3 cover refactor disabling IOVA as PA
In reply to Thomas MonjalonAs discussed recently in some email threads,
it looks simpler to reword the feature "enabling IOVA as PA" to "requiring IOVA in mbuf".
The Meson option name is not changed (compatibility is kept) but the variables are renamed.
Some patches to allow building of some drivers are integrated.
The last patch is fixing the build when IOVA as PA is disabled.
v3: use C macro, rebase, fixes
v2: renames
Chengwen Feng (2):
net/hns3: support IOVA forced as VA
dma/hisilicon: support IOVA forced as VA
Mahipal Challa (1):
compress/octeontx: support IOVA forced as VA
Thomas Monjalon (2):
build: clarify configuration without IOVA field in mbuf
drivers: skip build of sub-libs not supporting IOVA mode
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/common/idpf/meson.build | 4 ++++ drivers/common/octeontx/meson.build | 2 ++ drivers/compress/octeontx/meson.build | 2 ++ 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/hisilicon/meson.build | 2 ++ drivers/dma/skeleton/meson.build | 2 +- drivers/event/cnxk/meson.build | 2 +- drivers/event/dlb2/meson.build | 5 ++++- 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/octeontx/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/bnxt/meson.build | 4 ++++ drivers/net/bonding/meson.build | 3 ++- drivers/net/cnxk/meson.build | 3 ++- drivers/net/cpfl/meson.build | 4 +--- drivers/net/enic/meson.build | 4 ++++ drivers/net/failsafe/meson.build | 3 ++- drivers/net/hns3/hns3_rxtx_vec_neon.h | 2 +- drivers/net/hns3/hns3_rxtx_vec_sve.c | 13 +++++++++---- drivers/net/hns3/meson.build | 8 ++------ drivers/net/i40e/meson.build | 4 ++++ drivers/net/iavf/meson.build | 3 +++ 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/net/virtio/meson.build | 4 ++++ 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 +- 66 files changed, 127 insertions(+), 76 deletions(-)
Signature · 1 line
2.39.1
PATCH v3 1/5 build: clarify configuration without IOVA field in mbuf
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".
--- 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(-)
app/test/test_mbuf.c +1 -1
@@ -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)) {
config/arm/meson.build +2 -2
@@ -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] ] }
config/meson.build +1 -1
@@ -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)
drivers/bus/auxiliary/meson.build +3 -0
@@ -11,4 +11,7 @@ if is_linux 'linux/auxiliary.c', ) endif + +require_iova_in_mbuf = false + deps += ['kvargs']
drivers/bus/pci/meson.build +2 -0
@@ -30,4 +30,6 @@ if is_windows includes += include_directories('windows') endif +require_iova_in_mbuf = false + deps += ['kvargs']
drivers/bus/platform/meson.build +2 -0
@@ -8,6 +8,8 @@ if not is_linux subdir_done() endif +require_iova_in_mbuf = false + deps += ['kvargs'] sources = files( 'platform_params.c',
drivers/bus/vdev/meson.build +2 -0
@@ -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']
drivers/bus/vmbus/meson.build +2 -1
@@ -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
drivers/common/cnxk/meson.build +1 -1
@@ -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
drivers/common/iavf/meson.build +2 -1
@@ -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
drivers/crypto/armv8/meson.build +1 -1
@@ -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
drivers/crypto/cnxk/meson.build +1 -1
@@ -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
drivers/crypto/ipsec_mb/meson.build +1 -1
@@ -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
drivers/crypto/null/meson.build +1 -1
@@ -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
drivers/crypto/openssl/meson.build +1 -1
@@ -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
drivers/dma/cnxk/meson.build +1 -1
@@ -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
drivers/dma/skeleton/meson.build +1 -1
@@ -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
drivers/event/cnxk/meson.build +1 -1
@@ -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
drivers/event/dsw/meson.build +1 -1
@@ -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
drivers/event/opdl/meson.build +1 -1
@@ -9,4 +9,4 @@ sources = files( 'opdl_test.c', ) deps += ['bus_vdev'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/event/skeleton/meson.build +1 -1
@@ -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
drivers/event/sw/meson.build +1 -1
@@ -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
drivers/mempool/bucket/meson.build +1 -1
@@ -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
drivers/mempool/cnxk/meson.build +1 -1
@@ -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
drivers/mempool/ring/meson.build +1 -1
@@ -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
drivers/mempool/stack/meson.build +1 -1
@@ -4,4 +4,4 @@ sources = files('rte_mempool_stack.c') deps += ['stack'] -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/meson.build +3 -3
@@ -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
drivers/ml/cnxk/meson.build +2 -2
@@ -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
drivers/net/af_packet/meson.build +1 -1
@@ -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
drivers/net/af_xdp/meson.build +1 -1
@@ -71,4 +71,4 @@ if build endif endif -pmd_supports_disable_iova_as_pa = true +require_iova_in_mbuf = false
drivers/net/bonding/meson.build +2 -1
@@ -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
drivers/net/cnxk/meson.build +2 -1
@@ -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
drivers/net/cpfl/meson.build +1 -3
@@ -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
drivers/net/failsafe/meson.build +2 -1
@@ -27,4 +27,5 @@ sources = files( 'failsafe_ops.c', 'failsafe_rxtx.c', ) -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false
drivers/net/hns3/meson.build +1 -3
@@ -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
drivers/net/ice/ice_rxtx_common_avx.h +6 -6
@@ -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);
drivers/net/ice/ice_rxtx_vec_sse.c +2 -2
@@ -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);
drivers/net/ice/meson.build +2 -1
@@ -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
drivers/net/memif/meson.build +2 -1
@@ -12,4 +12,5 @@ sources = files( ) deps += ['hash'] -pmd_supports_disable_iova_as_pa = true + +require_iova_in_mbuf = false
drivers/net/null/meson.build +1 -1
@@ -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
drivers/net/pcap/meson.build +2 -1
@@ -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
drivers/net/ring/meson.build +1 -1
@@ -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
drivers/net/tap/meson.build +2 -1
@@ -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
drivers/raw/cnxk_bphy/meson.build +1 -1
@@ -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
drivers/raw/cnxk_gpio/meson.build +1 -1
@@ -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
drivers/raw/skeleton/meson.build +1 -1
@@ -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
lib/eal/linux/eal.c +1 -1
@@ -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 ;
lib/mbuf/rte_mbuf.c +1 -1
@@ -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 ; }
lib/mbuf/rte_mbuf.h +2 -2
@@ -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);
lib/mbuf/rte_mbuf_core.h +4 -4
@@ -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
lib/mbuf/rte_mbuf_dyn.c +1 -1
@@ -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
lib/meson.build +1 -1
@@ -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
meson_options.txt +1 -1
@@ -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:
Signature · 1 line
2.39.1
Re: [PATCH v3 1/5] build: clarify configuration without IOVA field in mbuf
Quoted 20 lines · Thomas Monjalon
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 <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Reviewed-by Bruce Richardson <[email protected]>Acked-by Morten Brørup <[email protected]>---
...
Thomas Monjalon
AppliedRe: [PATCH v3 1/5] build: clarify configuration without IOVA field in mbuf
15/03/2023 02:56, fengchengwen:
Quoted 16 lines · Thomas Monjalon
Quoted 15 lines
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".
Quoted 6 lines
Quoted 4 lines
Suggested-by Bruce Richardson <[email protected]>Signed-off-by Thomas Monjalon <[email protected]>Reviewed-by Bruce Richardson <[email protected]>Acked-by Morten Brørup <[email protected]>Acked-by Chengwen Feng <[email protected]>
Applied
PATCH v3 2/5 net/hns3: support IOVA forced as VA
In reply to Thomas MonjalonFrom: Chengwen Feng <[email protected]>
Claim PMD does not require IOVA mbuf field, so it can build when disabling enable_iova_as_pa.
--- 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(-)
drivers/net/hns3/hns3_rxtx_vec_neon.h +1 -1
@@ -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 = {
drivers/net/hns3/hns3_rxtx_vec_sve.c +9 -4
@@ -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));
drivers/net/hns3/meson.build +2 -4
@@ -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')
Signature · 1 line
2.39.1
PATCH v3 3/5 dma/hisilicon: support IOVA forced as VA
In reply to Thomas MonjalonFrom: Chengwen Feng <[email protected]>
Claim PMD does not require IOVA mbuf field,
so it can build when disabling enable_iova_as_pa.
--- drivers/dma/hisilicon/meson.build | 2 ++ 1 file changed, 2 insertions(+)
drivers/dma/hisilicon/meson.build +2 -0
@@ -17,3 +17,5 @@ deps += ['bus_pci', 'dmadev'] sources = files( 'hisi_dmadev.c', ) + +require_iova_in_mbuf = false
Signature · 1 line
2.39.1
PATCH v3 4/5 compress/octeontx: support IOVA forced as VA
In reply to Thomas MonjalonFrom: Mahipal Challa <[email protected]>
Claim octeontx compress, common and mempool drivers do not require IOVA mbuf field,
so they can build when disabling enable_iova_as_pa.
--- drivers/common/octeontx/meson.build | 2 ++ drivers/compress/octeontx/meson.build | 2 ++ drivers/mempool/octeontx/meson.build | 2 ++ 3 files changed, 6 insertions(+)
drivers/common/octeontx/meson.build +2 -0
@@ -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
drivers/compress/octeontx/meson.build +2 -0
@@ -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
drivers/mempool/octeontx/meson.build +2 -0
@@ -13,3 +13,5 @@ sources = files( ) deps += ['mbuf', 'bus_pci', 'common_octeontx'] + +require_iova_in_mbuf = false
Signature · 1 line
2.39.1
PATCH v3 5/5 drivers: skip build of sub-libs not supporting IOVA mode
In reply to Thomas MonjalonIf 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.
--- 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(-)
drivers/common/idpf/meson.build +4 -0
@@ -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(
drivers/event/dlb2/meson.build +4 -1
@@ -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',
drivers/net/bnxt/meson.build +4 -0
@@ -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',
drivers/net/enic/meson.build +4 -0
@@ -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',
drivers/net/i40e/meson.build +4 -0
@@ -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',
drivers/net/iavf/meson.build +3 -0
@@ -1,6 +1,9 @@ # SPDX-License-Identifier: BSD-3-Clause # Copyright(c) 2018 Luca Boccassi <[email protected]> +if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 0 + subdir_done() +endif cflags += ['-Wno-strict-aliasing']
drivers/net/virtio/meson.build +4 -0
@@ -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',
Signature · 1 line
2.39.1