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 7022042929; Wed, 12 Apr 2023 19:20:22 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 409A8410F2; Wed, 12 Apr 2023 19:20:22 +0200 (CEST) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2045.outbound.protection.outlook.com [40.107.237.45]) by mails.dpdk.org (Postfix) with ESMTP id 3E609406A2 for ; Wed, 12 Apr 2023 19:20:21 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=l+ingMvTHAmqAosk1io1yt9170i4/W9cAWfE4PKZGfEe/HZCUOgQUnn6lQZ4sKL+k/O+4UgtNo7+YxwR76M81UzH2iOu0NsntJV/mElu3U9GtcJVz8zvX6/RURu9iiodKd5OrSWX0aIuPtYC79D8ynwmQk0hjWkrmColBghraMyBFFAXN5UCiKdI3XHpub4mG1FieYhemZsslsMkSJx2UfxrkIg07AAMREPUNLw5TJEQPVBY0tt9F7HiA/A7O0ovzEaNDmbg7aIavFhp2kR/JIGnYXCCsgzvvfaJIWe1TCXhRgG7o3OH43RgLP8XiAldGryQZ1SSWt7bJ7cO/sjx8Q== 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=yPDTyPmfB37lF4e6f61UXTHiPuwmu+H0zASpSx8dYh0=; b=aZ7wW/8YHTkTpfQuwxju9SFzy6jLrCcPMd8lIoK1W1ankDhV4TgZLTqXn/XR0s2J1XLHvPWX2i5xMwSg99IHDMYOn3DHcPK1Eud3pI7YHWf5+yuJcTdvt87jXgm3Zz+kgicFHaQ3GehIECF73Vv5PJNYA8lJdZg3WZxTzaE4FITirWj8IaYpJ84Lhf0kq90N8mBHdgD9lcDe6zN1gSsPbdk3/s0qlAHhYATEMS0qte/7AuiFvYamUd60PD2RTllmpbyezUGcvEQlBO9duI54Kaj35qv+xykY79xvhDMMoNPS4fOransAuA27kgDcabimq0GKL+/3A4ZPs2y6wi8ecQ== 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=yPDTyPmfB37lF4e6f61UXTHiPuwmu+H0zASpSx8dYh0=; b=JqwG/BUI5zkaiYSrWXYm8CVhwtRGfH4C/x8DHC6HcCqqClrL6ijT5n5x7y7FxnBcIzcGKpZJr4n37SC+Xr2PimiQYaYym9y212dvA1L87HmoJuhCaxwCHvQIntTlneIitgKBPKLIuFh0INF36SeV9pbDhyk/1iNKb8iEEEJRRVs8sn8+romKsgdp3wSWjMUgSmyhjMSnSdZlrXnIjKT9FH/X424d0rp/TXCjyqvu266kLneICj5fJROfPOX6Eo39ILnPwpKIAGRRckP5yKDfuLEX4gccLEvNrwBKUAGfNZALRvbCSiOxd7JPoFtskoeI1sKVGIVvpyaKJmcNm6BmOw== Received: from MW4PR03CA0164.namprd03.prod.outlook.com (2603:10b6:303:8d::19) by SN7PR12MB8818.namprd12.prod.outlook.com (2603:10b6:806:34b::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6277.36; Wed, 12 Apr 2023 17:20:19 +0000 Received: from CO1NAM11FT060.eop-nam11.prod.protection.outlook.com (2603:10b6:303:8d:cafe::ec) by MW4PR03CA0164.outlook.office365.com (2603:10b6:303:8d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.28 via Frontend Transport; Wed, 12 Apr 2023 17:20:19 +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 CO1NAM11FT060.mail.protection.outlook.com (10.13.175.132) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6298.28 via Frontend Transport; Wed, 12 Apr 2023 17:20:19 +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; Wed, 12 Apr 2023 10:20:05 -0700 Received: from nvidia.com (10.126.231.37) 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; Wed, 12 Apr 2023 10:20:03 -0700 From: Viacheslav Ovsiienko To: CC: , Subject: [PATCH] eal: choose IOVA mode according to compilation flags Date: Wed, 12 Apr 2023 20:19:49 +0300 Message-ID: <20230412171949.27665-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.37] 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: CO1NAM11FT060:EE_|SN7PR12MB8818:EE_ X-MS-Office365-Filtering-Correlation-Id: 9df627bc-aa75-4c38-dee9-08db3b7a30e3 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: GSAkwGIekX60zxMIgH6D1aSI1ABUtv7U9Ioh3wNl/CU4vi42LXswOMUpW9+Lxi1Cq6A7+t9XPDgueYNLktWD1P5CEO78kdBOAfGow6fCNfuWTfE5Kn/ow+Mhny3mnnNdL6UxYHkZIBZTJMw4H2sjm2GUUDu6RMXZaPD+agS4kRQmuxYQ8uNLxDIVDZcNOhnSqcaR2o5zyI8F1JIGC3n33GJ1ibHNUMJd12Ju0rp5xjtC2WrugJ1xF9oOBnhFZr1PSqhtX4ye+Mdi0CShhWIsDKbSPSOWDDe4UKvlkjoS7dGs7DQ+IReTT6kIvD9sCPlF15kY3GTcsY67XwEWjU53gSIgUPG4nMCNblANQIShAvJ6hV9tl3tT28TG1Gj8/wT4qOapFOpOiDJOSvBGCTVZnSmKP6qZ73QTd1woCUFBqlnK1WJFpsz/Ve9eMY592ZqV3dJRaJGu8rGCWAgg79Vwv+L36NJH2Y3JYMvpnyaYJbCESRtxNBLlGkQuYLxCufmguvpG617bCRhK6v8emyIASQvRJb6/Ljtlktwqe2s+M0DnFm9BNntk6V2xPBKiV0Jfv6klroWCZL8tK8bXQkstIW6tt4szRFsVFQvdGOgkp6EzYy3I35JGvivU6a3uThFolQYIyJDJ1qirmLKKynJI2gD4W7ErwZsM2LzkJlsie8xp1AsSAs3VChT+RbwjxDWRsrBOmJvf2sFK1EC/+zOIN+IVVyhX+iRPMRrDq/Jh09jqgXW5p3FPSEkd1gtxJ4SCSPCkG5M5tAyAQVfODUAl3AdiXW0RvN0iqIksUBrYrxQ= 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)(136003)(346002)(396003)(376002)(451199021)(36840700001)(40470700004)(46966006)(478600001)(7696005)(40460700003)(83380400001)(40480700001)(36756003)(55016003)(47076005)(356005)(82740400003)(7636003)(336012)(34070700002)(426003)(2616005)(86362001)(36860700001)(316002)(2906002)(26005)(16526019)(54906003)(1076003)(186003)(5660300002)(6286002)(82310400005)(6666004)(6916009)(8936002)(41300700001)(8676002)(4326008)(70206006)(70586007); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Apr 2023 17:20:19.4408 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9df627bc-aa75-4c38-dee9-08db3b7a30e3 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: CO1NAM11FT060.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: SN7PR12MB8818 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 c37868b7f0..4481bc4ad8 100644 --- a/lib/eal/linux/eal.c +++ b/lib/eal/linux/eal.c @@ -1080,7 +1080,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 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