[v3] common/cnxk: allow enabling IOVA field in mbuf
Checks
Commit Message
The value of RTE_IOVA_IN_MBUF has always been disabled on CNXK
platforms, as IOVA in the mbuf is unnecessary. This update changes that
behavior to respect the value set by the user. A warning message will be
printed if the build is configured to enable IOVA on the CNXK platform.
Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
v3:
- Updated documentation.
v2:
- Don't override the default value of RTE_IOVA_IN_MBUF in CNXK platform.
- Print a warning message if IOVA in mbuf is enabled on CNXK platform.
config/arm/meson.build | 8 ++------
doc/guides/platform/cnxk.rst | 13 +++++++------
drivers/common/cnxk/meson.build | 7 +++++++
3 files changed, 16 insertions(+), 12 deletions(-)
Comments
On Fri, Oct 25, 2024 at 05:21:22PM +0530, Shijith Thotton wrote:
> The value of RTE_IOVA_IN_MBUF has always been disabled on CNXK
> platforms, as IOVA in the mbuf is unnecessary. This update changes that
> behavior to respect the value set by the user. A warning message will be
> printed if the build is configured to enable IOVA on the CNXK platform.
>
> Signed-off-by: Shijith Thotton <sthotton@marvell.com>
> ---
> v3:
> - Updated documentation.
>
> v2:
> - Don't override the default value of RTE_IOVA_IN_MBUF in CNXK platform.
> - Print a warning message if IOVA in mbuf is enabled on CNXK platform.
>
> config/arm/meson.build | 8 ++------
> doc/guides/platform/cnxk.rst | 13 +++++++------
> drivers/common/cnxk/meson.build | 7 +++++++
> 3 files changed, 16 insertions(+), 12 deletions(-)
>
> diff --git a/config/arm/meson.build b/config/arm/meson.build
> index 55be7c8711..20f7f6508c 100644
> --- a/config/arm/meson.build
> +++ b/config/arm/meson.build
> @@ -459,10 +459,7 @@ soc_cn9k = {
> 'description': 'Marvell OCTEON 9',
> 'implementer': '0x43',
> 'part_number': '0xb2',
> - 'numa': false,
> - 'flags': [
> - ['RTE_IOVA_IN_MBUF', 0]
> - ]
> + 'numa': false
> }
>
> soc_cn10k = {
> @@ -471,8 +468,7 @@ soc_cn10k = {
> 'flags': [
> ['RTE_MAX_LCORE', 24],
> ['RTE_MAX_NUMA_NODES', 1],
> - ['RTE_MEMPOOL_ALIGN', 128],
> - ['RTE_IOVA_IN_MBUF', 0]
> + ['RTE_MEMPOOL_ALIGN', 128]
FYI, meson is ok with trailing commas [1], so you don't need to modify this
line at all, just leave the comma at the end.
/Bruce
[1] https://mesonbuild.com/Style-guide.html#trailing-commas
@@ -459,10 +459,7 @@ soc_cn9k = {
'description': 'Marvell OCTEON 9',
'implementer': '0x43',
'part_number': '0xb2',
- 'numa': false,
- 'flags': [
- ['RTE_IOVA_IN_MBUF', 0]
- ]
+ 'numa': false
}
soc_cn10k = {
@@ -471,8 +468,7 @@ soc_cn10k = {
'flags': [
['RTE_MAX_LCORE', 24],
['RTE_MAX_NUMA_NODES', 1],
- ['RTE_MEMPOOL_ALIGN', 128],
- ['RTE_IOVA_IN_MBUF', 0]
+ ['RTE_MEMPOOL_ALIGN', 128]
],
'part_number': '0xd49',
'extra_march_features': ['crypto'],
@@ -587,8 +587,9 @@ Compile DPDK
DPDK may be compiled either natively on OCTEON CN9K/CN10K platform or cross-compiled on
an x86 based platform.
-Meson build option ``enable_iova_as_pa`` is disabled on CNXK platforms.
-So only PMDs supporting this option are enabled on CNXK platform builds.
+The Meson build option ``enable_iova_as_pa`` should be set to false because, on
+CNXK platforms, IOVA is same as the virtual address. Disabling the iova field
+in the mbuf frees it up to be used as a dynamic field.
Native Compilation
~~~~~~~~~~~~~~~~~~
@@ -599,14 +600,14 @@ CN9K:
.. code-block:: console
- meson setup -Dplatform=cn9k build
+ meson setup -Dplatform=cn9k -Denable_iova_as_pa=false build
ninja -C build
CN10K:
.. code-block:: console
- meson setup -Dplatform=cn10k build
+ meson setup -Dplatform=cn10k -Denable_iova_as_pa=false build
ninja -C build
Cross Compilation
@@ -618,14 +619,14 @@ CN9K:
.. code-block:: console
- meson setup build --cross-file config/arm/arm64_cn9k_linux_gcc
+ meson setup -Denable_iova_as_pa=false build --cross-file config/arm/arm64_cn9k_linux_gcc
ninja -C build
CN10K:
.. code-block:: console
- meson setup build --cross-file config/arm/arm64_cn10k_linux_gcc
+ meson setup -Denable_iova_as_pa=false build --cross-file config/arm/arm64_cn10k_linux_gcc
ninja -C build
.. note::
@@ -108,4 +108,11 @@ deps += ['bus_pci', 'net', 'telemetry']
require_iova_in_mbuf = false
+cnxk_socs = ['cn9k', 'cn10k', 'cn20k']
+
+if dpdk_conf.get('RTE_IOVA_IN_MBUF') == 1 and soc_type in cnxk_socs
+ warning('IOVA in mbuf is not required on cnxk platforms. ' +
+ 'Set the enable_iova_as_pa option to false to save mbuf space.')
+endif
+
annotate_locks = false