From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <dev-bounces@dpdk.org>
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
	by inbox.dpdk.org (Postfix) with ESMTP id 44EDB45BD4;
	Fri, 25 Oct 2024 11:53:27 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
	by mails.dpdk.org (Postfix) with ESMTP id 33C65402AE;
	Fri, 25 Oct 2024 11:53:27 +0200 (CEST)
Received: from mx0b-0016f401.pphosted.com (mx0a-0016f401.pphosted.com
 [67.231.148.174])
 by mails.dpdk.org (Postfix) with ESMTP id B092A4003C
 for <dev@dpdk.org>; Fri, 25 Oct 2024 11:53:24 +0200 (CEST)
Received: from pps.filterd (m0045849.ppops.net [127.0.0.1])
 by mx0a-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49P7gr57008146;
 Fri, 25 Oct 2024 02:53:20 -0700
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=marvell.com; h=
 cc:content-transfer-encoding:content-type:date:from:in-reply-to
 :message-id:mime-version:references:subject:to; s=pfpt0220; bh=Z
 rimwX5yTwhmmQEpLWZihC0i4b4/CP1IwgD5E+bJK48=; b=gnKrd3FSs3/iSlFrm
 RlbBOGbF/cEEToEXqs+qOX9rj71B+a1AVunxKR7JypQ/xbkJGQKraBKQmloNVZJP
 g2jJx2FZp61REaP4ee7PtA/R78uLYI6flCaApWFmWzP+6LiN9c1cr/8mmR9nn1pZ
 xUQWtkba4BMx5fFWuRZrQygGK+9kJVv+5M5ghYaXAF6eAfbviK/Pf37KcCcVNc+4
 JWWcmJ3SHm67bUwysEr532ue4eHS1sdp3MZCU4zxvIvEF/PKsDq5HzOS7MtBoyMF
 yRZCJAu2HTwiYJEq4oegRlng69z875nGATOBoKP9TVsvp0XctgrPNkH9zBFjeegc
 c1Zqw==
Received: from dc5-exch05.marvell.com ([199.233.59.128])
 by mx0a-0016f401.pphosted.com (PPS) with ESMTPS id 42g76e87m9-1
 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT);
 Fri, 25 Oct 2024 02:53:19 -0700 (PDT)
Received: from DC5-EXCH05.marvell.com (10.69.176.209) by
 DC5-EXCH05.marvell.com (10.69.176.209) with Microsoft SMTP Server
 (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id
 15.2.1544.4; Fri, 25 Oct 2024 02:51:50 -0700
Received: from maili.marvell.com (10.69.176.80) by DC5-EXCH05.marvell.com
 (10.69.176.209) with Microsoft SMTP Server id 15.2.1544.4 via Frontend
 Transport; Fri, 25 Oct 2024 02:51:50 -0700
Received: from localhost.localdomain (unknown [10.28.34.29])
 by maili.marvell.com (Postfix) with ESMTP id 458F43F7050;
 Fri, 25 Oct 2024 02:51:47 -0700 (PDT)
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 v2] common/cnxk: allow enabling IOVA field in mbuf
Date: Fri, 25 Oct 2024 15:20:40 +0530
Message-ID: <20241025095040.2275978-1-sthotton@marvell.com>
X-Mailer: git-send-email 2.25.1
In-Reply-To: <20241014110608.2170844-1-sthotton@marvell.com>
References: <20241014110608.2170844-1-sthotton@marvell.com>
MIME-Version: 1.0
Content-Transfer-Encoding: 8bit
Content-Type: text/plain
X-Proofpoint-ORIG-GUID: -zdqx3z8F8LeMavEnzEU8tqG3yks9MAc
X-Proofpoint-GUID: -zdqx3z8F8LeMavEnzEU8tqG3yks9MAc
X-Proofpoint-Virus-Version: vendor=baseguard
 engine=ICAP:2.0.293,Aquarius:18.0.1039,Hydra:6.0.680,FMLib:17.12.60.29
 definitions=2024-09-06_09,2024-09-06_01,2024-09-02_01
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://mails.dpdk.org/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://mails.dpdk.org/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://mails.dpdk.org/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
Errors-To: dev-bounces@dpdk.org

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>
---
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 ++------
 drivers/common/cnxk/meson.build | 6 ++++++
 2 files changed, 8 insertions(+), 6 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/drivers/common/cnxk/meson.build b/drivers/common/cnxk/meson.build
index abb0f6f01f..293a47524b 100644
--- a/drivers/common/cnxk/meson.build
+++ b/drivers/common/cnxk/meson.build
@@ -108,4 +108,10 @@ 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 platform ' + soc_type)
+endif
+
 annotate_locks = false
-- 
2.25.1