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 6344B41CEC; Mon, 20 Feb 2023 16:36:24 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EF3AC43077; Mon, 20 Feb 2023 16:36:23 +0100 (CET) Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mails.dpdk.org (Postfix) with ESMTP id 223E540395 for ; Mon, 20 Feb 2023 16:36:21 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1676907382; x=1708443382; h=date:from:to:cc:subject:message-id:references: content-transfer-encoding:in-reply-to:mime-version; bh=9fWzrpsGDmwCrvdZmGzEJjkIxpzQo1w8ge+LV8fwH54=; b=jYj8xQNOMN+c00kTfN9dyfShOD69AERGbwOZqn0kI+nXHE5FFRD6/wlT S+xR4aGa5E0Qe0JAbzDMVsYbHHReRPnxOcDAcE9m/H4hq53nwsDDLz2iY 6OvQPh+zY3b0Ra9KQOKUdHbTxuOp8aRX0hWg1aq9+X1U1S+tANOJYvFdd XP3Z1aECenlRS1IuztFRczAjW8i2DeGsW9Gp9ZDhxe0KIZD3AioFR0Rok TXcNpeWnU8QRl7VS4tC2laYDN5yPERZiAslwyT55BwGcV77yZiEa1ZCeb h+peXxR5W8U0J/zHNFPNF2a4k+JwfxH/2dcNPIknzZFS6iSFZxSWPPIBc A==; X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="316145525" X-IronPort-AV: E=Sophos;i="5.97,312,1669104000"; d="scan'208";a="316145525" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 20 Feb 2023 07:35:34 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10627"; a="664673050" X-IronPort-AV: E=Sophos;i="5.97,312,1669104000"; d="scan'208";a="664673050" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orsmga007.jf.intel.com with ESMTP; 20 Feb 2023 07:35:33 -0800 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.16; Mon, 20 Feb 2023 07:35:33 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) 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.16 via Frontend Transport; Mon, 20 Feb 2023 07:35:33 -0800 Received: from NAM04-DM6-obe.outbound.protection.outlook.com (104.47.73.40) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.16; Mon, 20 Feb 2023 07:35:32 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=U8r5qAQS5lR1pmPzuhBTE47nEUreOZQRtb/Vja6PYKgzTQFMjuG2rIZB89r/aLvKPGWKNgyfMhk505fR1bE4vLStf7RacrhBdIbo7tujjLb1pVx8s2SS4iGMriwvGCMATRA+uGa5OWIPIz805d3XAiXassXJMSuLKXQ+hQAqnY0ScroEOjwNrBz2Oj78hfBJjv48QnVePSoh//IYDAY1wUMot4oBh6sp2tnHg3m8OftB7jUY7GgEKSIcfuDx8WRFpZ/MCd+IUJ823FIP6pdF7ZmKMoeCUUKdVTbRDEq13epJ38w6+bybBXRvWgfgfxz17j2ELm2zT25PUaxXm499Dw== 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=u/jK/1L+T1qF9wQwI0b7MSnh9UxIqWkU2lhQkP3ok84=; b=XuWav2lA8Qh1tmHlFVFxdRH0FGP8mN1uU/s8DPZP5QXV6fVG6AF8qWCcsQDA0oJWmM9EI5/EH4vmP/W/iM8JF4Au18v+gV1uv1B5XCUBVvfsms+Y9RdIHVgKGEH0PNglK/phuB2BFAcOiMplY6shcWqoZB7OnfuHLvkW8zL1OtirXOaynpO4VNW+RbCHBnWT8H0fDOKVB0QScvb60aI05xcKukYz2EjHh4xa2QlffOmY0elC65LHaXM7lF7iyt91F3vYFwDQ4yR2GxL69GFpmRDS2LFOMreOlwnbkgNK77iEEcnFpqd1T3jLPl/8k3+w54E9fyaZj8keKKzdNf6u1g== 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 IA1PR11MB6122.namprd11.prod.outlook.com (2603:10b6:208:3ee::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6111.20; Mon, 20 Feb 2023 15:35:31 +0000 Received: from DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def]) by DS0PR11MB7309.namprd11.prod.outlook.com ([fe80::aaba:abb7:8794:def%9]) with mapi id 15.20.6111.013; Mon, 20 Feb 2023 15:35:30 +0000 Date: Mon, 20 Feb 2023 15:35:24 +0000 From: Bruce Richardson To: Thomas Monjalon CC: Morten =?iso-8859-1?Q?Br=F8rup?= , Chengwen Feng , Ruifeng Wang , , nd , , Dongdong Liu , Yisen Zhuang Subject: Re: [PATCH] net/hns3: support disable IOVA as PA mode Message-ID: References: <20230214071141.50155-1-fengchengwen@huawei.com> <98CBD80474FA8B44BF855DF32C47DC35D8775F@smartserver.smartshare.dk> <24304924.kmuVQn2iE0@thomas> Content-Type: text/plain; charset="iso-8859-1" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <24304924.kmuVQn2iE0@thomas> X-ClientProxiedBy: LO4P123CA0097.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:191::12) To DS0PR11MB7309.namprd11.prod.outlook.com (2603:10b6:8:13e::17) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DS0PR11MB7309:EE_|IA1PR11MB6122:EE_ X-MS-Office365-Filtering-Correlation-Id: 5b10f7d3-642d-428a-3034-08db13581952 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 1ek4oUxgCkE70kdmT8RpUyfqYKyeSgz/7c72dnU/7IsdPKJBLw40q9bVz6O+S6L+ZcGQQdZVqnxae7ttw52530Fe3dwkFltFx1L0rEtXIUFBVFOXmj9qEBQR/6LyyvpwSYHr3x9i0BSrZ4RSUMuB9m+ekqdIJULtD9jPew8t0DqYBS9zoNk8CM+NmUo9ou51O5r4UVIF9LDHTgDObQ+7rmzemnNvSeASsEiU08ACLKUD7xdX3xn/g+ZpfAB0fvuSgbT94HfCI04P4dV5DmuhgoclcjVgt0pHp11/rICza4AaUVfglB3LpFj3DH9CZyR9VnkucBwhM8sUawZDU1Df73gIWEzh5SFQd0SOTKIKzhRpbJnXTFvxz4lvvOZ1ZktjOXVuAIrJTqiAyBLmh6BmLohvmORPEDUEcmTysLauIa1RqFT09OwU6isLBSDBjE1bJlkfDKeq5mbcsSj/ok4C17N2cwetq6H7qqFnEWKhW2GdkbXdtOmetEGMI3m0iMYbLWiMOzkygoYwXmCyAVsCQuzQcZzS73csKqURtZ66T7kk8R3P9JdIRKalAkg/dlYee2jPSmzbsxgEIwzNP6apI8SvdXq3ziITz+qcIZUxhVyuibW9mVBg8CiaJQIWh+qmSYL8q9wOLrPlciKc9VXrQw== 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:(13230025)(136003)(396003)(39850400004)(376002)(346002)(366004)(451199018)(66476007)(8676002)(66556008)(66946007)(6916009)(316002)(41300700001)(4326008)(5660300002)(86362001)(6506007)(6512007)(6666004)(186003)(6486002)(26005)(54906003)(2906002)(38100700002)(82960400001)(478600001)(8936002)(44832011); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?iso-8859-1?Q?gxRwXn53nhtWPZMkhJ8DF7MbV52FDVulXORYKuVHbiW70jVDbDS1GzuTHt?= =?iso-8859-1?Q?QdlmzNxv5yGOoJTcvHmDLD1PCD2KD/04G9lWkHdnHjNH4SxQLGkpgA+4Ke?= =?iso-8859-1?Q?K5oRKDjhU4o0s+cF2I7LVT44oMbzv0dFx7bRgxLPm3ygKta76tM0EM6nuO?= =?iso-8859-1?Q?/5hovXFomHaODZpG0b9+zwW0KyOx+HL6zvH/aOFok1G3ltRgu21CCglrmN?= =?iso-8859-1?Q?jq57fmuPa9KAZMY6KPWOhimrfwCJV1xcE7rqUVe0VDEqEgFfRzoi/ARnWG?= =?iso-8859-1?Q?pVLgiitBb9xoFpsHpQERioYjgVh1t0F70fNnnRlLeOSL4B+PREOzsujbon?= =?iso-8859-1?Q?QZXYXXEz05tKlngGZTEExeT+dklfurH3ZpFMmX/5sBTm3sVBLhTokmeIRd?= =?iso-8859-1?Q?Nbvh8c8df1Z8Q46lPkDZvrPdQaULThsNQ5tgmkB51amIVXlT12o6UiTbzV?= =?iso-8859-1?Q?1+Y5FKUUtEYS3sERZeH1WiI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iso-8859-1?Q?7Xi2T1Glv1aDs+gK/cToKLivbLj+MFFEBIKO95x5/eyFZqHROeRFI0wLbc?= =?iso-8859-1?Q?YTfob2cv5Q82H5MySLwwRVUjziWFrpXsk6kewoPq1E21RQF33lknWabtAa?= =?iso-8859-1?Q?BKoF0wyI0oaEzyObVIZ5tPwxvMskRTwZgkvKL2qvZa1fSXnqhL/+bpJU1f?= =?iso-8859-1?Q?Mrga6CvhrXUWQ88g1GRFYn/muT1iPq1rur8dSKaheZzOHV4WyPZ56ztgxn?= =?iso-8859-1?Q?Fs8l9oifNBLrrGXEWJ4CIOlML5n9M5XJ+S4+raxNjkz3S5NTABolp+jg?= =?iso-8859-1?Q?=3D=3D?= X-MS-Exchange-CrossTenant-Network-Message-Id: 5b10f7d3-642d-428a-3034-08db13581952 X-MS-Exchange-CrossTenant-AuthSource: DS0PR11MB7309.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Feb 2023 15:35:30.8580 (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: 6WHbwmi9/3VPvnVl5a834EBrMXazBDm4rIb5F0SQO8q3+sPsts6vMAEwrEkqW/Y72XWgEuj+Ar1BIlktGHvh+D3QqQ/wJboCV2OtvBAX+Ow= X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR11MB6122 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 Mon, Feb 20, 2023 at 04:30:20PM +0100, Thomas Monjalon wrote: > 20/02/2023 16:07, Morten Brørup: > > With the new viewing angle, the current define RTE_IOVA_AS_PA makes more sense to me now than before. So we should probably stick with it, rather than introduce something that might confuse developers who already have the same viewing angle. > > > > But it still seems counterintuitive to me that disabling some feature ("enable_iova_as_pa") is not supported throughout DPDK; the logic seems inverted. Apparently, it also makes it difficult to assign good titles to patches that support disabling such a feature. :-) > > > > > > On the positive side, since everything supports this "enable_iova_as_pa" feature, we don't need to add it to the PMD feature list. If the logic wasn't inverted like this, the PMD feature list should probably reflect which PMDs supported the "iova_as_va_only" compile time option. ;-) > > > > That's a change I would like to do: > The Meson variable in the drivers should be "support_iova_as_va" > and would mean we can compile the driver when "enable_iova_as_pa" is false. > All drivers (that I am aware of) support iova_as_va. What is missing is drivers supporting "iova_as_va_only". Any reference to va without the word "only" on it will be misleading. A third way of looking at it, is to work with the fact that the reason drivers require changes to support this "va_only" mode, ro no-pa mode, is due to the fact that the mbuf no longer tracks iovas and only VAs. Therefore, we can have a variable called "require_iova_in_mbuf", which would hopefully cut through this whole va vs pa addition/subtraction mess. What do you think? /Bruce