From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 5494845BD5; Fri, 25 Oct 2024 13:51:36 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 252F740156; Fri, 25 Oct 2024 13:51:36 +0200 (CEST) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id E42DB400D5 for ; Fri, 25 Oct 2024 13:51:34 +0200 (CEST) Received: from pps.filterd (m0431383.ppops.net [127.0.0.1]) by mx0b-0016f401.pphosted.com (8.18.1.2/8.18.1.2) with ESMTP id 49P759nI001071; Fri, 25 Oct 2024 04:51:31 -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=y N43nrG9nCgkaTvKHopcA+H3dahNTlXYiJtv+XGTts0=; b=dpG65gboapXchdFle nGtlrON8uQ8dRQnF7D63NlEMS5m7JoXit63CQ2hqAdn+OmiuXxMXpyZtDvLcXvHf rkpGVofvXnHdkSGFgbHMX3xpqfA8iKXML296nziLQqvbu/2G64eDDVbUIlewSoty YULjd8ncj+IjTjZ/nTBtEaj7XaGkr4O99SRLhic+U544xgByv0uwMUquW9+HnR0q yAjqevYXQcL/wAGXB3IPxa11173wcYtiFZ0mbl22KuiUSET8bKDhlRKfGZuEOM1D BcwwOh8zmj+Hwz/3gR965K5lijKstPqb+3FhjUKL69u8PrShWa/4EqnZ0k86KLSY 9Eg0w== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 42g6mpgjrb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 25 Oct 2024 04:51:31 -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 04:51:29 -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 04:51:29 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id 8DD1E3F709B; Fri, 25 Oct 2024 04:51:26 -0700 (PDT) From: Shijith Thotton To: , , CC: Shijith Thotton , , Wathsala Vithanage , Nithin Dabilpuram , Kiran Kumar K , Sunil Kumar Kori , Satha Rao , Harman Kalra Subject: [PATCH v3] common/cnxk: allow enabling IOVA field in mbuf Date: Fri, 25 Oct 2024 17:21:22 +0530 Message-ID: <20241025115122.2378308-1-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241025095040.2275978-1-sthotton@marvell.com> References: <20241025095040.2275978-1-sthotton@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: l913Vf46jRB1mPEFg9bUWs1EL_idXm0M X-Proofpoint-GUID: l913Vf46jRB1mPEFg9bUWs1EL_idXm0M X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.293,Aquarius:18.0.687,Hydra:6.0.235,FMLib:17.0.607.475 definitions=2020-10-13_15,2020-10-13_02,2020-04-07_01 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-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 --- 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