From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0069.outbound.protection.outlook.com [104.47.36.69]) by dpdk.org (Postfix) with ESMTP id F0F541B1BB for ; Fri, 6 Oct 2017 05:04:49 +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=H7L27tb0L9TeQCYguotwN+OszWmzTQvqdoZ1GWafKXI=; b=dz4VeVio8a05CcSQ8+0XEUKsQ9p7XGGCNPDuYE+ainZmDVVghwwnNk7XkEGApJC2naM7euPrC1PyIF9oaSAnXOgkQGUFLScb5kFWBKj3S4R+6YxZQRDXN1Ravq9L6I0wLZjDX4587QRgDVeFWJLvppekbfmvFMIHC33vI0NLeL4= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [IPv6:2401:4900:1987:3a7a:c95:1bb1:8a40:6cff] (2401:4900:1987:3a7a:c95:1bb1:8a40:6cff) by MWHPR07MB3104.namprd07.prod.outlook.com (10.172.95.10) 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 03:04:43 +0000 To: Thomas Monjalon References: <20170918104234.9149-1-santosh.shukla@caviumnetworks.com> <20170920112356.17629-1-santosh.shukla@caviumnetworks.com> <20170920112356.17629-3-santosh.shukla@caviumnetworks.com> <5989047.qJ3B3g597f@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 08:34:21 +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: <5989047.qJ3B3g597f@xps> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [2401:4900:1987:3a7a:c95:1bb1:8a40:6cff] X-ClientProxiedBy: BM1PR01CA0092.INDPRD01.PROD.OUTLOOK.COM (10.174.208.160) To MWHPR07MB3104.namprd07.prod.outlook.com (10.172.95.10) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: da1f0c66-c371-42a0-25b9-08d50c67008c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:MWHPR07MB3104; X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3104; 3:H65gFzI/9JooaFQ8yDOSMGMctcdHG/D3fkUh5kvrjAgPfL0R09fZhyLxTE+sXonrAjlX0CuNQNLwiHE2x+BcVXzv2wRikp4anOS/ahV+0L4u4dn8vy/FBV/R2PmYztKZnqajfpjFNPmVl8EyEI3kCHpIO9qCCaGXTCsemCcbuCw7UJ8XFVpZ2xoM5B2SwnFjATmIVHKv8lBNpr/piaeHkMaBO094RBttYEzEDyKEnILjjFqc+prss+uVK9+4LWh2; 25:Jvh1sEpgFTLELIPNDGuDxKsXOuBkyG99tFrt5O+wRtq+FqF65OrUycaguqGfL+ywj+kC5/tj4Fhjd8P9G17b39i3xpTBQNZ2OxBnCCOY5TsXNt61SXaG0pV7AR6QAADW2R76Oes5gtXnfG5ue+aHO90SZU+Ha/cfngS2E7CKVFHCIjEfpKHQnlBqL9Zq+BVwr1P43F1dyPl9B8Xl+UJH1T7DNUT6Xz1B6GdyzYFALdk1AadvmtGxrf/UsRmRF1PgneeQokwKtiqH46wUeLw3dMbP+KqU43YLVyLrk8F1i/lyTljrWvVK1hi13H7aX2oUHYJsf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UYNCick3k3PYDdz0mIXGzvbX9UAkgyPx1x3OSDvzN3HG/x3xAemX3pkbZ5KNpyIIQxmbjGTURAsl+e1Tvw9+t0qeUWfmpYv3GzwtwsfFVKKZqowQ9TAj5IICahPp5KQ48TC0 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)(100000703101)(100105400095)(3002001)(10201501046)(93006095)(6041248)(20161123562025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123560025)(20161123564025)(20161123555025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:MWHPR07MB3104; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:MWHPR07MB3104; X-Forefront-PRVS: 0452022BE1 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6009001)(376002)(346002)(24454002)(377454003)(189002)(199003)(6116002)(81156014)(93886005)(8676002)(83506001)(64126003)(81166006)(33646002)(7416002)(305945005)(4326008)(7736002)(50466002)(65826007)(25786009)(6666003)(47776003)(478600001)(72206003)(6486002)(76176999)(1706002)(8936002)(50986999)(5660300001)(230700001)(65956001)(54356999)(65806001)(189998001)(97736004)(86152003)(8656003)(105586002)(229853002)(316002)(2906002)(2950100002)(53936002)(42882006)(6246003)(106356001)(6916009)(31696002)(36756003)(23746002)(58126008)(31686004)(68736007)(101416001); DIR:OUT; SFP:1101; SCL:1; SRVR:MWHPR07MB3104; H:[IPv6:2401:4900:1987:3a7a:c95:1bb1:8a40:6cff]; 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; MWHPR07MB3104; 23:XWgHojEShSTt8lH0PO7jzU9u3VkqcYMJThtd7?= =?Windows-1252?Q?cwv2UCEP/bRUVJxjztsQczqU/wwbn2kSkX4F+EyMq9+fzOp/jdSDE2iD?= =?Windows-1252?Q?mdQCn6BbYNOmH1Bya6jNLYNqChmEpDWa8h3xNCoI5zy3ITXTW6ZiBdtQ?= =?Windows-1252?Q?/s6H6rLPDdFRYZQYfNvtA1k8n03HdeqLGV+WuwOYdcsQwHdxdQ5ONRs8?= =?Windows-1252?Q?ZHj7NXPz5kF8wRMVS7eVlOAmCIqoocRCeIM0P2GkGa31Btv1dRRh3Bo0?= =?Windows-1252?Q?LHJOziZ3vIfrJYg0ZoE/fb2I6KAzfRRdyhhUfcZGEztAWjR0AscXedln?= =?Windows-1252?Q?7EXYRgBVfODTzS1VWkg22kVjTkjnggVCiGqsUvDlmuNx98b5JLi3ttta?= =?Windows-1252?Q?oTH/psrFa2sVox/e5FoKOQ4Lw6qOqzkCPFtLOdvBatgBHaQy6DBmKxNk?= =?Windows-1252?Q?lr+oJzo2dz8jQfKctJKJjbsjX+dcWi0vrs9j2ohzuxtKc3FCNK+n866p?= =?Windows-1252?Q?+RcyFIBBH8zrsQlq2U/1xQND0SKiOVMo/c3mBnEQQOv35y8n3A6MTUcG?= =?Windows-1252?Q?Jol096FekFYq7QOGs8tvJtO28le6xIdJ2FV0om6xk7N7l5EFwlv8Z1x5?= =?Windows-1252?Q?ppMexugidvcYi6AnWPRsIKB0LbuliVJI3BoS1+0q6Ps6A0aN+nzkU6Cd?= =?Windows-1252?Q?h+NlfB/Fl+/itcHfWNS2g+uDRvi7e2YVgV/AIISrRiO/tFOhASBC+AE3?= =?Windows-1252?Q?/6Ynbf+kg0KbSqujJUFZtV59luNOUD5CwLevCzj5Nf6sZ6OSSpbeBYCx?= =?Windows-1252?Q?FkrllLfPccoWsxo9TnBqVZ/KFwoeowA7dKFKvb8DJ62c/gFptqiAi8T3?= =?Windows-1252?Q?rexrsUNN4yI4wuWvbB/CwHu63n9wZ3A9mtAW9WotQ9tYxyDDK4Pv8m4F?= =?Windows-1252?Q?SSekUXBkasx7MLGTyGJaJGZQy80BJD7cksTY/tjrwpywYEmH6xsKRyta?= =?Windows-1252?Q?+GLWRPOcbhEv79fq+bOCIEDnht2ArTpjcbq33EqFwCFSIR9J15PAl2Ys?= =?Windows-1252?Q?98DK7Y0SKVCjhbnWeGek/MvZJWb1uEBAT7qKXri6L/mJbwsJJ2oFgvZY?= =?Windows-1252?Q?Ni/dWlowdVrSrPMJCk8iTArq8DM17YcRUMMPjr6M0K/OQR41x3NB+9I6?= =?Windows-1252?Q?OzYrQDgugG/qk/I27IDZmMjD9NIuEJ1CDE8JyvD6s+jIP4PyLdCkDqJZ?= =?Windows-1252?Q?n+waTp5VvyJWfZJt/ph4WcNJoGuItCXVRCb/8yIXyrcKjRiSOqKWDSQS?= =?Windows-1252?Q?dCF6pID2Ck3jxhD2cUuRI7PhC0oqFUJFhb8Duww04x1MTNLQjXEo3SaS?= =?Windows-1252?Q?x5HWH6qTQTsVhZRZwilF451m0qyE5gMGiniZEwb47ipaADDkwcd0v8?= =?Windows-1252?Q?=3D?= X-Microsoft-Exchange-Diagnostics: 1; MWHPR07MB3104; 6:/vrKdVXa1PH4TkmXGHVn3229W7jDjscPcFJK8tk89HzzhjuEI2wkzDFty9DsMHmN9lyZJIl/F9Ao1nEDW8aBJWDguCI2GF7YuiW8i+tWS+B3JnhDLPZdouCq8id+OKsgE4Sb3RNKdvRP14pEgcLTY5486sYtD+Omvf6jClvM11EsG6HhgcXwxvBBE7AfyrwBIoeSwoIXHggvJFuijcMVuXtcfMUckKNYiw8meEIAsTKqXUgUKNBLHCjs64PGMhSvlvPtJZzKBTHVltuFmmpY7Ov4iiQVs2BzO1YiGIKhCezJq0NYRuZSbUm8NYBkACSe5ccII0sMb3bWrdpi61NH0Q==; 5:PynreueNSByQsBrkGtfI53e3LFiQ/bZfM3t2ZyG+c0ldI0vVCTXuiDOag+RAeSg4F7OXVTLCitQGFBL+ikmBwz/iYonZ1DBx0gFR4Pk12N4RzeofpZE9R9aLRwF2ItGKyCywQ2XLs5jLosStxyvkQg==; 24:UuYsUtSksmRaT04pMwNBYHkSO/54eCUQFSGFA8DS7yyicELkfUdRtFZJRlGrrjGGoiat2HXi7srYeZjUZa2NFbc4QxIFd2TcJU7wL5agZVk=; 7:f/6BEOBLoiRb2uuMaRvJYe6Jc08AvWNs1SNViOmUZdttzKXZa3H8q68LRK+lZWVbFPLAiSzQF/0f8KGXKeqfzjcOh5Nn8PbFjJlD7JiZx2EUkjGN5mmZ4oqO7NDNz5Y1Dybq9djkfV/jiTSK/pFQixl9Ky1bIrytD13iYfJQ69VNNle8omGhwPn2bHUPYfQTS1iJ1ntpcKqwq6SsknTjFOdv7wyiW5+wpe/J3ByxX4E= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Oct 2017 03:04:43.0798 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: MWHPR07MB3104 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 03:04:50 -0000 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. 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! > 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. >> +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. Thanks.