From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0068.outbound.protection.outlook.com [104.47.32.68]) by dpdk.org (Postfix) with ESMTP id D26381B1AD for ; Wed, 20 Sep 2017 13:25: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=ZtP2TmhZtXXhJLZmUUQd6jtBnU5x/d9D+VLTTLpE/M0=; b=YXaWsIOVgQI3ujmYLRARkUKItwGy2F80IaVV3BDe3y59BquwdP55tt1cHhEX0ISwcyVz2PN9drfLEPu7yP7b4aLUDrXmO6NlZrS4jWyPWOVs2Gp2FcqPLyJDNCblu9glV1sQhIx0J0bP7gwXR8ETe6gs1L9iX/BEU7Pt9EglyUI= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from localhost.localdomain (111.93.218.67) by DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Wed, 20 Sep 2017 11:25:26 +0000 From: Santosh Shukla To: dev@dpdk.org Cc: olivier.matz@6wind.com, thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com, aconole@redhat.com, stephen@networkplumber.org, anatoly.burakov@intel.com, gaetan.rivet@6wind.com, shreyansh.jain@nxp.com, bruce.richardson@intel.com, sergio.gonzalez.monroy@intel.com, maxime.coquelin@redhat.com, Santosh Shukla Date: Wed, 20 Sep 2017 16:53:55 +0530 Message-Id: <20170920112356.17629-9-santosh.shukla@caviumnetworks.com> X-Mailer: git-send-email 2.14.1 In-Reply-To: <20170920112356.17629-1-santosh.shukla@caviumnetworks.com> References: <20170918104234.9149-1-santosh.shukla@caviumnetworks.com> <20170920112356.17629-1-santosh.shukla@caviumnetworks.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0076.INDPRD01.PROD.OUTLOOK.COM (10.174.208.144) To DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: a40335f4-aec6-4f96-3bbe-08d5001a4d8d 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:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 3:0S4dStt1bBdIfwGc5XbjpjpX8ACoCsdF05gExsUfb+tv64N665PF11JyBp/7PpHVvoxm1/JG4kSOjuEXC7mfvjC09qmCNUtLssdIuV0SvseEDM30PKyzxXg+UHtLPwJRLgX1kC4kRoGeRJDH1CSYYFJfqs+nG12niUoKLl3U9njB+oKOztc6QZ6Zx44SAZNidJ2Hpe93s0kXRjVtbzEIJnMhtDQgkJIXms3D+E9EzRdD4N7AE1u6EGuEi3+ifxzS; 25:Z+S0CxJH4aHqJG5OoJnrNuCT+ZiRZ2HaJoSYeIVS8A8ecfY/rnbFpIztNnVCns6e+zZ/vCcHzNRL9GDx/Z/S9mP+JWuf7eUeFkZPXHvWzvPnsobnOuilq8zpFgYVJJ0LnXDGqeDd3DNZAR+Zw5JW82GdXSJlGBh4agG00Zc3T3v6YmuUnezQZ3T3hok+7/+3vFnYk0oP7L3A0UP0SuBqkv/c4Az1yz6G+IOyN+DX4AYCcSExNK3VZ0PjA+/890XXnnTeMD1AcZVA9vEsY0U/1S36KNhVe8oWNYwPyoAsb3FprdtB9B4GRWbST+2RSsUhZNbeE1d7U4F7W7qJYzlEaA==; 31:gxD7iah30MPHb9r0raJAaSwweTdwL2dgQOIyBYMXzOYrNXVSNa8iTuq55r15VgmYq1CsTUDeLyci91eXP1SNjOZyUGrPIORBA1w74gf3tSJDkCztvJj23WnqhnxGfKMBwbISiNDfJgAgx9S+IGfYIlU+gSYniys7P1sdFSJ7AGNwTPOl7IUUbmb1A7zZtjY2OiHkTQ9Kuec+4NnfbsWlMqiYmEbuI3dfOi3g7foyrWo= X-MS-TrafficTypeDiagnostic: DM5PR07MB3098: X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 20:LkXtQJuinT6lOeADGLPHupdzpv9ZJdVUtps5NiWkuYAy4T3RCtu9GB+2BZSUaR+P92PTFiDrbT4Mv76M6ZI3ifDtbizd6FOOdOO4emcEibGO4ac5yl+heRHhavI8253eMhoU6nQguh1Bu2PIgzA9L5R6GiQU2dxxdv+q2GZukAvQz8tb2wI8v+BP5JhlTmJcTxCnDRj4ON01wvg3fbXc4fsF+armygLyiEXODp5qyzXQKpjmyWx6evO3AxfJCr22G1UViEeXh3AjTUIa79SpuAibBfxUUyyEauGSP76cX5/Ni9ibxdTedG9TjEWREKUQaKOKcAAhs9tdeCDRqLN7XQhvU8njTIZDQJthzypR1EGDE091qS3kTHsqnXZLpk775SY/m4+vSD9AE4PuKn3Pb6FemIk//PHo/xuxnfKCdn1yjx4uk+OCsWxOmPC1DHfs1OWx+bylAF/7AYZ+pQ4ZVjg+Sz86U0VZVBF/uP62i+CvqpG4DUvWqk9kuBd/6mFhLD4v5PSRDDQJSkN/65G6+dYc96U5g3a0rcZ5BJcOhF2wzZKFIsHjAUtPY1O5rPkLJ7SIUY8biZzl5GNDekPKGVFvZm/L6QMjxQQShmaho6o= X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(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)(10201501046)(100000703101)(100105400095)(93006095)(3002001)(6041248)(20161123564025)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:DM5PR07MB3098; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 4:Qfvrtdd6zl0luAEx+6fpcJR8DLa2hpjpR7+4eWD5Tix6LbAP0hFo8KHQ7yZseOaBBC6xNyuBZzRkNlGmqoFJCYoU1FI5/OnNuizgnIIrC/eemrOvDVannMHdetZKgsTH0Pwi7qmaSe9ebTqgnhVWSNd4nvq7DKE+O8wBuTcQPi8WbR+whJHVdoaX0cOl//o2E+PT/En8L1JeQ88B+6Gc/M91CkXrfD3XYrjSlmxzO+R+QWIwAJfc8Cgqjg7HLnA6RtgEszfdwJP92Bz+luewS7GGBiAQlFV8Z7EjxKMdt7MfO9QWpmHsFxX+PA7vG5cAM+9hmtajZxD9rI9AD/DzfQ== X-Forefront-PRVS: 04362AC73B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(6069001)(346002)(376002)(189002)(199003)(66066001)(3846002)(106356001)(8936002)(7736002)(2361001)(33646002)(6506006)(2351001)(47776003)(25786009)(105586002)(53936002)(6116002)(316002)(36756003)(6486002)(107886003)(68736007)(5009440100003)(6666003)(101416001)(6512007)(81156014)(81166006)(97736004)(4326008)(50986999)(76176999)(16526017)(8676002)(2906002)(16586007)(189998001)(305945005)(478600001)(72206003)(2950100002)(5003940100001)(1076002)(48376002)(50226002)(6916009)(42882006)(50466002)(5660300001)(8656003)(7416002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3098; H:localhost.localdomain; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A: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; DM5PR07MB3098; 23:QL9R6GCboZicG7+shPjXb5wBpEjg/1DCPogUqmBap?= =?us-ascii?Q?Zv4PPiFMmcygs13zxZm5+/u9oASdoScIpDusUbWQgVNh/P00XIxs1Jsghq9O?= =?us-ascii?Q?aa491T7j3QkoYdyad8CVXDAAFyLjEHY8St1BUdWYzX7duV5uutME1rLn3EQB?= =?us-ascii?Q?CkKeHHeTx1gtGQfgRAhxmoeWsBNSUjDW79ZqfEFQcCY/v12EGXUlottsFCOK?= =?us-ascii?Q?oqNaUTwvyHomGy39e3IRyJ4LI95kzBdTuiDN3+7NhHJXLFUb7qohvixDFAQZ?= =?us-ascii?Q?afwB8QFcnhvDEGaY//yINO3HzbhTyW++aWztlNmAIieH4gop0jmJxf1RmgF9?= =?us-ascii?Q?Lz/rdTND4gKODHniHj4mrzo/fEHmZhiSRgcY6SUfQP7Laalenra2J9LbRuTa?= =?us-ascii?Q?t11dCbQqn2Icpbrr8ll2sb4H+gb5jsoxkygT3nEB/5YLTfC8t0TfEB1DCaIm?= =?us-ascii?Q?JtKRK+rCTw8hSn88kQz/ZRdw22ngKEQqcJCBvChc1ckUoHkDTZGGGpNJDi8d?= =?us-ascii?Q?zWubTIHccAkQ+5DpREjobsES5qrqn0J6zyGWt6GRfh33Jzjd0dxC9O4jhruc?= =?us-ascii?Q?5IDXtsPd9hlPFcXk7XmBYYZmrxkOYXyEUJe9q2pab+KpuzuGFmaLM1FW0mTr?= =?us-ascii?Q?7lwKDiV+KaUOUp67h/wNfO/SWYCAWwDV1EXwmTRTI/f642yrId6oOFr8VyPv?= =?us-ascii?Q?g8V4xfara9Qqs9h7DE1G1zA/JYieHDTlXfx8DC+npwN3hg/o+p22owVt76Vl?= =?us-ascii?Q?S2Smgt9P3jSmbgAaV3tw1Tda1WWlP2iKwEwYsSyqFvXg7ePka56WUX1WFO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jl0rHa+xtIYg==; 24:/BuXLpioflU84XBojGKwfawfir1QakeJnAOoCnU8p6asbiqQv/BFCxynj2yzeKU4hbTfQWpPXWJVh7fJhDygm4wvTc47GiG/U7H43lCzPAE=; 7:gOxve0MgkZh0Txus+odHQCIRk5evnkqYNK7adF2UkvzJDA2byWTNF9LFXvTwH8Gt9U0Es9YuPyFfDP9qLeElWQSjt+R2/qMQqSUGlimZRAbzBJUsJEQ7rFIM6PrdwRN0kQjciKuZCXbOmz6TO6CYujLP5SRBoPoiselY/XK3uw0Bguou7mbMc0f37xddmwWWzcELF9hU5HfuAr3TfSTmg2rbo70IUZTYgiOqgL2yK8Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 20 Sep 2017 11:25:26.4294 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3098 Subject: [dpdk-dev] [PATCH v9 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: Wed, 20 Sep 2017 11:25:33 -0000 Check iova mode and accordingly return phy addr. Signed-off-by: Santosh Shukla Signed-off-by: Jerin Jacob Reviewed-by: Maxime Coquelin Reviewed-by: Anatoly Burakov Tested-by: Hemant Agrawal --- 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.14.1