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 75F7542C40; Tue, 6 Jun 2023 17:23:24 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 537994067B; Tue, 6 Jun 2023 17:23:24 +0200 (CEST) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mails.dpdk.org (Postfix) with ESMTP id 5780B40223 for ; Tue, 6 Jun 2023 17:23:22 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1686065002; x=1717601002; h=date:from:to:cc:subject:message-id:references: in-reply-to:mime-version; bh=ySIdPiDlziAAdBbaNDJ5aDj0YzaudsAt8uOiUA4+87k=; b=DcIBDBtpB29Dk/09Bq6SZ4b9zWrUdeRNXJLQs/lO3mH8xbZohnPyOw/W NNCuFLHnmy5D6fYlQyCyuyYRkP81J1TAotGTAHWCBkIPp2VJJcAqaOuM/ nGzlKm4YWWjKStYr+VReBhMPj70sHwW8khbHbFTNxSkAy7sDM5nShB1hM aKDY5peZPk/AnXvcdG3MRxdjNZ7kyawFAHzRuRu+NoiAzFq/ISKPg4URK AKqotolm/KV1VlYnzuaiE6TI7vTvnEnobLFYueUTkrp7BYMrFSm8PrQAM 0xnv26Pj3qPDt9nTbdXO4w1TXH/icXY5fQfelZcVI3wHj487mTZDn1XEW Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="354204505" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="354204505" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Jun 2023 08:23:21 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10733"; a="659562830" X-IronPort-AV: E=Sophos;i="6.00,221,1681196400"; d="scan'208";a="659562830" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orsmga003.jf.intel.com with ESMTP; 06 Jun 2023 08:23:20 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 6 Jun 2023 08:23:20 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23; Tue, 6 Jun 2023 08:23:20 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.23 via Frontend Transport; Tue, 6 Jun 2023 08:23:20 -0700 Received: from NAM02-SN1-obe.outbound.protection.outlook.com (104.47.57.49) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.23; Tue, 6 Jun 2023 08:23:19 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WyqChYdmZfNPFFBfi2Pf70xS5vfYk7RtWEH+rUpgWLjonv+f/AK5jZ6MK17zrnwFyJNJCWUrqQclbb+lfh+ge8P2QhZBtmkWy4SlsMYPNgA+7XlmaNB04vg0amZn5YPsWyeqofQBz2a2ZUYeINASWIm/BgzMyNUSeVW71X6yGU2WH2Xg9cHrygcMFgVCc9xBTwg5atpT2icqZyYgN7il1wRiqVlnXdHD+ELuR++oQ3li/I80LnRIrSzmXpofdkEzN/bVvFJNegCoxM3OFYd5bBqG+t0Xe5ycgmgSlmS4Yt2ykH/kNE8SemN0rndSx0naVkRxhxbhaaQ2eZ84zXx2Hg== 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=a+nE49tXOpba2Hib2bp1WBJXP4hR3eCJYi/Shf2/W1w=; b=BHHxaNjEUEheyU6M+HnHjYESqOAuxwEM+ERvQC4t8FTkeng/y0yJf2eNW8X0nXpjhjvwC/vepb6v7+DuA8lt6MEUAOxtUfOV9MuoHHytjvanBVp96rVv9lymy7oPG7O4zL4FUBhsAxF+F2nvCkTdEVy5WmVWgmWDqB17+DXPn7TBEayJoe/kaBlsTw+GKK0KwrMoNfbNfrUkbMm+WBS/B7BzbqNv3pEdQ2u4yiowSBTNndCwks+AEtbOrolYVTW9lgSsWvXlhgNwSS1f28PVqTN4dUIwZGmcu+yjSGGHe8kgDpM4+u2FSpcPgaPP5EDJsi/EUi+GR1BOJqjh8Prv+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) by DM4PR11MB6167.namprd11.prod.outlook.com (2603:10b6:8:ac::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6455.33; Tue, 6 Jun 2023 15:23:18 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::b8f3:958:d2c5:2232]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::b8f3:958:d2c5:2232%7]) with mapi id 15.20.6455.030; Tue, 6 Jun 2023 15:23:17 +0000 Date: Tue, 6 Jun 2023 16:23:11 +0100 From: Bruce Richardson To: Viacheslav Ovsiienko CC: , , Subject: Re: [PATCH v2] eal: choose IOVA mode according to compilation flags Message-ID: References: <20230412171949.27665-1-viacheslavo@nvidia.com> <20230606151511.978-1-viacheslavo@nvidia.com> Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <20230606151511.978-1-viacheslavo@nvidia.com> X-ClientProxiedBy: LO4P123CA0141.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:193::20) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|DM4PR11MB6167:EE_ X-MS-Office365-Filtering-Correlation-Id: cde4378d-163c-4513-b0f8-08db66a1f3f8 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: ERef5RZgT/K8qwFksXbWofAS8TYQxTm1Vyy1odbDqmi09StKtxd8h0qEYCMIyvJeN3oyAQDLbwrRQ80Ol9aQ42q0Kr5NLSJmBlKFd9Tk+KPjQ/8UL8HoWxYSqz0SBxcNH4gbMzBcGl20b+unmNgQ5pn/MuBW4f0Htbbg1tmGAaK4vuDh5vA/F4Rk0lqBSPzOLILryRCqtX36QPTTpsv8pkrfo9fm2mbrx8DeEGW5IZJrTFulRr83izs6+VrxoikzFCiFOaLX3p4UtD40gLjL8RcScjs8SvAIONlZMsprTmTvWsJM0i9aD7oei/ofN4/SKhlrwZzDFFFBZXcFxJqK4UxdzXj2zEggaRHiyw8cxGUfZk1jOfE7/pwZKuL8u7jiNj5rClWmNql1r5m37cUOdBubcwnvcWKTd4Ed4+shMuFr7Eube/eqKROVIkSpcDloBgIj2hKrEl+sKIBUQyj/R+JbaBAD/lYfQ0p9Eo+WBpBPiLeuyPPMIo90WmNq3ARdipYclfu2R6I0/0t5fBF5f1Z3uRvcBX42UBaJrMcPncljRsaPGqAzrH7ez1QmauT6 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DS0PR11MB7309.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230028)(366004)(346002)(136003)(396003)(39860400002)(376002)(451199021)(8676002)(8936002)(478600001)(6666004)(5660300002)(41300700001)(6486002)(316002)(26005)(6916009)(44832011)(186003)(4326008)(66556008)(66946007)(66476007)(6512007)(6506007)(83380400001)(2906002)(38100700002)(82960400001)(86362001); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?hT+hzrutnxHItzc4K3EThUJ/svdn79UcLVazFwmuTFh9I8rJ+gBU9/WCuMzR?= =?us-ascii?Q?UWn5MHROR0HQvFJiGutlRsAP7NozghOcJH0AWS1hkDiJPqZs5MVkzUKCDIVF?= =?us-ascii?Q?lnfqLaasljw0sURwkQG1ra8RZSI2mHI4AWZEmmyT2KlgZLVnxK/rCv/kNo+P?= =?us-ascii?Q?RLxIqjoaymWpBo9IuESCj1pgbNfY8sL16kDJZvk4EM31C/XYPWscHdGNGr1X?= =?us-ascii?Q?xNrFQcebHktaEJxfYwk/Fyp+3dbEsC2ObxD5HtnS1NdrXy10c3mLYPsBIJlq?= =?us-ascii?Q?Nz0yCEI07yLthObWu5EGR4OvWSKOq3CB/zI05lUo9Mz18dKqKFmIfQ8KyPdc?= =?us-ascii?Q?VfheXEGJRdTlj/HJAkrfqFNPQK0/5YU7EceDTpSuFeCFX9bydOdQJeF2D+JV?= =?us-ascii?Q?qoqVftKAV17T1jAY2V25O4sGMRAlovukCMAPhRBbElcnlMN4K/va5mdBh1Z0?= =?us-ascii?Q?I8b0fIE2/NOLVZou9U8zVm7OcWM9CFDmcMAeDdGLOZtWrYq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yBqLwpYI308FUQBqivCvxe+K6MKsK1eW7hilS?= =?us-ascii?Q?ql1gEq+iZ/+5FFaF8EgB4V1TtwFdPW0yfxdEtBtOj1t5t7gM43wWXP+DmdGk?= =?us-ascii?Q?4s9EG5AeZ401qiGae6/2XRSlg5Xrc83nnXSCYrVd5obmd7l8wPiUBJj4calm?= =?us-ascii?Q?svgLa2h+AYzZAtrmEfI6TWdLgg9DXBUh3f32Xb4zlopbw/UEE19oe99O2/PU?= =?us-ascii?Q?7Q=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: cde4378d-163c-4513-b0f8-08db66a1f3f8 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Jun 2023 15:23:17.4355 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: dc7SnxzMHRItRslwcvdEAB1dwXiiUUCdKkqQDM00GIvfVxMPg6Fr4UtcxHqwwdr9t7nDCDpuGb1aeXS+xG2fQL8b+YWPVKKQiITfkiAbFxc= X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR11MB6167 X-OriginatorOrg: intel.com 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 On Tue, Jun 06, 2023 at 06:15:11PM +0300, Viacheslav Ovsiienko wrote: > 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. > */ Acked-by: Bruce Richardson