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 B660D42C40; Tue, 6 Jun 2023 17:39:56 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A89ED410D7; Tue, 6 Jun 2023 17:39:56 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2068.outbound.protection.outlook.com [40.107.237.68]) by mails.dpdk.org (Postfix) with ESMTP id E12574067B for ; Tue, 6 Jun 2023 17:39:55 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ebaMqxK8S9NiwECk69NgpoPqXr2pXuiD/oS58K9irSq7EIBLw7nRoZMYeFy7tRSGKZAqiHa9ZBshJ1hcKos4pGVRC+6gAPZWo3TZVmdxTfvhqi6bSxPZAaXXZIy6476bzsMv7jlcMeRki9fNi6MI6OhkNhXNzLtAAhJhRsO1hMu4WmmxlXGN8OCU7i3zHi6ZEO2fLAc7G4y9ZLrgPLQeObdrAcwj28oG8NlFwDqS0kxkI+JDNWE6rB0rORfG+Ku+6/CkcgRXBlf0GP/b0qf5cBTbRVo2Y8ZNqCOYTCMY8aT5q1K5bqFeajQdUeXXFCrPYaTTijRF35TF0upJshqPUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=rsve4YlXS5Lyabe+GiTJIzuHtXKyP+/ffl0Bo4Jti6A=; b=PXW138/3L1mgd7D9Q4uL+01Rk0+KEKPfcdsGkZRu2W/ancV1RSsj+ttqxlEYi5mcA8CZ0ffz/LfvncdQsM/eaz/R8ffZkIbQo/Q5ATk3G0jIACjoozAuPYB4BcvPx/YtzIki8vLJ//lxr2pfxKTurs4ncL3WZNFiJbI4hkYV+DGvlwqiJGs/avPCus+xe1XJ8WnLXylDveodXZmZ8N/iuM9fDXhdMLWAVen0oNAqlkOuSR6KaLtYyOKie8/ks5yFGUW4VjT4h+sbceLvmsAZgJOrLIoJbGHdCI/PFczxbL4y6S80pKIOWZiMKRs1fxtHoPl5pZs88b4Zf6FW190Vlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.161) smtp.rcpttodomain=dpdk.org smtp.mailfrom=nvidia.com; dmarc=pass (p=reject sp=reject pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=rsve4YlXS5Lyabe+GiTJIzuHtXKyP+/ffl0Bo4Jti6A=; b=daoB4B5P3PvmqM8xpTZBTqFrFdqap+nK31GpZJ6NiU9g3ZCWCYfzyUQIE3cOw0jW2U/gWnaS7L6lZAvAz7Pc0Jbc0uDk8PAgIUEzGFMKuyDgvr+rMg+ktT3fo0tKMANZxX8YjeefIvAPxQtYhzoVMAaqJ34enMf6gJcRQqukDk2KTt1tGvrEe12kSgUl4AACVvAtYJASILi6rCB8VczrUJZoyHvXgiCvuV2iNf2CWruopJq5ABMKt1LkSBb4UF6k+6ITwUBkC6GrWPfD20DdOkOP8YNd9Dl9v5vTiWOcQuIw8bcKd6XI8REoXoaB44tEVA4pe9dP9a1a9tsr4MjRog== Received: from DM6PR13CA0056.namprd13.prod.outlook.com (2603:10b6:5:134::33) by SN7PR12MB6669.namprd12.prod.outlook.com (2603:10b6:806:26f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.32; Tue, 6 Jun 2023 15:39:54 +0000 Received: from CO1PEPF000042AD.namprd03.prod.outlook.com (2603:10b6:5:134:cafe::1b) by DM6PR13CA0056.outlook.office365.com (2603:10b6:5:134::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.18 via Frontend Transport; Tue, 6 Jun 2023 15:39:54 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.161) smtp.mailfrom=nvidia.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.117.161 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.161; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.161) by CO1PEPF000042AD.mail.protection.outlook.com (10.167.243.42) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.13 via Frontend Transport; Tue, 6 Jun 2023 15:39:53 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.67) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.5; Tue, 6 Jun 2023 08:39:36 -0700 Received: from nvidia.com (10.126.231.35) by rnnvmail201.nvidia.com (10.129.68.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.37; Tue, 6 Jun 2023 08:39:35 -0700 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH] eal: add warning for incompatibe requested IOVA mode Date: Tue, 6 Jun 2023 18:39:21 +0300 Message-ID: <20230606153921.8074-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.231.35] X-ClientProxiedBy: rnnvmail201.nvidia.com (10.129.68.8) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CO1PEPF000042AD:EE_|SN7PR12MB6669:EE_ X-MS-Office365-Filtering-Correlation-Id: 06c14bcf-b11f-4c65-aca8-08db66a44612 X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: lxJJxEzQ8FlySesUBrG93XmjXHstlSSSHHQJpEbj4Fdl4WP1tvjtAsKWoLiQvN3GOEGX9kTbvFwuoWAYOv3wTjsKzNs/ZAlGeUQ/5UD732NT7I7boZpu85Y1V/Xc8XLxvhZEU2xTjLvwYwy8Ddu3b9HA6upZwMX5WyUW9sgbQIKVAYxLc7XK97fOpp66yyW5EiB2eyuiE2oqEkQKevKzKHZ2xqhl7/VN+3YBuQak54j6MCox1AKlOHRneALwP2rZ7FJdM/Hv03E4bftJ3Njqlrta+l2S6UpZl+MuTvNTcyY1zxQvYFF+zhqV3b+IuQSFSOQgDYyNbKxcsuU/HEaYL2nG8f0RRJKFyhnVd8RN9EIerTGYN1AYFI8+z2y9K4j8Nl8kq4mXc1SWSHXCzjLsRbZ9Wa4iNGTtvaPprcr9s5o0muFC3aXvH7l13KMDNZc0BeGYjXbeUjpro7fw4bgGkgBto8rwg7e6WG7tcLUac7jI87k8P1AtJjajPEytVEZdpu+uUU7/Ru08yigVVi9IEU+UVGyn95lseJla/i2sfcZKquPlWVBEVlekiBVBVbVWEYy2jimoi9zAzffg3seJ28LV6x2nichLgb5MmlJKZZ894yP4ZseFiax1YvzTUhX6M0a75vvMVFuSD819/XAjfJmFif6zbKP/BvWX2GsMCsb4hlVZlPuG2sFs2+2Pak4FF+r9AL/ooMjVOilDSrZbX5PGDTl2cQ0zK1gSlOtZlNmXuwYzqw9MvutQRBhtP4Mo X-Forefront-Antispam-Report: CIP:216.228.117.161; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge2.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(136003)(39860400002)(376002)(346002)(396003)(451199021)(36840700001)(46966006)(40470700004)(36860700001)(47076005)(83380400001)(55016003)(40480700001)(86362001)(356005)(82740400003)(82310400005)(7636003)(40460700003)(478600001)(54906003)(41300700001)(6666004)(7696005)(8936002)(8676002)(70206006)(5660300002)(70586007)(4326008)(6916009)(316002)(2906002)(2616005)(1076003)(26005)(426003)(336012)(36756003)(16526019)(6286002)(186003); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 15:39:53.7793 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 06c14bcf-b11f-4c65-aca8-08db66a44612 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.117.161]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CO1PEPF000042AD.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB6669 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 DPDK can be compiled to be run in IOVA VA mode with 'enable_iova_as_pa=false' meson option. It disables support of the physical address field in the mbufs and application can not be run in 'IOVA as PA mode'. The patch adds warning if some bus requires the 'IOVA as PA' mode in runtime and the 'enable_iova_as_pa=false' meson option was configured on build. Signed-off-by: Viacheslav Ovsiienko --- lib/eal/common/eal_common_bus.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/eal/common/eal_common_bus.c b/lib/eal/common/eal_common_bus.c index deb9fb8a12..acac14131a 100644 --- a/lib/eal/common/eal_common_bus.c +++ b/lib/eal/common/eal_common_bus.c @@ -239,9 +239,13 @@ rte_bus_get_iommu_class(void) rte_bus_name(bus), bus_iova_mode == RTE_IOVA_DC ? "DC" : (bus_iova_mode == RTE_IOVA_PA ? "PA" : "VA")); - if (bus_iova_mode == RTE_IOVA_PA) + if (bus_iova_mode == RTE_IOVA_PA) { buses_want_pa = true; - else if (bus_iova_mode == RTE_IOVA_VA) + if (!RTE_IOVA_IN_MBUF) + RTE_LOG(WARNING, EAL, + "Bus %s wants IOVA as PA not compatible with 'enable_iova_as_pa=false' build option.\n", + rte_bus_name(bus)); + } else if (bus_iova_mode == RTE_IOVA_VA) buses_want_va = true; } if (buses_want_va && !buses_want_pa) { -- 2.18.1