DPDK patches and discussions
 help / color / mirror / Atom feed
* [PATCH] common/cnxk: allow enabling IOVA field in mbuf
@ 2024-10-14 11:06 Shijith Thotton
  0 siblings, 0 replies; only message in thread
From: Shijith Thotton @ 2024-10-14 11:06 UTC (permalink / raw)
  To: jerinj, pbhagavatula
  Cc: dev, Shijith Thotton, Wathsala Vithanage, Bruce Richardson,
	Nithin Dabilpuram, Kiran Kumar K, Sunil Kumar Kori, Satha Rao,
	Harman Kalra

Value of RTE_IOVA_IN_MBUF was always disabled on cnxk platforms, as IOVA
in the mbuf is not required. This change modifies that behavior,
allowing RTE_IOVA_IN_MBUF to be enabled if the build option
-Denable_iova_as_pa=true is explicitly specified.

Signed-off-by: Shijith Thotton <sthotton@marvell.com>
---
 config/arm/meson.build          | 8 ++------
 drivers/common/cnxk/meson.build | 9 +++++++++
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/config/arm/meson.build b/config/arm/meson.build
index 012935d5d7..ca54524376 100644
--- a/config/arm/meson.build
+++ b/config/arm/meson.build
@@ -439,10 +439,7 @@ soc_cn9k = {
     'description': 'Marvell OCTEON 9',
     'implementer': '0x43',
     'part_number': '0xb2',
-    'numa': false,
-    'flags': [
-        ['RTE_IOVA_IN_MBUF', 0]
-    ]
+    'numa': false
 }
 
 soc_cn10k = {
@@ -451,8 +448,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/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build
index dc2ddf1f20..bba780e750 100644
--- a/drivers/common/cnxk/meson.build
+++ b/drivers/common/cnxk/meson.build
@@ -108,4 +108,13 @@ deps += ['bus_pci', 'net', 'telemetry']
 
 require_iova_in_mbuf = false
 
+cnxk_socs = ['cn9k', 'cn10k', 'cn20k']
+
+# Enable RTE_IOVA_IN_MBUF only if enable_iova_as_pa is set explicitly, else disable it
+if meson.version().version_compare('>=1.1.0')
+    if '-Denable_iova_as_pa' not in meson.build_options() and soc_type in cnxk_socs
+        dpdk_conf.set10('RTE_IOVA_IN_MBUF', false)
+    endif
+endif
+
 annotate_locks = false
-- 
2.25.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2024-10-14 11:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-10-14 11:06 [PATCH] common/cnxk: allow enabling IOVA field in mbuf Shijith Thotton

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).