From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0073.outbound.protection.outlook.com [104.47.41.73]) by dpdk.org (Postfix) with ESMTP id 56ED81B21C for ; Wed, 1 Nov 2017 05:03:16 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=qbmOf9LWNlvfifnxBBFKRYGIUewl/APJ4d6jiOONbzI=; b=R88pNO8essohrp8Cw6lj6ta0udKKymCZ91rf55aWntaEq8ZNA7lV37RNmnuMWbYPzCapQholnhqiV2ZxvtQRDz/bIRXLjt06TbsD/TJ4cYeHUPH8xIyF0jxLd13cd03OFf0IKcJ3D66xPXeRqS1No98bqYbzXz4o756qhOkVYUg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Jerin.JacobKollanukkaran@cavium.com; Received: from jerin (106.201.40.78) by BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Wed, 1 Nov 2017 04:03:11 +0000 Date: Wed, 1 Nov 2017 09:32:52 +0530 From: Jerin Jacob To: Ferruh Yigit Cc: Thomas Monjalon , Bruce Richardson , Sergio Gonzalez Monroy , dev@dpdk.org, Jianfeng Tan , Santosh Shukla Message-ID: <20171101040251.GA13569@jerin> References: <20171101010726.17781-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20171101010726.17781-1-ferruh.yigit@intel.com> User-Agent: Mutt/1.9.1 (2017-09-22) X-Originating-IP: [106.201.40.78] X-ClientProxiedBy: BMXPR01CA0017.INDPRD01.PROD.OUTLOOK.COM (10.174.214.155) To BN3PR07MB2513.namprd07.prod.outlook.com (10.167.4.138) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 0ca97c8a-14b9-4823-6c78-08d520dd79ae X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(2017052603199); SRVR:BN3PR07MB2513; X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 3:iqpBfvrPCrfYn7t7FKIrXyHrIbn6BEYjpe7cBpRF3X99VTlQckIIgeWtW7f/IjF4rpeS9ZtbnATzX7ulljadvdBbzEVb+rKIrPh+MsmouMXZ6ozNAT11VEajKLWdVN5JcHsp6iT8Vv8d3iTqSoduLm0gbBjSCOZeejF25jLficqFNt7RDduHF2L9Modc7lJY2dMP4pcfcLudClqB3uljbZgghM+wj/lv922tBqyQ/VfjCDfaD4ce4281kePgm8zT; 25:I8yprZXLfWo2DgKrZMLewqmNC4T+KrBazvgLqztLY0rqXC69vAAgTsTbDMlZgMuoh9q+MfMrpCz5+bLOPq02ZqcF2iCqn41ulzkoYfPpRaFQAxYik8wXQZC/aGhmxxuuAL3Jr1PcX2wrcpNL5t+ZwhPd5iOFo1NgiF5LRt7YU2iDz602imkEjAjRkBb40bF7X7jR9hqp3N/apyReaz64j/MrY2TzBDqVz6Q74eL0PedHlvpyhfQSj4/9+ldKyhv/BhyGMfV6MdPzy2qQjrIHyQpLllvhyuxgaYO0wQc84T8p7/b2I9HR3aglumLYA1rks6d1uLiM/vKfEGf0UpHxFQ==; 31:qwhWNps9pdjjz/rv6z7nmM4H+r/AD7arA7umPXJicZzQtI+LwmRkZHdXLqxmq5JYhi1NlRNp8RrhrRuO2BfTIk2p/3L49vgF47LlI5icn8KhWY35AKiBCDrG2QugelN+MpX1pgivJmj791dvABjm3+RcFbsJ7eeg3isPbgjhQ3iikLP9GzXjL8NBKaQNRdVXMKXWw7sys8L9a3392VNSAKcwcrZuj6V8Ga1bHlMF4/U= X-MS-TrafficTypeDiagnostic: BN3PR07MB2513: X-Microsoft-Exchange-Diagnostics: 1; BN3PR07MB2513; 20:2FKSPIOP8nWINP5ezlv/rGL0lnObvvbWW1bdj7hFXMJ05kP6g00znYJGJQygDuoRqV3ckVZZt+F7u86uPH8+eCh8xlDmfgFbsHedyHE7wI70lEQnaX8R9EX9uFtwWtovSB6UJcJ77fNcT/IXZDdaBJ3ooQkVRmRLQc+5NgVW9uf9uRImVE45nXoFOMw2lKHula0pFSTJyTJv6h5dVsrtB65UPQtEpCYrfSkpkosodE8qrAYxGwRL/Wgsc9giZpNFb9hzK9JFMs/WH/N+D46DE1zCCmx1bpcoxVn8N1XOZC91vNoMGZookQFVY1N0XaNtc33uKSaje+PSQwe90ru5EcvhjbgbErMSUetidcl3i/trYlDJelgd6bEQazyyhOLl2lnDbzVwCELh0eUI/Zqzd/enXNCVR8eCdpVWUONldUYELggBaakEetRucn+crsNpKRFjoL8Zn3Ybwmf+WC2Zc5BSXY/xYrLkNwB1ScsQmJydkN4cmOZEjjQWIYFSyMz3y2xFGOCyIam+vSo+Gazv85Hx0aOQZLfbZwSnQF3Juqj9xXCULxQgjizIETvySkKmHBvQ3VUM+Oahqt2xXqJKqSN1Q28ZaVNVHpT78u4L06M=; 4:0+4WNlxBUpbYAGz4mN9BgzRwL3rYLxi74OjtWFqQpnZxAUcdaaQIVv1YufkwbirKBg2TfT+8GKxzNhbjTBUsLFR+FVNspPhzo61I1RUwc3sEbD3r0L7s3G5mWpDa66TYaQOtzwkckMRTeJZEjVDqf3kCkETnoDuw5FK/DuBzlnGU6Vc7dbEQKHXyE8eeLILqJIiayTymtiS4tiUHNM/mv4wmp7M6d7PJbESUrz0ik1EZ6ZqZNypMI5fd4pPGr6Seb56qaiVEsSxJCi/a0iawfvMiA701P9H6AagRuASNY0u6chcLSmDPlOCcEXCkr3/H X-Exchange-Antispam-Report-Test: UriScan:(228905959029699); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(93006095)(10201501046)(100000703101)(100105400095)(3231020)(3002001)(6041248)(20161123564025)(20161123562025)(20161123558100)(20161123560025)(20161123555025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN3PR07MB2513; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN3PR07MB2513; X-Forefront-PRVS: 0478C23FE0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(13464003)(199003)(189002)(72206003)(106356001)(966005)(81156014)(50466002)(8936002)(105586002)(189998001)(3846002)(6116002)(23726003)(81166006)(6496005)(2906002)(2950100002)(5660300001)(42882006)(97736004)(16526018)(6916009)(478600001)(1720100001)(6666003)(83506002)(316002)(53936002)(33656002)(16586007)(9686003)(68736007)(33716001)(55016002)(6306002)(6246003)(54906003)(4326008)(8676002)(305945005)(107886003)(53376002)(7736002)(1076002)(229853002)(76176999)(5009440100003)(54356999)(50986999)(58126008)(66066001)(25786009)(101416001)(47776003)(18370500001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR07MB2513; H:jerin; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; BN3PR07MB2513; 23:Kx4UQ+w/FUH/7pUtVX4TYLUg1BUF503CstJEDrK0k?= =?us-ascii?Q?7Hz2vJA5pwhRdKVhrJ+VYcZd3i79FJNuZ1pzCEFhM1Um1zba3Zv6f+btNVxk?= =?us-ascii?Q?8OeADRQFGXwvMtxt0MTXNrCjpxoGUUgF4Q9cQ9lqkAwqwUgOUHls4CMSt+35?= =?us-ascii?Q?Upr6kUcQZctX83nsfTd039DwVqEx7iu0zk/Zst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aySNNoPlyvS2G1suvT3guhGaCcTc0rFzMm3fRymMyB1aS7Oig2xhLJnVjDg1HyDtAHJgEbQw3fQIC1S14bVTKIjd+Ud2p2octa1jSqOZ7b/kJTxleGgZYt0T560m90xcwe+ui+9/BDACLXUPKEskdrhYmvgKrEnc7zDLmGiAMBn5cVdepjn/NVhEDJhTUshp13OFeNFv2a3mKEipQ4YX7dgIefIRGKcAtrLqjANWm4c7I1+5 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Nov 2017 04:03:11.9093 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 0ca97c8a-14b9-4823-6c78-08d520dd79ae X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN3PR07MB2513 Subject: Re: [dpdk-dev] [PATCH] eal: disable IOVA mode detection by default X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Nov 2017 04:03:16 -0000 -----Original Message----- > Date: Wed, 1 Nov 2017 01:07:26 +0000 > From: Ferruh Yigit > To: Thomas Monjalon , Bruce Richardson > , Sergio Gonzalez Monroy > > CC: dev@dpdk.org, Ferruh Yigit , Jianfeng Tan > , Santosh Shukla > > Subject: [dpdk-dev] [PATCH] eal: disable IOVA mode detection by default > X-Mailer: git-send-email 2.13.6 > > Fix kernel crash with KNI because KNI requires physical addresses. The actual fix would be to make KNI IOMMU aware based on the DPDK mode. ie. On slow path, /* Get iommu domain for iova to physical addr conversion */ if (rte_eal_iova_mode() == RTE_IOVA_VA) kni->iommu_domain = iommu_get_domain_for_dev(dev); else kni->iommu_domain = NULL; On fast path, static inline u64 kni_iova_to_phys(struct ... *kni, dma_addr_t dma_addr) { /* Translation is installed only when IOMMU is present */ if (kni->iommu_domain) return iommu_iova_to_phys(kni->iommu_domain, dma_addr); return dma_addr; } > > A config option introduced to disable IOVA mode detection and to set it > to physical address by default. Disabling config option will enable IOVA > mode detection. > > When there is no intension to use KNI, it is safe to enable detection. > > Config option disable IOVA mode detection by default to be sure only who > is aware of result enable it. > > Fixes: 72d013644bd6 ("mem: honor IOVA mode in malloc virt2phy") > > Signed-off-by: Ferruh Yigit > --- > Cc: Jianfeng Tan > Cc: Santosh Shukla > Cc: Thomas Monjalon > --- > config/common_base | 5 +++++ > lib/librte_eal/bsdapp/eal/eal.c | 4 ++++ > lib/librte_eal/linuxapp/eal/eal.c | 4 ++++ > 3 files changed, 13 insertions(+) > > diff --git a/config/common_base b/config/common_base > index 82ee75456..903e7685b 100644 > --- a/config/common_base > +++ b/config/common_base > @@ -107,6 +107,11 @@ CONFIG_RTE_MALLOC_DEBUG=n > CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n > > # > +# Disabling PHYS_IOVA may crash kernel for KNI, use with caution > +# > +CONFIG_RTE_EAL_USE_PHYS_IOVA=y Defeat the purpose of all dynamic probing scheme. Either we can fix the KNI or revert the following patch for this release. http://dpdk.org/commit/f37dfab2