From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0080.outbound.protection.outlook.com [104.47.2.80]) by dpdk.org (Postfix) with ESMTP id A46771B1EA for ; Tue, 25 Sep 2018 16:00:55 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=4CeDn7kyrRoLUnPdQhIzl2FT2OnjaiCw79gqgvm4AC0=; b=t0fFeZV66dH/JIdlidq0DcXkCAsLdVy4ahjnuZjcokLgfKIzcMwgrl7KddmznKXl6jnjoxp06vj6kcZy8rfh/z+5iZMlMUQ+8xWz3OIZjC/1wUDlTk2H0FQFoFhEbQcvalGT/qKmmZE20dRN4cgZv/sMh+jVnYcw/h3v+cDwOBg= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=shreyansh.jain@nxp.com; Received: from [10.232.14.39] (14.142.187.166) by DB7PR04MB4684.eurprd04.prod.outlook.com (2603:10a6:5:37::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.1164.22; Tue, 25 Sep 2018 14:00:52 +0000 To: "Burakov, Anatoly" Cc: ferruh.yigit@intel.com, dev@dpdk.org References: <20180925125423.7505-1-shreyansh.jain@nxp.com> <20180925125423.7505-4-shreyansh.jain@nxp.com> <894130a9-017c-348d-31f8-c4c23f517f25@nxp.com> <67e25f1a-110c-db32-5f3b-a065e77fecc6@intel.com> From: Shreyansh Jain Message-ID: <5fb7c022-228f-89d3-43b6-5d08e258fba4@nxp.com> Date: Tue, 25 Sep 2018 19:30:21 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <67e25f1a-110c-db32-5f3b-a065e77fecc6@intel.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [14.142.187.166] X-ClientProxiedBy: OSAPR01CA0040.jpnprd01.prod.outlook.com (2603:1096:603:14::28) To DB7PR04MB4684.eurprd04.prod.outlook.com (2603:10a6:5:37::18) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 47bbdac7-65d5-4528-c3ff-08d622ef4f63 X-MS-Office365-Filtering-HT: Tenant X-Microsoft-Antispam: BCL:0; PCL:0; RULEID:(7020095)(4652040)(8989299)(4534165)(7168020)(4627221)(201703031133081)(201702281549075)(8990200)(5600074)(711020)(4618075)(2017052603328)(7153060)(7193020); SRVR:DB7PR04MB4684; X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4684; 3:WpKa3jpPZe/yyu7OQStQ8XLndqCJFeMWwIQ+Areho6srn/u5O4Wodn6dP6a1JzEI/LQvqS39mnPWd9XpnP/Db9/4MrMH+9lrxrppYz2IPEDLC96vFXXcrLErNyfVS1FLorZci3JIaIJ5OQELU2pp7BfDctj39lMwbES1VFmNVIumFT7+veX66+AjsJRY+eKJf3flVDaXBiG5Rs+CbaSxfkc5l+7cUrvMmld7sd/uRgx/LLS18jHtcaL62Br/GzDH; 25:cL+SqwEdg8z0G8mYm/B3rq4s84Sv83L4LqyrvyJRqC5u4by/zPEqi1eJTi7SXw8V0oNsMkUdCMAZ/i1NAuGmW2UoKzRKTNS3I5PPQ6iJwl5D62z5ljDRWwnZlk9HKatizm1prnVjt/b5DBvlrBOkpEDUd7Hug91Cdu+DxRn/zJplbFhozSEr6slWAvjLOe2jJ0p3ua3Bvqrw+ZgG2D5KoWbodcvt3NYW+9fJbdACF5dd/3lxs5vVO5rf1TBJKSoyewleOoYaCu7iPi80Y4GeqHHQT7BZZB6Or67n5Va8r8qMheBAfrYhMTczzHMcShLDQ0IvGoVPbPfV1Kmyn9lPmw==; 31:ZF0kCwCjO2y+l+gZ6Yt1ULW1c9wiaNYqbnrGL79IJJs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/KANLnLuHkHISj+8Nk6TZKtQLJvs0u/cfSoOavGsVRqjGJ2pVYr+j2F+3KXg= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197)(278428928389397); X-MS-Exchange-SenderADCheck: 1 X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(10201501046)(93006095)(93001095)(3231355)(944501410)(52105095)(6055026)(149066)(150027)(6041310)(20161123564045)(20161123562045)(20161123560045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123558120)(201708071742011)(7699051); SRVR:DB7PR04MB4684; BCL:0; PCL:0; RULEID:; SRVR:DB7PR04MB4684; X-Forefront-PRVS: 08062C429B X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(396003)(136003)(376002)(346002)(39860400002)(366004)(189003)(199004)(58126008)(2906002)(230700001)(386003)(53546011)(316002)(67846002)(93886005)(16576012)(52146003)(6116002)(3846002)(229853002)(2486003)(23676004)(52116002)(76176011)(34290500001)(47776003)(65956001)(65806001)(97736004)(105586002)(106356001)(478600001)(31686004)(186003)(50466002)(446003)(11346002)(66066001)(25786009)(65826007)(26005)(77096007)(36756003)(5660300001)(53936002)(16526019)(86362001)(55236004)(305945005)(44832011)(6486002)(5009440100003)(476003)(2616005)(956004)(68736007)(6246003)(6916009)(64126003)(81166006)(6666003)(4326008)(7736002)(81156014)(8676002)(31696002)(486006)(8936002)(110426005); DIR:OUT; SFP:1101; SCL:1; SRVR:DB7PR04MB4684; H:[10.232.14.39]; FPR:; SPF:None; LANG:en; PTR:InfoNoRecords; MX:1; A:1; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtEQjdQUjA0TUI0Njg0OzIzOjdsV2dVNzJYZEZRUzJQTVBFV3VyeHpxd1Fk?= =?utf-8?B?REQ0Z3F4RnRuUXN4ZjI4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TGdhaXBa?= =?utf-8?B?SWFZYVpBcklRU0VlQU5HK3VzNUlNZVR3MVIwM0xwZURHL0pMajlkYUMrcjR6?= =?utf-8?B?QlpENCtWTVRlSnlBaUlGSGM4VFlZcE9zS0tBbE4zTEViRHVVeHB3aEVhdlFU?= =?utf-8?B?M0pucXppa0FOa1JkT0FkZXdRSy9rcStEajRvdTJFMGM5RDVyanR5MkQ5Rjhh?= =?utf-8?B?bnh1RDNmeW5mVkdsdHl6ckRLRFBYZG01UEpFVzhzUDRValo4SXJZL3Q5UFNu?= =?utf-8?Q?D+kIMb2LC4IEPgOQNK5/nVs=3D?= X-Microsoft-Antispam-Message-Info: UORZi1buteaNa5MAshrVAfr/oxNJndfutGjsU9NDS2/h0ebViWKquJGq9Xrv6aobAjBw/0H1WKjlUjtM8W++b63vdyFSqlNrMCOulEMB6kN/mwybOG6jjSvbdLyEOKs2YKsXZi+NMXHww7z+ZiNcGzcTQpHCGW9NZ85yKDOD/RdBHwbcxBMyB7K555egQnIXJ8Q8dz82WcUBiGhS2BupTAufeUORMbL+k2iXyqkmGlFu+8FctVBVHPVYl0Gc3daQPbcT5kDsft5dUBc1kAB2j2vRHBrFU+caHJxG2t/75B2e+84W4hPOLnje8c+arHdhUCswtReSUQes8UxdisaVRZx+DCDftushG3lnjXdYaLw= X-Microsoft-Exchange-Diagnostics: 1; DB7PR04MB4684; 6:tTSw/u/FU6MJFstn1VYb2nRO4NxQeXSO9USqxgoI037FExwmVWPgiZqTUERAFH0z6h0hq44r5nDZ2rPRJZu2EnGNQ94r95nL0biaa+wGF9XclhHOHIk40ZvIXVh/uHXxlj/aZg5JQ6U7Hxspd0gssM2/xdCCe2rQcsJuQ90VnL5EnazIX+VB8GejdxjhEjiY/dJd7QtgaV8HdfWyKvw+I5lyDtOLORVdSpuon4Du/xNqSLoXEqENL50Lhn3XrXiv8RrHHgcuIAANePKUto7LBSf9M21fpsacm+mb87v9b+8AwXA5fQttQGQURRafLLCKfJPJ+sutzD4eR1E/wj86hfSoO7PKgQsNfpOFDZbrKcOJJD+95POI4AP8OjzjadwoKI5SOdgHho2Blws+ffbPsHizblLL+5Xj858hv04yRPT4UxO81hjeB2zzmi+znXCDN2FrQSk0KXfNNO3CB/3RiA==; 5:pRPSneWZN1rkzbhKedZ3Y+6N15VCYclloJD86FzZqev8XATenoKZ7vXTUVdaVLotDX5aVASvPc9uVhrRLIcOZyz9hVxkySwE7JT6W5brL7x4E25skEsi1Pjy0EqKXmePhTgKNrCW3qTRf08rph6HIi+meYyGYBqp0Y5mPv8RxdU=; 7:ha5RoWWwaTSwBPwYc8sqYVai29jg7Xafyy5cO1WH2NdrYhUe0vvIKEKM6xFJFxSy3+lLt8saicPoOa1mFVzi1hVUTqg90+L0w812Sa30qPlVvpdlEVeCYFLz6YLv2sjqXpcYvaes18mkoi1VMyQ+TiEWyJSrez/NJ5bNn1pJZCZRg1zrYILti1te/uWMRNsFgJptlYHrKC+MbZZWrfGgYNcEIImRoNOcq5kC7Yvd1cXwNUvpRX/xrFBHncsy8TLg SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Sep 2018 14:00:52.4586 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 47bbdac7-65d5-4528-c3ff-08d622ef4f63 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB7PR04MB4684 Subject: Re: [dpdk-dev] [PATCH 3/5] common/dpaax: add library for PA VA translation table 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: Tue, 25 Sep 2018 14:00:55 -0000 On Tuesday 25 September 2018 07:21 PM, Burakov, Anatoly wrote: > On 25-Sep-18 2:39 PM, Shreyansh Jain wrote: >> Hello Anatoly, >> >> On Tuesday 25 September 2018 06:58 PM, Burakov, Anatoly wrote: >>> On 25-Sep-18 1:54 PM, Shreyansh Jain wrote: >>>> A common library, valid for dpaaX drivers, which is used to maintain >>>> a local copy of PA->VA translations. >>>> >>>> In case of physical addressing mode (one of the option for FSLMC, and >>>> only option for DPAA bus), the addresses of descriptors Rx'd are >>>> physical. These need to be converted into equivalent VA for rte_mbuf >>>> and other similar calls. >>>> >>>> Using the rte_mem_virt2iova or rte_mem_virt2phy is expensive. This >>>> library is an attempt to reduce the overall cost associated with >>>> this translation. >>>> >>>> A small table is maintained, containing continuous entries >>>> representing a continguous physical range. Each of these entries >>>> stores the equivalent VA, which is fed during mempool creation, or >>>> memory allocation/deallocation callbacks. >>>> >>>> Signed-off-by: Shreyansh Jain >>>> --- >>> >>> Hi Shreyansh, >>> >>> So, basically, you're reimplementing old DPDK's memory view (storing >>> VA's in a PA-centric way). Makes sense :) >> >> Yes, and frankly, I couldn't come up with any other way. >> >>> >>> I should caution you that right now, external memory allocator >>> implementation does *not* trigger any callbacks for newly added >>> memory. So, anything coming from external memory will not be >>> reflected in your table, unless it happens to be already there before >>> dpaax_iova_table_populate() gets called. This patchset makes a good >>> argument for why perhaps it should trigger callbacks. Thoughts? >> >> Oh. Then I must be finishing reading through your patches for external >> memory sooner. I didn't realize this. > > To be clear, the current implementation of external memory allocators is > not necessarily final - it's not too late to add callbacks to enable > your use case better, if that's required (and it should be pretty easy > to implement as well). > Is there any reason why external may not be raising call back right now? I might have missed any previous conversation on this. Or may be, it is just lack of need. As for whether it is required - I do see a need. It is definitely possible that after rte_eal_init has been completed (and underlying probe), applications allocate memory. In which case, even existing memevent callbacks (like the one in fslmc_bus, which VFIO/DMA maps the area) would have issues. From the external memory patchset, I do see that it is assumed DMA mapping is caller's responsibility. Having such callback would help drives reduce that throwback of responsibility. (Speaking of external memory patches, I also realize that my memevent callback in this patch series need to handle msl->external).