DPDK patches and discussions
 help / color / mirror / Atom feed
From: Shijith Thotton <sthotton@marvell.com>
To: <jerinj@marvell.com>, <bruce.richardson@intel.com>,
	<pbhagavatula@marvell.com>
Cc: Shijith Thotton <sthotton@marvell.com>, <dev@dpdk.org>,
	Wathsala Vithanage <wathsala.vithanage@arm.com>,
	Nithin Dabilpuram <ndabilpuram@marvell.com>,
	Kiran Kumar K <kirankumark@marvell.com>,
	Sunil Kumar Kori <skori@marvell.com>,
	Satha Rao <skoteshwar@marvell.com>,
	Harman Kalra <hkalra@marvell.com>
Subject: [PATCH v3] common/cnxk: allow enabling IOVA field in mbuf
Date: Fri, 25 Oct 2024 17:21:22 +0530	[thread overview]
Message-ID: <20241025115122.2378308-1-sthotton@marvell.com> (raw)
In-Reply-To: <20241025095040.2275978-1-sthotton@marvell.com>

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]
     ],
     'part_number': '0xd49',
     'extra_march_features': ['crypto'],
diff --git a/doc/guides/platform/cnxk.rst b/doc/guides/platform/cnxk.rst
index 0e61bc91d9..cd7a0adb96 100644
--- a/doc/guides/platform/cnxk.rst
+++ b/doc/guides/platform/cnxk.rst
@@ -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::
diff --git a/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build
index abb0f6f01f..9f07a694a5 100644
--- a/drivers/common/cnxk/meson.build
+++ b/drivers/common/cnxk/meson.build
@@ -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
-- 
2.25.1


  parent reply	other threads:[~2024-10-25 11:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-14 11:06 [PATCH] " Shijith Thotton
2024-10-24 11:10 ` Jerin Jacob
2024-10-24 12:09   ` Bruce Richardson
2024-10-24 16:13     ` [EXTERNAL] " Shijith Thotton
2024-10-24 16:44       ` Bruce Richardson
2024-10-25  9:41         ` Shijith Thotton
2024-10-25  9:50 ` [PATCH v2] " Shijith Thotton
2024-10-25 10:06   ` Bruce Richardson
2024-10-25 10:12     ` Shijith Thotton
2024-10-25 11:51   ` Shijith Thotton [this message]
2024-10-25 12:39     ` [PATCH v3] " Bruce Richardson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20241025115122.2378308-1-sthotton@marvell.com \
    --to=sthotton@marvell.com \
    --cc=bruce.richardson@intel.com \
    --cc=dev@dpdk.org \
    --cc=hkalra@marvell.com \
    --cc=jerinj@marvell.com \
    --cc=kirankumark@marvell.com \
    --cc=ndabilpuram@marvell.com \
    --cc=pbhagavatula@marvell.com \
    --cc=skori@marvell.com \
    --cc=skoteshwar@marvell.com \
    --cc=wathsala.vithanage@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).