From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0049.outbound.protection.outlook.com [104.47.36.49]) by dpdk.org (Postfix) with ESMTP id 014FD2C74 for ; Tue, 28 Mar 2017 11:45:34 +0200 (CEST) Received: from DM2PR03CA0049.namprd03.prod.outlook.com (10.141.96.48) by BLUPR0301MB1956.namprd03.prod.outlook.com (10.164.21.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.977.11; Tue, 28 Mar 2017 09:45:33 +0000 Received: from BY2FFO11FD045.protection.gbl (2a01:111:f400:7c0c::168) by DM2PR03CA0049.outlook.office365.com (2a01:111:e400:2428::48) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14 via Frontend Transport; Tue, 28 Mar 2017 09:45:33 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.com; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.168.50 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.168.50; helo=tx30smr01.am.freescale.net; Received: from tx30smr01.am.freescale.net (192.88.168.50) by BY2FFO11FD045.mail.protection.outlook.com (10.1.15.177) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Tue, 28 Mar 2017 09:45:32 +0000 Received: from [127.0.0.1] (B22586-01.ap.freescale.net [10.232.40.79] (may be forged)) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2S9jOT7031005; Tue, 28 Mar 2017 02:45:29 -0700 To: Olivier Matz , Ferruh Yigit References: <1489754838-1455-1-git-send-email-hemant.agrawal@nxp.com> <1489754838-1455-2-git-send-email-hemant.agrawal@nxp.com> <7d898278-9331-0c72-cabd-9318c6d65f1e@intel.com> <5af16ee7-fdcc-5b03-0897-f0657e8f8e7f@intel.com> <20170324173146.477a5157@platinum> <434e5f68-430b-1676-fed8-3527f25f3081@intel.com> <20170324174246.4d04a21f@platinum> <20170327183052.0fb0614c@platinum> CC: , , From: Hemant Agrawal Message-ID: Date: Tue, 28 Mar 2017 15:15:24 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170327183052.0fb0614c@platinum> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131351679331149733; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(6009001)(336005)(39860400002)(39380400002)(39450400003)(39840400002)(39410400002)(39400400002)(39850400002)(2980300002)(1110001)(1109001)(339900001)(189002)(377454003)(24454002)(199003)(57704003)(9170700003)(105606002)(33646002)(31686004)(106466001)(65806001)(6306002)(93886004)(77096006)(36756003)(230700001)(53546009)(85426001)(356003)(305945005)(83506001)(7246003)(7126002)(8936002)(5660300001)(8676002)(81166006)(104016004)(4326008)(229853002)(2950100002)(6246003)(6666003)(86362001)(47776003)(65956001)(50986999)(966004)(54906002)(8656002)(53376002)(53936002)(38730400002)(54356999)(2906002)(50466002)(23746002)(65826007)(4001350100001)(76176999)(64126003)(31696002)(189998001)(120886001)(42866002); DIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR0301MB1956; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; MX:1; A:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD045; 1:h8PK+V3zKaHNTdL2sy1I1HzRS4oWGDcNAX43vIylxBOQMJdCM+az3eiTaHlPGQaYRm0ToexRI9qO6WGQLWeM9NEBwAhXAKzykiJwZW1jux0Y73Zog3vCg3tmII3YlL2TQDl/fGsse85Z061s82KI8VKG1iVXsFVh7iN2vtZSGAm12YLXpBTcyavXdVA08ylj5Ede4F+JnxfJz6TRJWj4m/cxhuFtCZzrN3WWP9KPJ1+QZbbKbGSRkTpALNcI8jrIrTheSx5QCI1ZP1i+swPMDPHYKy4LQzhtjjqZg3Oe/9THvtLFLZts3xTOoRNd5FijZvg0Ki2SsDnys4aLpJoB23mWBcyQMQVrVA9Sp3GEzoJzhH/uhdEIg8Jxjo2aFY7f9KfxeKw8iXTQg8p8ly42BjjFnbe6uJUkawmvN8kYPmenVFsghZFm0Jb59D4tFJIH5wM6LEgDQyW1GEDL+MHPlA2E24ravYYMt7UBlFIljh1/RUkw0O5j4TU7XAsJMXVy5PAPKACshMzgx9byJ528QW8gaJusZBEBK//fRHDp9IhleVyHqofmJXxCmgFgjuTHYFIgtN9K5hQYlJlHwcOZ53oNTaQNiBW4kxejKhSDdMU= X-MS-Office365-Filtering-Correlation-Id: 2addd8f1-d982-4a4b-27a5-08d475bf2da6 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030255075); SRVR:BLUPR0301MB1956; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1956; 3:46zYWjFvLb2A2aY9pVFCZbO/7f1tj7g0Yi5iOIrcSP+0Sd2ruYeSHv+0kqH13VJHa8aFM01oRIli3zHJVW2bt7mZFRnJzDrpXC7MITg3vaXpvOvPSm7p8dq+rmfO7sXcAmhbK8hQaPjC2/4Ufrh+t0SJX5+FietB/6/ly1kRzFBMdWjDOEz6hfmixA8U0UM5Lqqscyl1MjkQAG600hBt3ys1JOX+kTYTqxa8iZRCctcfTrJnpaOdak8AQW1/cXmmki+RPYdgu4GVRZjCBp3LI/HV4hosBhoT8/RnqKR001Sfe3kbQIkFFNpe5Ecz+Up1AAs80iM1zwS6VlaZUQuMe4c1IJHctCBL0hItHk08pAFe6mOkcNdppfzggR3VC2uXlCKV0fC8rK9YihFM/Fl1hQ==; 25:bYc8LtR6DVH6F8uMmuIC5SqJ39ZBVsK1ZbJD8JopVwWs6WM7AcHqdNLb3bCFYaQ+0JfRuOxusZ8ZsEyALCpMovm/oekEg4CEofCRYkYPkFyD/TPSB9dYPrdIYgp4ludd2ET7brFd6IWSNcCeouOPgd6JvsjMBPQbliYpTXgx88tTRKIRTOFzQWySS8+NbPX8uwFT9PeXKefXGiNd9EZq7T8/urn1WYIqw+EBblHo68X5gqrmxPjsZZ9Y9OpiYTJlHILalVYCz2T0OIotgF0sPl7yrp0om3T710OCuFBmfnqCcTZBIhFo7poxwm1MEwIjJcEtC4lAczKxL9s1zfATUwPumuuGKpo67WESIxggynhSx0mJeE77ta+J6Oz0Y2zDdzt6ZIkFEELdCh3rEvsu0fPPeYHRiK8z3HHrp27McSpzXrWR2J1b+ZCs6hwsKer8nUeZgulpDv/n07cYJJjanQ== X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1956; 31:/gJM+ivJtFYXvoY99ehG6Uj9//Mr/PLSrJZClXKV7aXKvu8vAIAb80ei4bK+kJfiOIJ0nDphJX0Z9sd7o7W1qXU4sQVsp/agzJb7vFHOW7lR0pwxiesNth6Ui2S3wCBYSo/vl+px7uXiKxvmJJP4fsJEAf3FKzTE5ozVS9gTzbzY9zR1bBS8adBc6TTXSmp/JvhK870fYeP/dX2O5hCwius6xGLkVFvvThaX/q+gmZK0nV22rFkqnEkTEW3nEJX2d4feaEEKeXUOjATCGId0+g== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095060)(601004)(2401047)(13015025)(8121501046)(13023025)(13017025)(5005006)(13024025)(13018025)(10201501046)(3002001)(6055026)(6096035)(20161123561025)(20161123559025)(20161123556025)(20161123563025)(20161123565025); SRVR:BLUPR0301MB1956; BCL:0; PCL:0; RULEID:(400006); SRVR:BLUPR0301MB1956; X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1956; 4:CYDRzdhtQGawqgqWbfL89q/CtTGvruO348UQMLw51bEaJyiGWADBiE6+/WgoUPEsZA702HdVsTBPQKBnmCAxufpi7x4fSaJPCm+MNuY4GSzaK9JP95uRDhbzSfOR2+wxoCBkDhe+wJTU5T4Ue3PeOehJCRGNagv7EF8KRijbZTOq9AWj4fcXWzeZ+B6uLp9F1XAhZIrGZuv0eSev8AMOuK05rYP/m6Yb0frmYcJpCd2/6hX6q/i8ezGDttlMNPFCCdIqGEutxZ0Gy+kirotXZREXJXSvIfpZ6I0Jtgke/WYxLOE28ARN26pkyMiB8TQQgWOlcX4tr4kgqWQgO+mMtLBBISGZj+u++XqEL7Bto89tbYPuRzQFu9bNjNnJBp1YlGlPz+vNfRZCZ4c6lXMfyMkLr16gIqguJPs0S8aewymKiKKy/bAkSUUPLWKXeCaWhdZQtF3519qYjMohVEEWYSjuyNd5bU1Zw2ktjCvyOydjmB9gcKi9cHHI/VzP9yaswLQVOmO189UjSxZ7JErA9YcvULrkKW6Cys4Rx4VB8eFEiJ+7UimGfCYQsSr1xgxA8rkMIVCeE4XGstbtGuB5rbzyBG4J2zi7Xi/CyYHvFyfrqrmo0upTSahwRJYm2AqHfkr7Gvfwz1LWkjybsJ2L9t8zDzSpY1Z66T7wXN00KjFMxj4FWwQ19gVbd8fOEqpz9JfLFLO0ou+fP9GaK3kG7Q== X-Forefront-PRVS: 0260457E99 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BLUPR0301MB1956; 23:F0sYE4NsMoBwLVE+BkI3/C9fBKMvI5L/uYO?= =?Windows-1252?Q?tOPkq/YtY2eZ+lXF/Nk0FACwvksKsRtUHPYrOF3M8qabB5ffj9LKGD0A?= =?Windows-1252?Q?AbkBQug9S2qtkdB+4lVd8gK5cBGBD+8vsiDekSucWVPTERJn5I3dNcE9?= =?Windows-1252?Q?IEQ6MbOKHEWL/RY74kRwnbylF5fAFAqx6ObxhmLJwXan+BwEmCHXWVzI?= =?Windows-1252?Q?Y+GSaYIev6XnJeQGprvf6mghAPM+3xKApz+pxtOHxr4DsDgxuYX35bzy?= =?Windows-1252?Q?+SLMuq14gy1/GJ3pKsAJGRB9hlgIbCQe2apgXeeiCgS0T48yaRZhbWd+?= =?Windows-1252?Q?bqO/SwozwCZowYsgFgTqFNK8ViEzcuIJVHoboR1OxYYKv08iKfA2yHMG?= =?Windows-1252?Q?Vt8mrQ8uJWrWkZGNvgQuxmxWiQckXeDaVBA/h8waf2dMUC7DSd4WH1CI?= =?Windows-1252?Q?Ur1DKrYd3p455QK5bOGn5dpCAZ1eGIBCl2bPQ3n+tMFmk8uuwwO3tx1D?= =?Windows-1252?Q?13u0yZa2mRSTnrCgUXWXSn7K1OtmWzB5YDa3ItANJ9hNAK0/zi3cRrNy?= =?Windows-1252?Q?J27q5shj3KgBo5z5UFQsBsor1Mk/6NAk7R/jFo2BlkL/mqpwRkxbnux0?= =?Windows-1252?Q?ySaBErxYWtJIiww06bVu6um30+h1TTPcdaRgTkz/eK3xxJUQkEHPqc9x?= =?Windows-1252?Q?boTf/O7LC+x4AqMofqm0ctSyaiCGDUychOIRjqr5SHrFm/WJoWBB/86i?= =?Windows-1252?Q?TMZZYOOwkIyqNOZRnuIlkKpJW5InISX6m5ry62b5g8sQ059AaY8kEh0s?= =?Windows-1252?Q?bY7xGQXqww0AdkS/5/jcrQLChWICczrosworvYmQZPRtamPHcLXh0vEz?= =?Windows-1252?Q?osAUKzZ13slCrQjGXy17EyW7gadwO+DnnVpgRL/zcOARG91u3yn4n36v?= =?Windows-1252?Q?x5RZCwglgEgJfqmJfALz62KSqBib6AXBvUKdhOyunmXx4B9hDMZJMou4?= =?Windows-1252?Q?i7heJhIY5zX03Z9Zqd6y4iN2pbfIim65w+9UqzMiCh8Mh/EHoaMmhOCx?= =?Windows-1252?Q?7PTExfavU0FVNBid4qU/cV2vFPIFa9Rfmh98n1V4aczYFTdmnQN/qFBi?= =?Windows-1252?Q?/4doF1UI4SkL4v1TwvxVwh7txWiwZ1m29jxJEQfuFKOTUarWmmscLAyU?= =?Windows-1252?Q?tA3E1vJxCzq6VRWOC/tegmxCFGaWbV2CA3dcfnKAfy0bVlCp6Up+2Abx?= =?Windows-1252?Q?vbWQRb0AfAHfQMnRx2hC+1TWr7ITg6KG0ksb8U1rPwgpQ25VDGTrOJpR?= =?Windows-1252?Q?85MvLLwZsYvFoWIKoRMhH9glpdFtRcp398xghniqiZFxlnlsUoDWJ7HK?= =?Windows-1252?Q?GUVrGSbSFAJ5cGLSFH7KMkCkTDbwhNiqi7cLih2WL0PDGdWqtUEIYqoI?= =?Windows-1252?Q?Szy73Ge+69pFnC9ZG7Tcb2zWFessgMbgjjpo+KeowIHyi62JPK45yVfm?= =?Windows-1252?Q?7udzcv+KW3MOGF4i2OLAP6xNJ2ZIltwKnJyuhzDTZUgNmZDr8A6Ob6X5?= =?Windows-1252?Q?Emx+tYs4MJ3/OFqYb2wGih4GxueWqrZQzSnqb/vXE5GYt6suSvfkZ1pe?= =?Windows-1252?Q?4r4nhagUkO2obGoyUq3NqOucnHm2gv/cL4WcPy5b4XP9J/dAPVpqmKFv?= =?Windows-1252?Q?KJcA5Z72/w9MAiNg2BtjE4rsEAPy+3R0GbEIOeqS35DRGYkKksoHCCcL?= =?Windows-1252?Q?GMAJYeJfVKYgO77qmaQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1956; 6:MFpFUNMPRZh1xo81gZh+Wze9trxjNl4F+pDLk0N3Ridfy8yj4m/JdoD8ytvoVsb8mheE3bqyqGtNz2L347XDsvM0lFMRS+r/wdaXvXZpcHBoFk9fY6eKqux5LVBOnFHgAlufde8svhmX7Gsogrf6pB3aRuAc8IcqJHPq5luNuPI+8f3lwSQRIQK2lLyIkubhNQbsuMLYUq0iVzM81BrcDYzNnjqDymhYXT1BNPySgWJuC+LplJwYpYD1KQKpcvn15GlYX7GC8dRZqdmgZWODa1DGnvcfDW6i4nF4lFPBuCgnVM18BzAqwL2q5LMI78GDliAMDMNv1x93cTaBASbRhn7Hrrir/ZZvof1CqRRPP9yjZKDIomPSzrn9IW8mX+PsIjwIpqosip7DlwElgbgehw==; 5:yaPRivQM2esu/pAQT7SZZMnL0bUHa3R4xrNmCA1JB/Fe2yEH++PpMD5d1cS1XBbnfI3+o32yp/y/vpuNchAh+zIfl3XEDAKQBYo/PxE+NtevfRoCD3I6fcCAmcJhQcsjHR+e3MdKlcZGaEWuuw8aeq0Sa/wZoJP6hePAUPNdD9/1GmNZlWqXgmkB3sVySTfk; 24:HsSTQ8SN6W5nEWjfaCeYH0ZKH9U/5Eiy1iNaW8QGStFHd2ouA4xqCh/jYDVvVNG9+vGy+GPaaCB4fExRnL0HmgDsUlVW0EDERMtkHC3D8j0= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BLUPR0301MB1956; 7:9OsdO2MsZjpVCglDjpj6JSG0yKI6NT3dZB1jBz8W4eAb+J4Jnpc8+A08YbtdtMzaM+1vHr/WP/TBCFORgFJ6uSeScOnjS4izsbIsZmD6bIJdUVNybz/AF0QrCVsnLZZ1zY/03XPmjnCq+v57lnJIwH1beht6JGxTTdRh2AWPDl8DrXa7I91QN/kTvVHTTeizgpux4exO8Lu6jKHCewfSiqFFRcBgcuQgZugPUHg9FMQyqHMG7/p9zUjX48E9yZphCCQZji5Q/0ETGfASxY04UPGJWOnRNOjvf3iygCK4FQTAqqqwPyhvdHmCguSkLbIVXJ9kFQT62fc+Ugs7lpQriA== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Mar 2017 09:45:32.8809 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.168.50]; Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: BLUPR0301MB1956 Subject: Re: [dpdk-dev] [PATCH v1] mempool/dpaa2: add DPAA2 hardware offloaded mempool 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, 28 Mar 2017 09:45:35 -0000 Hi Olivier, On 3/27/2017 10:00 PM, Olivier Matz wrote: > Hi Hemant, > > On Fri, 24 Mar 2017 17:42:46 +0100, Olivier Matz wrote: >>>> From high level, I'm still a little puzzled by the amount of references >>>> to mbuf in a mempool handler code, which should theorically handle any >>>> kind of objects. >>>> >>>> Is it planned to support other kind of objects? We do have plan. However, we also have reservations about using hw mempools for non-packet objects. They generally give advantage when working seamlessly with NICs for rx/tx of packets. >>>> Does this driver passes the mempool autotest? We have tested it internally by manually changing the mempool autotest (mempool name from "stack" to "dpaa2"). we still need to figure out about how to pass the default pool name to autotest. >>>> Can the user be aware of these limitations? That opens a new question, Do We need a documentation for drivers/mempools as well. or, for the time being, we can add this to NXP PMD driver limitations? > > Some more comments. > > I think the mempool model as it is today in DPDK does not match your > driver model. > > For instance, the fact that the hardware is able return the mbuf in the > pool by itself makes me think that the mbuf rework patchset [1] can break > your driver. Especially this patch [2], that expects that m->refcnt=1, > m->nb_segs=1 and m->next=NULL when allocating from a pool. > Yes! we will need to give a small patch, once your patch is applied. > - Can this handler can be used with another driver? NXP mempool is specific to NXP hw only. It is designed to work with with NXP DPAA2 type NICs. There is no limitation in using it with any other PCI NIC connected to NXP Board. We do have tested it with ixgbe (82599) interworking with DPAA2 interfaces. > - Can your driver be used with another mempool handler? No, NXP DPAA2 PMD need NXP mempool only - at least for RX packets. In TX, we can send non-NXP DPAA2 pool packets. (The HW will not free them autonomously, but TX confirm will be required.) > - Is the dpaa driver the only driver that would take advantage of > the mempool handler? Will it work with cloned mbufs? > For now, dpaa driver is the only user. We will be sending cloned-mbuf support patches, once the basic driver is up-stream. > Defining a flag like this in your private code should not be done: > > #define MEMPOOL_F_HW_PKT_POOL (1 << ((sizeof(int) * 8) - 1)) > > Nothing prevents to break it if someone touches the generic flags in > mempool. And hope that no other driver does the same :) Yes! I agree. We need to work with you to improve the overall hw mempool support infrastructure: 1. When transmitting packet, the HW need to differentiate between HW supported pool vs non-HW supported pool packets. (Application may choose to have multiple pools of different type). 2. Option to use a different default mempool when used with virtio-net in VM. You shared your opinion & some possible ways a while back. Now, we are seeing hw mempools actually coming to DPDK. So, We need to re-start this discussion. > > Maybe you can do the same without flag, for instance by checking if > (m->pool == pmd->pool)? This may not work, if more than one instance of hw mempool is in use. > > > I think a new mempool handler should pass the mempool tests, or at least > we should add a new API that would describe the capabilities or something > like that (for instance: support mbuf pool only, support multiprocess). > Let me start working on this asap. we will experiment and send some RFCs. > > To conclude, I'm quite reserved. > Well, all the code is in driver/, meaning it does not pollute the rest. Thanks and understood your concerns. > > > Regards, > Olivier > > [1] http://dpdk.org/ml/archives/dev/2017-March/059693.html > [2] http://dpdk.org/dev/patchwork/patch/21602/ >