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 2F7FC45BFD; Mon, 28 Oct 2024 10:43:38 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id B6A82402A3; Mon, 28 Oct 2024 10:43:37 +0100 (CET) Received: from mx0b-0016f401.pphosted.com (mx0b-0016f401.pphosted.com [67.231.156.173]) by mails.dpdk.org (Postfix) with ESMTP id 59FE9400D7 for ; Mon, 28 Oct 2024 10:43:36 +0100 (CET) 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 49RNkIOf018704; Mon, 28 Oct 2024 02:43:32 -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=/ Ihk1YBPg9HxX7GMhYWkBT5BcJWs9D+hPLQtrDFC4oE=; b=kpNfHGyHAkUtjPTom kLAc8D8A1X/LaappgqzIkanxXtgRsnVaLSsgwpLQf9n0LXQzs2L0bQu43NHhLJIq YiGmaRzqIfTr0DRHSdm1yOtaS/6nvy6FVEW+4fjgTcM83YN/caXvRHxQrWb0e0sd DiR4fpTLJbRmj5NDkGnBsoJP0TkzueMwXSAO5c3uc2JjJfoQTTWXf/cEmOpgG/ig QkNbvBjejh3kCasNEE1ICkljkfz2Uu+aR00Z6euY/0kOaTN+P1s3CcCLKOxRxPnE +CFrh46yR/76p7DKo0ySPPxzn6iBrASOCp5DJv08uhJn45VdrNOxpbsV70bN7drm GbdpQ== Received: from dc5-exch05.marvell.com ([199.233.59.128]) by mx0b-0016f401.pphosted.com (PPS) with ESMTPS id 42hh66hwwk-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Mon, 28 Oct 2024 02:43:32 -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; Mon, 28 Oct 2024 02:43:30 -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; Mon, 28 Oct 2024 02:43:30 -0700 Received: from localhost.localdomain (unknown [10.28.34.29]) by maili.marvell.com (Postfix) with ESMTP id B385A5C68E9; Mon, 28 Oct 2024 02:43:27 -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 v4] common/cnxk: allow enabling IOVA field in mbuf Date: Mon, 28 Oct 2024 15:13:10 +0530 Message-ID: <20241028094310.2412436-1-sthotton@marvell.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20241025115122.2378308-1-sthotton@marvell.com> References: <20241025115122.2378308-1-sthotton@marvell.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Proofpoint-ORIG-GUID: 0_w4EGbX3tQyrVIyF9Z4JZSz1XKFVpIy X-Proofpoint-GUID: 0_w4EGbX3tQyrVIyF9Z4JZSz1XKFVpIy 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 --- v4: - Keep trailing comma. 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 | 4 ---- doc/guides/platform/cnxk.rst | 13 +++++++------ drivers/common/cnxk/meson.build | 7 +++++++ 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/config/arm/meson.build b/config/arm/meson.build index 55be7c8711..88bf1a1b83 100644 --- a/config/arm/meson.build +++ b/config/arm/meson.build @@ -460,9 +460,6 @@ soc_cn9k = { 'implementer': '0x43', 'part_number': '0xb2', 'numa': false, - 'flags': [ - ['RTE_IOVA_IN_MBUF', 0] - ] } soc_cn10k = { @@ -472,7 +469,6 @@ soc_cn10k = { ['RTE_MAX_LCORE', 24], ['RTE_MAX_NUMA_NODES', 1], ['RTE_MEMPOOL_ALIGN', 128], - ['RTE_IOVA_IN_MBUF', 0] ], '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..11f32e15bc 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 needed for cnxk drivers on cnxk platforms. ' + + 'Set the enable_iova_as_pa option to false to save mbuf space.') +endif + annotate_locks = false -- 2.25.1