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 8543A42C40; Tue, 6 Jun 2023 17:15:49 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 5C4D84067B; Tue, 6 Jun 2023 17:15:49 +0200 (CEST) Received: from NAM12-MW2-obe.outbound.protection.outlook.com (mail-mw2nam12on2052.outbound.protection.outlook.com [40.107.244.52]) by mails.dpdk.org (Postfix) with ESMTP id F1EA940223 for ; Tue, 6 Jun 2023 17:15:47 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=a2zI64nqHKRu1V5MLTlPSOktxqhPXtKHQXZpFgyI2b1Ge4tzTjze1iKLLROAmvFnDZHUoigfmyDvTXIZqq8ViYVdoWXdwQSqiETVzAwBfYxwM14HHTtBZEY9kJErSzmNTT7F4olHay75vPxR1mN5gNPrAkMXZbKsDVvrBm3U8puwIzbvSHQ9h174U17gDznLfRmE6N8mvweCNOcR8WKeVJTN5rwwCrPlbtAEr7huOz0IJ7466yLZRQmhJzfdPJ633Uzg/2jK9h+vF5tKftuw85w0QjDuO9FCjlI3dELPe0KRPww0yIG4NXBwj/j7Cv6pkF4BVkYYHiYirtTeO+gdPw== 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=qDTRNkRv2akEUuwfx7EUf/ro24dfWPhpfYZSFaVEXYQ=; b=XuR6dfkx9/l1KLtwQaxPYh0gvkxAO9CygT8x/KoWx0FEg9zb2xvlK4tUzOdTDvPJ8Oop2CHsig44dS1NB7uh3+9N6sr3mWnjx8SQ7tp4RWBb4VRyI/bTgG4l3mihFncbbY2xgTeN+01DSnSvq8wz/f7w90/5AC6PYY/G1Xz8mJzleOa/ff3LvWOK0lXgUWSh7/Hq067RuUJt/YSijIv81C8l5mIe5RsTrbea7ldIHds4WLqEUDM3PzhqOsDkD6iYEXPy1/H/PUlH6Y0eyRFRrp0d79dTnpgCJrJs8zOseD4w48v6gkxt8EJYXnA40gbsxWCGVJm1SpmVe36CD8yAlw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.117.160) 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=qDTRNkRv2akEUuwfx7EUf/ro24dfWPhpfYZSFaVEXYQ=; b=FovNnRv6HDaY9XsBhvDg0zykguCIdQKA09o9JBPJv28HKnFsYf7bUZ+0dTHcrXzigBTkDxyt1HsqjnbWeWivLW8D1AzsWNrId+aDwYw+xcESWu/+hkFaFs+7RTyrJhk8V6MzjnX/PTuBoW2v+w2pEVu/h8E4BvnqQtIUueroWiWHLUAAq9CSwVdaxDyi7/39C9UgKZn2LHfLtyVOCaolHrajG5BPrsvLfe4VPJX0joLrTHc1GMJadyBwaMHR40ndX5rcu7wuL+S03EhxTFXb2mziWwdVEefEPGRsOvFsGm/KupEWvS/hjnV0e0SzIoEOiPED8a/yJ9pehSBhXXNZHA== Received: from DM6PR06CA0079.namprd06.prod.outlook.com (2603:10b6:5:336::12) by SJ1PR12MB6146.namprd12.prod.outlook.com (2603:10b6:a03:45b::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6477.19; Tue, 6 Jun 2023 15:15:46 +0000 Received: from CY4PEPF0000EDD1.namprd03.prod.outlook.com (2603:10b6:5:336:cafe::6b) by DM6PR06CA0079.outlook.office365.com (2603:10b6:5:336::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33 via Frontend Transport; Tue, 6 Jun 2023 15:15:45 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.117.160) 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.160 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.117.160; helo=mail.nvidia.com; pr=C Received: from mail.nvidia.com (216.228.117.160) by CY4PEPF0000EDD1.mail.protection.outlook.com (10.167.241.205) 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:15:44 +0000 Received: from rnnvmail201.nvidia.com (10.129.68.8) by mail.nvidia.com (10.129.200.66) 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:15:26 -0700 Received: from nvidia.com (10.126.230.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:15:25 -0700 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH v2] eal: choose IOVA mode according to compilation flags Date: Tue, 6 Jun 2023 18:15:11 +0300 Message-ID: <20230606151511.978-1-viacheslavo@nvidia.com> X-Mailer: git-send-email 2.18.1 In-Reply-To: <20230412171949.27665-1-viacheslavo@nvidia.com> References: <20230412171949.27665-1-viacheslavo@nvidia.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.126.230.35] X-ClientProxiedBy: rnnvmail203.nvidia.com (10.129.68.9) To rnnvmail201.nvidia.com (10.129.68.8) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CY4PEPF0000EDD1:EE_|SJ1PR12MB6146:EE_ X-MS-Office365-Filtering-Correlation-Id: c409564c-5d20-4a3c-a375-08db66a0e660 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: DlOd6+vBmLWRyuWutoFteeL6WGZkjpBAd/QmUYsU+eSMuEYaBTw5V8hYzTKY1EyltP3WlH1sRzjH+y7258NY0PbAHqUbcyFo0zjH3nsabzJdRCufs9RL9T6674b+4N57TiqitF4by9b1Uus+g2vvFIifuHx4pMOcBZol0ycTajObLZZvNuO02rntBzUVFcnLiI7uhsIvS4Ih/lK0Tn9aF9/2wrEU7DqJk3QO7palMXMlkTblCSfPWiwjy1s0WSzR8918AbET0Wzr4XqJ8oBxEF33ScwWhu8WYCJEBXt3zJWeY1MYAzB2fB3eiJ0gNRqfFLkyQwaeljZ1QzLX5V04ahnzw6Z+X+hgRQCYEt2n0nfPAXBBT9ZgofwVCnvSWfs/w2LgzgSE74zIyFCZUuEI6EsWJJ5uzCUCeiQrhOIFFC8rY3hHSy/wMgq4SBrS1tJ0NP4Ab8us1bZ/ssIuP0ZvLvS0xbiWGIZgNkKybifJ7eWTqFImqym3YaZR0g4OZ3QNL++kxajLgF1Sp7tAKbet9xiNdgJw3h06DWxRabFXuNibvfZhYF1TMTGnPfDZh9D/N4EAsta68F0FW1mpe0anxzeFaiwqRDKGA6oLRe/ZqL0wSzNbCT4TorJuoA5Ss+t7heq7xeADCwLLdYhfeMymCI58Mfe1DHEQ7EV2Gwd64QTjkZgrqd1GRAw5QwQTivsVEfVMm3KQLV79IqEBcIv7FhdawTw9pE4LgIbBsVgknRtZapKCeOmSyONbDz84q5BW X-Forefront-Antispam-Report: CIP:216.228.117.160; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:dc6edge1.nvidia.com; CAT:NONE; SFS:(13230028)(4636009)(39860400002)(346002)(136003)(376002)(396003)(451199021)(36840700001)(46966006)(40470700004)(36756003)(478600001)(5660300002)(40460700003)(54906003)(6666004)(8936002)(8676002)(316002)(6916009)(4326008)(70586007)(70206006)(41300700001)(2906002)(40480700001)(7636003)(356005)(55016003)(82740400003)(1076003)(26005)(16526019)(6286002)(86362001)(186003)(47076005)(2616005)(36860700001)(83380400001)(336012)(426003)(82310400005)(7696005); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 15:15:44.7856 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: c409564c-5d20-4a3c-a375-08db66a0e660 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.160]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: CY4PEPF0000EDD1.namprd03.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SJ1PR12MB6146 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. If there is no explicit EAL --iova-mode parameter specified in the command line the rte_eal_init() tried to deduce VA or PA mode without taking into account the above mentioned compile time option, resulting into initialization failure. Signed-off-by: Viacheslav Ovsiienko --- lib/eal/linux/eal.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/eal/linux/eal.c b/lib/eal/linux/eal.c index ae323cd492..9856ec9d12 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1081,7 +1081,10 @@ rte_eal_init(int argc, char **argv) if (iova_mode == RTE_IOVA_DC) { RTE_LOG(DEBUG, EAL, "Buses did not request a specific IOVA mode.\n"); - if (!phys_addrs) { + if (!RTE_IOVA_IN_MBUF) { + iova_mode = RTE_IOVA_VA; + RTE_LOG(DEBUG, EAL, "IOVA as VA mode is forced by build option.\n"); + } else if (!phys_addrs) { /* if we have no access to physical addresses, * pick IOVA as VA mode. */ -- 2.18.1