From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0051.outbound.protection.outlook.com [104.47.34.51]) by dpdk.org (Postfix) with ESMTP id AC70E1B296 for ; Fri, 6 Oct 2017 11:14:14 +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=kptuqvN0WGIZ9p1YieO7T623o8QathgKA8Et5R1Vmhs=; b=lWPJrDkcs5w8TebHMglK3ZH20Xl3r4KCFef2/b/fG0y69vM6CJGXhMkNDWpE6zr9M6fcyf37S3CmqSI/eiPeOvbD65y5wV5xue4aKFhY6D2PG7/7EH818s6bmxXMydodbSORbNhUP+NheKgx6zTHh5Am+5rgf8Rg9r8i4+N0oGQ= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [IPv6:2401:4900:1988:3cbd:a874:81a7:315f:de39] (2401:4900:1988:3cbd:a874:81a7:315f:de39) 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; Fri, 6 Oct 2017 09:14:06 +0000 To: Thomas Monjalon References: <20170918104234.9149-1-santosh.shukla@caviumnetworks.com> <5989047.qJ3B3g597f@xps> <2281320.59S7KcHRhB@xps> Cc: dev@dpdk.org, olivier.matz@6wind.com, 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 From: santosh Message-ID: Date: Fri, 6 Oct 2017 14:43:50 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <2281320.59S7KcHRhB@xps> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [2401:4900:1988:3cbd:a874:81a7:315f:de39] X-ClientProxiedBy: PN1PR01CA0107.INDPRD01.PROD.OUTLOOK.COM (10.174.144.23) To DM5PR07MB3098.namprd07.prod.outlook.com (10.172.85.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b9430791-e4f7-465d-fce3-08d50c9a9b99 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:DM5PR07MB3098; X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 3:sMlPHAeUghfDg4w79IeLTfjzXBrgiSunHsc8eHD//eg69Iq29nTTEo9xxHrU3YifE5Vf6X7869j+XakyeXNbPmnfb5NaAgeI9BDaLfDsBcoKGR5aYSz9POa12/eFsFA6a6UurdGiUdDJjqEdw1Ef98WW0AQ3nCCP3UuA35fsvGEdCNXZX7XLghqjBJlHuSCxe2IUxddL4hSlYzY9e3HF0UpMDKfqNkp41wFi2OurlbHjqpCKN7pjLhq4Yd9pLbni; 25:IjtVYqNYVyBJQ1RPMuR2Fx7qnQwWQUBcfxcGv3T88ROuShH1XpforXchBSloivubx+gBySzKELmCKZbnGettLsQ9mAhoQ8ShpfAMzGTiPt+Mri4FGNr7siZ5yLodZ8jTzvSSmff0s3rCiNHj40pblTAyGE1b8KHvZQDNuMrDsS6UVfOFKLssAKM5Iz+pFbmXbYB//+3BAx0yLCooSMwwU9pEtVU4xjUKdtPjri20TTUeZqdFciVD6jzx9CV+jVaZXWjF2h1x2Nk2OKWNlEYtUsO86o+NNq6Ay8WW8k6HRyGirEdzKmfmk8SAH2EcF9yZsmBZPxj/LdsNIiNejLQa2w==; 31:W+gm8SpliVi0xgDW0oi++DfrY2H16Avvn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0HTNj+XSMolFSO4StB3FiR9DS+xRigrSqYePbzp5A8LjlleTpwFAGD1yMW5634gWG4Mb7/wrZeP5NTc6SgcaB4BU 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)(5005006)(8121501046)(100000703101)(100105400095)(10201501046)(93006095)(3002001)(6041248)(20161123564025)(20161123562025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(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-Forefront-PRVS: 0452022BE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6059001)(6009001)(346002)(376002)(189002)(377454003)(24454002)(52314003)(199003)(25786009)(478600001)(6116002)(36756003)(7416002)(4326008)(54356999)(6246003)(8936002)(58126008)(316002)(2906002)(6916009)(2950100002)(68736007)(5660300001)(42882006)(101416001)(31696002)(97736004)(31686004)(7736002)(81156014)(33646002)(305945005)(23746002)(86152003)(53936002)(81166006)(1706002)(76176999)(8656003)(189998001)(47776003)(72206003)(106356001)(8676002)(65826007)(6666003)(230700001)(65806001)(65956001)(50986999)(93886005)(6486002)(64126003)(229853002)(50466002)(83506001)(105586002); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR07MB3098; H:[IPv6:2401:4900:1988:3cbd:a874:81a7:315f:de39]; 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: =?Windows-1252?Q?1; DM5PR07MB3098; 23:eOw1fUHP+bP91hQvpo+4z5Aua7TJl88jZuag6?= =?Windows-1252?Q?il+3l5aSFG7l2slftEr9fq6isYiD7Orf0iAVrotLTX1p3U2sXOsaTrSj?= =?Windows-1252?Q?96YoyYxxXtJupcCmMLNIiiXTHvQnNhwLBkoY3GOCQvQSNS7XULngM8oX?= =?Windows-1252?Q?dUZX4+V7zHR6be5WthKVkKrsRV/96MBhJco5Kh74EZdOHb/rWezMXRdV?= =?Windows-1252?Q?VLJSOpLRJC4qxwn77HakxWVxQkZNxRV0uoCgAaBNxLSFcksHNixvzMT2?= =?Windows-1252?Q?uN6c2AUw8NnJCZLb5AQvYdXhSpnfrVIL8cHibYPd9Dhn9r+gplZK/TpE?= =?Windows-1252?Q?pMmO6lT+nflIR4YSemAHyJBvJ3fFR3UQ5ulDcJ6jlbroeOinrOFnE1pa?= =?Windows-1252?Q?kW2ohr9XDjV2t7f71W4bk2zQs4iNlmNmc3HHM3SD2SlDeXy0SFT50OCO?= =?Windows-1252?Q?LIYMgV+3LCaOVqklH+2pp5YE2aTsxTgtmDYU/MTrLlo3po4/P+syNB5W?= =?Windows-1252?Q?pvpMRDt0T2qanEJNOwYOT6anjxNyN8eyAQSdlx4JCtAeKXyDRF/5AOVl?= =?Windows-1252?Q?LUFWHEGH+WNch1cjV+ZCmWJNfQpN/HhK2QdgzPKIsMKmvy8Aoe5/R8Ma?= =?Windows-1252?Q?y/wQTZ02o3EyXW4OEkxz43ccjCZWsnrRf9mkR1Q1C2uT69VpE96h7l5t?= =?Windows-1252?Q?NSz8C6A9X6+DssCVjjezbODOhFOuxPbx6SdWo9oE14mQPCdNEu3ef2XA?= =?Windows-1252?Q?ZGoJZBRUv7K2Enqbr74ODcj+lGdc8+9mr2YEVpAYJ5I2kc5Li7VmGT5I?= =?Windows-1252?Q?pLtBXVK7QgApAr/0g9DSlwQn6M+KeBmLG3q0z9zUNf7AeLr9G4VYdEKz?= =?Windows-1252?Q?exMAP7Gok2HQ9quHqZTQs61duwDAN0PPI7NeKCCx+tQl1Lzv1yFmKEUo?= =?Windows-1252?Q?EDcz6b8nrRrM66TY0uDV3dOC9xDQmJ3BC90iyn5a2/z269hx8MW1BufM?= =?Windows-1252?Q?JJj71S38kMrYaQSalcu7nChm5iA+PKt3VC95I1iyN7IG5XThhq0rE1Hr?= =?Windows-1252?Q?Gx95q98iVlaFQm+DzI6Vr2xdH81Y9Mn7M1yRUIOCHxjXq2gYjobtaQzH?= =?Windows-1252?Q?8GAOCuoyJq1lfJlOB4Fu09lDwdNWfJz28XtkfaLwg9jZHgxu9UxUKXnH?= =?Windows-1252?Q?x7koohnru5u80JduK8tLgXaE0AvNMHKCPGO/fkAPg7kbvtScSaYL0v8D?= =?Windows-1252?Q?9mKAFwe2+9E6W8nboXGI7Spn8JSlWYGPRUfDz0qXFepg/Vcnjzlhnc34?= =?Windows-1252?Q?YAMQzjMmXzGZh6HUxn9E/dS7BRcUtnkGbAg2bzr5oGmdK9UNOYKvZAIX?= =?Windows-1252?Q?2SxVM2sBejmg0+8NwMZvCyRLPPvYVXasMqbvCgWPdXzdPz4Qx46N8wk6?= =?Windows-1252?Q?y7pbvW55ReFxTK1P9v7nFWsnrdhbSSt5TYEOBp6eg=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; DM5PR07MB3098; 6:4u9VhIsFT78LPibjtyTCpFN+Nu+Wk2vVWea8FZP5xgHlPh8zW7h97mwZjLLW6Kc3oBw0BJRM9LekVcrYhpgRCl0fHO4NL8NQv6vMNgQihnHfo1Jmr5BahXPBARM15Aohyp5owhlNkt/K2c+JSiogMNKcVMIXuObYfj7aw6OsVQZP8EF2aY/Vbj4Y5S2pgZCCQCkHwxhfC3AsGL+hUkLzIxeonWcHZNNCFvN+fM5Bg9j4Wq4ZoxqV05K2ubXjybgkraS1+/roNUcZRSvet+kGu61Me9VV1brHKxwwaWmaQ2Q+i5EUoZJZZouM9jevukbE0wiKHCRY73cvaxU1XPafvQ==; 5:Ld5AUfMMhd4/hWBmMZjVzzm4mKD2xwYzKrFEIIvOMGrwjrvEmkBKRL6xV9LY3ktznp4SJqsuPxvhRXFdNV8sNH7H5ytIYBmgZO0BRImD8GO2CS78BidvXbDYVgyNIzxKi3zUfTNhOzWnUgUgLj5aGA==; 24:7CgWxTwGWWdQwzk4hFKVFRugBd79H1ky1VanwvLs/UE09iBXb3Fpqo1CzwYPmLmqKTkFUEfQA3w22Z2FxSUV2UU6mQlBbbLA9R0rAB2LxbA=; 7:YxZyAYetwzNf2zuj/cRAAB9s6G2xDbmzI+59gkWvWXlw7YRjhxJ68QwS73GFSrvtPPY8s08euUBJ5d55WRHhT9s69tT4QBhqJo+uQu8OuSqVu1ZPWLJ9vGR/qSUtOd+d6QFqCTP/UeLWG/9g9YFb50g3el38417c2JjnsHvrKZtRcQ6R4iLtFiyTrqXJsSuhDaULiZeQ2QbFnhmmBiMj0w3taTdCJFhLZMav2NZ3L9Q= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2017 09:14:06.8631 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM5PR07MB3098 Subject: Re: [dpdk-dev] [PATCH v9 2/9] eal/pci: get iommu class 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: Fri, 06 Oct 2017 09:14:15 -0000 On Friday 06 October 2017 12:54 PM, Thomas Monjalon wrote: > 06/10/2017 05:04, santosh: >> Thomas, >> >> You comment is annoying and infuriating both. >> Patch is their for more than 4month, had enough time for you to comment >> and understand the topic. Thorough review and testing has happened both. >> >> NOTE: You have already delayed this series by one release and >> I'm guessing that you intent to push by one more, if you had such >> mundane question then why not ask before? Make me think that you are >> wasting my time and effort both. > You misunderstand me. > My intent is to push this patch. > A lot of people have reviewed it during this cycle. > I was just looking for wording details in order to ease people > when they will see this abstraction in the code base. > >> On Friday 06 October 2017 05:28 AM, Thomas Monjalon wrote: >> >>> This patch is introducing a new abstraction. >>> It is important to explain it for future readers of this code. >> If you don't know - What is iova? How to program iova? >> purpose of iova then should read and educate your know - how first. >> >> Yes, its is introducing new abstraction, because dpdk from >> ancient days does only one programming mode aka iova=pa. >> >> note:You were still using iova mode as _pa (and didn't care to ask yourself about IOVA!) >> which is one of iova mode too!. >> >> However, IOMMU can also generate _va address too called iova=_va mode.. >> which is also correct/viable/applicable/Okiesh programming mode >> for iommu capable HW like dma for example(Note again,.. AGNOSTIC behavior of iommu). >> >> Now Why dpdk needs to understand IOVA programming philosophy: >> >> Though DPDK was _silenty_ using iova as pa mode but then there >> is a need arise to make mapping mode explicit and for that we need >> abstraction since there wasn't one existed. >> >> Reason: >> Because From last few years,.ONA participants like Cavium, nxp >> added ARM arch support in dpdk and included drivers for their HW.. >> and their hw has use-case (example external mempool), such a way that >> programming those HW in iova as va mode would save cycle in fast path >> (this part, we explained so many-1000 time in series and same understood by reviewer) >> thus its vital to introduce iova infra in dpdk. >> >> Same applicable for intel HW blocks too. Its works for intel too! > I know all of that! > I was just thinking that you could add more explanations somewhere > in the code or the doc. > >>> 20/09/2017 13:23, Santosh Shukla: >>>> +/** >>>> + * IOVA mapping mode. >>>> + */ >>> Please explain what IOVA means and what is the purpose of >>> distinguish the different modes. >>> >> IOVA mapping mode is device aka iommu programming mode by which >> HW(iommu) will generate _pa or _va address accordingly. sending v10 with doc changes. > In this doxygen block, it would be the right place to explain how the > IOVA mode will impact the rest of DPDK. > >>>> +enum rte_iova_mode { >>>> + RTE_IOVA_DC = 0, /* Don't care mode */ >>>> + RTE_IOVA_PA = (1 << 0), >>>> + RTE_IOVA_VA = (1 << 1) >>>> +}; >>> You should explain each value of the enum. >> Aren't naming choice for each member of enum is self-explanatory? >> I don't find logic anymore in your question? are you asking about side commenting? >> if not then IFAIU, you question is basically about what is _pa and _va? if so then >> reader should have little know-how before they intent to do fast-path programming. >> Author can't write whole IOMMU spec for reader sake. Those are minute and mundate info >> incase any user want to program device in _pa or _va. I'm at loss with you question, >> I don;t see logic and it is frustrating to me. You had enough time for all this >> in case you had really cared,, we have series for external PMD and drivers waiting >> for iova infra, I see it a your move nothing bu blocking ONA series progress >> Don;t you trust Reviewer in case you have hard time understaing topic and that >> makese me to ask - Are you willing to accept this feature or not? if not then >> I'm wasting my energy on it. > Santosh, I'm sorry if you don't understand that I was just asking for > a bit more doc. > You could just add something like > /* DMA using physical address */ > /* DMA using virtual address */ in v10. Thanks. > Anyway, if you don't want to add any explanation, it won't prevent > pushing this patch.