From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0067.outbound.protection.outlook.com [104.47.36.67]) by dpdk.org (Postfix) with ESMTP id 682685A3E for ; Thu, 31 Aug 2017 05:27:32 +0200 (CEST) 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=uvDvEekc+C1eVKZ8vbs5IhIOW+nGRvOjKKoR0Aj/fJI=; b=fl6JObWevtqE1DStbLqutovmoY0TEgIbD739nDN74JYzKg5+Gv/huaIPMFNFy3WPVjFwDnT4YShPu5cDki2dfnou49xlaHfkAdGETk9uFQd/BalfqOcgnL0QoeaR1QBY5m72FXRBAGHChVTXDI4IacITaC8IPFBfmIn8Roi5bUc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (111.93.218.67) by BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.1.1385.9; Thu, 31 Aug 2017 03:27:27 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, olivier.matz@6wind.com, maxime.coquelin@redhat.com, sergio.gonzalez.monroy@intel.com, bruce.richardson@intel.com, shreyansh.jain@nxp.com, gaetan.rivet@6wind.com, anatoly.burakov@intel.com, stephen@networkplumber.org, aconole@redhat.com, Santosh Shukla Date: Thu, 31 Aug 2017 03:26:17 +0000 Message-Id: <20170831032618.7120-9-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.13.0 In-Reply-To: <20170831032618.7120-1-santosh.shukla@caviumnetworks.com> References: <20170814161059.6684-1-santosh.shukla@caviumnetworks.com> <20170831032618.7120-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: PN1PR01CA0118.INDPRD01.PROD.OUTLOOK.COM (10.174.144.34) To BN6PR07MB3089.namprd07.prod.outlook.com (10.172.105.7) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c516502e-3ff4-4d25-5ddc-08d4f02036a3 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:BN6PR07MB3089; X-Microsoft-Exchange-Diagnostics: 1; BN6PR07MB3089; 3:C0ImhI/90U6/DxLV3plzO+JWprMknWVC/rvV+Ky0aNIBHfAMt/5E2ypu1/gv6y87/udMaPonfrf82aa4Aogw1/9xZFDQYleGz31KEA2yEWduOGlgHIbyfBBSVVVAXXpJjf2IiWtH52K9KDx+wzkT2ftCwiTkmxcZ2ZO607Zu6IBY/BPID99eoDbEQ6+LYnvbJlyEGOux4+pTthzJ/iQtVdH7M5/45OENdrukP3MNHcrYW6mFNTQvXBQUmW/GD5z2; 25:hbMFhgS1rysCGf9i5jwmzAqLdz9hb9R6joijmB9j96EJf4cHWUTt6rgwDn7UI9ovUofxedUTicL+x5ttDHWx5qNEB+Wjdb8dth6FsmNkYRrEpncXvtW71QtsGK+YySVn1hteO3rdxYM1ZAZes6maeUlxbR1goDV5hEjGpDPl3Q0uZ+01a6LjyInjWhhv0h8783J+kOwQJXLx2LTM2XE/sVeWidLRnRw+cZFG6fbTks2haS/Z0iZIAU4VIP2SgilghlZZ/es1aVqtbXaHysqQkW3FL35xAq3WGorEv4H2VkumCBoon89eJYrXdYL4fnCAo3XpKHnNiYfZ4/ejLAqLgA==; 31:oFcKgOQtzu0c4z+qPJVU5Faa3Wbn83CE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DMgiqmOtgy+wd3Jwe20t0xHCCO0aEQRcuZQDRV05UEgiAcCbOKJXoWVxV0yLtX9G+PYp5Ptjpy1 X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(5005006)(8121501046)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123562025)(20161123555025)(20161123560025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:BN6PR07MB3089; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:BN6PR07MB3089; X-Forefront-PRVS: 04163EF38A X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6069001)(6009001)(199003)(189002)(81156014)(8936002)(81166006)(8676002)(7736002)(6666003)(5003940100001)(305945005)(2950100002)(7416002)(2906002)(6916009)(42882006)(76176999)(50986999)(101416001)(50226002)(5660300001)(6486002)(6506006)(48376002)(50466002)(72206003)(36756003)(97736004)(478600001)(189998001)(42186005)(2361001)(2351001)(33646002)(106356001)(105586002)(110136004)(107886003)(5009440100003)(8656003)(6512007)(53936002)(4326008)(68736007)(1076002)(6116002)(3846002)(66066001)(47776003)(25786009); DIR:OUT; SFP:1101; SCL:1; SRVR:BN6PR07MB3089; H:localhost.localdomain; 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; BN6PR07MB3089; 23:9OvyAEfWrl4TVgRSbZUdpUCyYTvyrQBa9ohFthNPM?= =?us-ascii?Q?y6YRXCydzmnBthmHDOieI2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jOEV+LI6WYP575RPS9mHry+BrGO/l3LfG0fjcqsT91HDpKya7vRgfQfK1Y27kSyRsRJ25aaiLZfbhOoQGNv+D1+4BuKJLSu1JoH9Q9LqAL1SiilqIYTOhSXo71SSCMe+B8vHMGt7gMfHHrQ= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Aug 2017 03:27:27.5637 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR07MB3089 Subject: [dpdk-dev] [PATCH v7 8/9] linuxapp/eal_memory: honor iova mode in virt2phy 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: Thu, 31 Aug 2017 03:27:33 -0000 Check iova mode and accordingly return phy addr. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob Reviewed-by: Maxime Coquelin --- lib/librte_eal/linuxapp/eal/eal_memory.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/librte_eal/linuxapp/eal/eal_memory.c b/lib/librte_eal/linuxapp/eal/eal_memory.c index 52791282f..2d9d7c2dc 100644 --- a/lib/librte_eal/linuxapp/eal/eal_memory.c +++ b/lib/librte_eal/linuxapp/eal/eal_memory.c @@ -139,6 +139,9 @@ rte_mem_virt2phy(const void *virtaddr) int page_size; off_t offset; + if (rte_eal_iova_mode() == RTE_IOVA_VA) + return (uintptr_t)virtaddr; + /* when using dom0, /proc/self/pagemap always returns 0, check in * dpdk memory by browsing the memsegs */ if (rte_xen_dom0_supported()) { -- 2.13.0