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 209351B24B for ; Mon, 6 Nov 2017 06:38:31 +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=XTEdGBslt6MjThrEXKUjDiHWCbPox1j8Ohjv89v9GaI=; b=egRr0+aaANXCt1VyBI7shQD36kwrEfdGcrEa7c7+T3E95wGumovz/CQhWiefEimK72woCMkyFU4z7hY39dXfM393Mhsz912M/137BWkRZQ3yFxomoQtkqulqzu/Wrh8kTAMCwaSWbv4HRz3smSovKEpfUKHxMKNltTthR+HXpfE= Received: from [IPv6:2401:4900:1981:24cb:f43d:67e1:a281:7906] (2401:4900:1981:24cb:f43d:67e1:a281:7906) by MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.197.13; Mon, 6 Nov 2017 05:38:27 +0000 To: Thomas Monjalon Cc: olivier.matz@6wind.com, sergio.gonzalez.monroy@intel.com, anatoly.burakov@intel.com, dev@dpdk.org References: <20170814151537.29454-1-santosh.shukla@caviumnetworks.com> <20171106014141.13266-1-thomas@monjalon.net> <20171106014141.13266-3-thomas@monjalon.net> From: santosh Message-ID: <80cb9e8f-c493-4b5f-909f-9ae233ba6541@caviumnetworks.com> Date: Mon, 6 Nov 2017 11:08:10 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 MIME-Version: 1.0 In-Reply-To: <20171106014141.13266-3-thomas@monjalon.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Content-Language: en-US X-Originating-IP: [2401:4900:1981:24cb:f43d:67e1:a281:7906] X-ClientProxiedBy: MA1PR01CA0085.INDPRD01.PROD.OUTLOOK.COM (10.174.56.25) To MWHPR07MB3102.namprd07.prod.outlook.com (10.172.95.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: fd725691-0819-44ae-7078-08d524d89c31 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(4534020)(4602075)(4627115)(201703031133081)(201702281549075)(2017052603249); SRVR:MWHPR07MB3102; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 3:SkdGrF0eN17UZ5/cYkFiaK+WLwP60DDKVdMvzI5qBfHSnfZZUv0q+MjYP/jha1TzgHA62ayST8ATwEVUzEUxeFJZV+7kITv2L41sCxBMqS/ZXTNZXbooVulTf/UNwg0kC7/IidDreDFMEkaVgw6ffpxxB68IC758FUIMsL1tJD3R3npkBPT4HmaCpct6AFGl0uMKkqlsh0pA5/r6I9DzRw92WX/08nnu5+YKFNr8IV9u/E59nNiQgWOXjDNf9aE7; 25:N2pc+pWngQr0YjcJVFwhiep5Uzw37wRkCWkVpUbaVs3YuZumrzOYm09jUfdOYe1aU4D4CcVZa1ApuNg0+2ypUkQl9Ce8vNqaj37oshxUQG3OglOjS+TW0fSD2iPpXFJsabOQk2Nf2cyBJyYGIwotD+YSOAWm2CbYkYVAP217fnUvwT/hZ+SKwzgSm35RVEjtTQJBZmvXgE4jUKfE1YwlDfiwbhFUTagcyjAIepX1gbkKbaAXpS+99O9rMUlaDMS41ry0of0YndkHQfsL4TiDSYpXoJ3o7nE2tiOXMbGi8tBK3m0H3secYLKZ14dg8ugrjIxLHe4vSS6lJroQn8xtYw==; 31:D09wd4SB8nFoMs4XvV6nH1RQlr5/pInKNBM1zLSQTZRZwJ23Dp7fvPLQAYqOEKKvIh9bHw0VOknmnY3/8GxtgM5iFIorbJSusubgdPtn10+lzRuk44cvISkATzQGFcwNVRGjKUQUWdDIW0YXX9aYuLvLrGbAjpBovbKyyhZ+qFBDPzkuSj3xMn/0WPkGaNaNCjSAo7f52sL6X8THa2TOLHGlxt7/jrt35Af4gXSTFWg= X-MS-TrafficTypeDiagnostic: MWHPR07MB3102: Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3102; 20:vmtBfwLv8NQ0R/DWtn0EWTpxifAlaLGQPLSVJT3zMYVU1HMAkR64ZrEagRwGMGSM3xbZxmBkheF5I7JYOfNCHGRP6EN8sNUUxJFGFODLY+TNI/5Lf+AA5Mno2YK+/OT2BoJ7kUHh1fGrhySbKiSar4RzMAHiBWvoEY4z48/RZuA2EjdspSxcvppMDFPYqQovhp3pfiGgP+gQX6T2MSYh1N5N41wszFIr+hGeRO3nHYrrPdW70WwjK/Sy9izVtxvafmo245KMVAX7xBJxVQ6HGcUq+auXHQSQPExForP7K1BeiYYSsuI8bBFvY+ifdHU4ED9vqL7rMXrNnVD574z6NrKcIOlo9wClec4kdzDW3T+b8mm5w6565WeefNFZGVZiP+IqOHjPIXODVQDVffJu9YIyxDMKFXC2NVXxl/hbpk7WY08XKLRTaYrdRM+w/JV9VyRg1pEo7vtgfUpUcuEQq4/4rfyXjL3Rh5gN3x6r0zUTyYibavEeIHGgiOgPbsw5Z2zM2t/w5S6lgiEsE6wF7rAqeM8lm4QIeEVJiAB7MfE5cPLQhy+rl8VBFOnY8OvBUFcS+MFxSuNU4CJ117SpxzMm9DYnovpR24xcJfEDPmA=; 4:MO/E7DvxHzc1idpj+1kg05Vh1bW6AvNfnEZhQHPFsLrBRwmOPKUSkxo5UaI7YLqSrdYi1i0GOYOoNzQxT9N0uEA2PK2JZIyOJum5P11/Kj6BxR5hQvLJFC79YqNKsDdB4ScNP+dZEtygDBiuNO1aPnYjKOAGQ5wyP03+3502R33JvDSPqUJcQiqsNete9kx2ORNryCO4Q3omsQ+HyqMRAOwkRu3rbFYNFXCCDLBgrhueei/Xp99DSnU1n/0zqvcZNDDkx2DgKZRPBySuAIQS3w== 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)(2401047)(8121501046)(5005006)(3231021)(10201501046)(3002001)(100000703101)(100105400095)(93006095)(6041248)(20161123555025)(20161123560025)(20161123564025)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3102; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3102; X-Forefront-PRVS: 048396AFA0 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6059001)(6009001)(346002)(376002)(199003)(189002)(24454002)(23676003)(2906002)(81156014)(81166006)(8676002)(8936002)(25786009)(31686004)(86152003)(305945005)(478600001)(316002)(7736002)(229853002)(72206003)(31696002)(36756003)(58126008)(5660300001)(65826007)(97736004)(6666003)(230700001)(2950100002)(105586002)(50466002)(106356001)(42882006)(6246003)(65806001)(189998001)(65956001)(1706002)(101416001)(54356999)(76176999)(6916009)(47776003)(6486002)(83506002)(4326008)(64126003)(33646002)(68736007)(50986999)(6116002)(53936002); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3102; H:[IPv6:2401:4900:1981:24cb:f43d:67e1:a281:7906]; 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: =?utf-8?B?MTtNV0hQUjA3TUIzMTAyOzIzOkhpdTBZN0VjUjlGejJ0eGlSaytuck5EVWVz?= =?utf-8?B?NzF0dVYyN3dpMVY1RHNSOG1TZkNCQWt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FFnnlR1cazbK5MkaofLGWM63l5yPoIZKw8as3C2IofHV6ubTscYD+0ORScPUKbZwiMNgwAzU3kPhMrv/VsOP+o/6nbGTz5Wv9aqvpvIM/iOQO9Y7P8R8GjU/x4R/kZ3ikHWWvGOL4g+iSOBOx5pF0HReKqdq/IFH1aGkM4G+TbYwl0icQNBMjC4UQ9gb1jjRMRbqKDczhSHXKVxCFJoIIAvJpOonCOOYI=; 5:9RL5SKLXiAgw+x5urQQQClheckAqfjhTASqPj7oYgjH5xd4CByNiMoTNS3D3Vbj90KV9jExGji4rvoeCwkpVi26fWRDFkzrK89pJw+BWd1TV9apP0x14uRQHQXM0OMKVt+EgYDW/20piKVKQDrMlvjYSsn/5pJfDlnK8LSTz2Xk=; 24:1G+FRaOV9bPHeKAtkiYCYuum467uCD1rG6R8K7zp+yIQsp5/HCYFJ17rqG36Y73CR4s9oTtEh/V5SHmoLbbcWqc7qLTNcqpNc5yeCbfWkjE=; 7:3xvFCn5iCz4xNNYGdBTSB0iqpPnW0t6XPBT/4DATC81DFi4lJltcSZ615M+mVAqcBuaw74IMIq3rRVBVRaG1Ux4XDkgjBGGtFprdCwZkNgKbmCN6m1RNDR7KQ0B4UK+hG4r8nNr2ee+6uxiiYh58ZOaRTrc2AMjECvi1AsO6sOSPHO+RgL5lI8Mojni5mrDJcNxJCRrjfdlsXAM6If1aNtPRmcPsuPm5MTugay7+yfkqYQmOWXU0oHu8XxiSoiO9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Nov 2017 05:38:27.3877 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: fd725691-0819-44ae-7078-08d524d89c31 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3102 Subject: Re: [dpdk-dev] [PATCH v4 02/15] mem: introduce IOVA type 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: Mon, 06 Nov 2017 05:38:32 -0000 On Monday 06 November 2017 07:11 AM, Thomas Monjalon wrote: > The IO virtual addresses may be used instead of physical addresses. > As IOVA is more generic, it should be used in most places instead > of physical address wording. > > Signed-off-by: Thomas Monjalon > --- > lib/librte_eal/common/include/rte_memory.h | 10 +++++++++- > 1 file changed, 9 insertions(+), 1 deletion(-) > > diff --git a/lib/librte_eal/common/include/rte_memory.h b/lib/librte_eal/common/include/rte_memory.h > index 5a3a956e3..f7eed9ab6 100644 > --- a/lib/librte_eal/common/include/rte_memory.h > +++ b/lib/librte_eal/common/include/rte_memory.h > @@ -92,8 +92,16 @@ enum rte_page_sizes { > */ > #define __rte_cache_min_aligned __rte_aligned(RTE_CACHE_LINE_MIN_SIZE) > > -typedef uint64_t phys_addr_t; /**< Physical address definition. */ > +typedef uint64_t phys_addr_t; /**< Physical address. */ > #define RTE_BAD_PHYS_ADDR ((phys_addr_t)-1) > +/** > + * IO virtual address type. > + * When the physical addressing mode is in use, > + * the translation from a virtual address to a physical address > + * is a direct mapping, i.e. the same value. > + */ I guess - that description applicable for iova=va mode and for iova=pa mode - Need to do explicit virt2phy translation. I believe you mis-wrote - s/physical addressing mode/virtual addressing mode. With that: Acked-by: Santosh Shukla Thanks. > +typedef uint64_t rte_iova_t; > +#define RTE_BAD_IOVA ((rte_iova_t)-1) > > /** > * Physical memory segment descriptor.