From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0073.outbound.protection.outlook.com [104.47.34.73]) by dpdk.org (Postfix) with ESMTP id 0F521559A for ; Tue, 11 Apr 2017 07:58:36 +0200 (CEST) Received: from BY2PR03CA079.namprd03.prod.outlook.com (10.141.249.52) by CY1PR03MB2283.namprd03.prod.outlook.com (10.166.207.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17; Tue, 11 Apr 2017 05:58:34 +0000 Received: from BN1AFFO11FD047.protection.gbl (2a01:111:f400:7c10::140) by BY2PR03CA079.outlook.office365.com (2a01:111:e400:2c5d::52) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1019.17 via Frontend Transport; Tue, 11 Apr 2017 05:58:34 +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 BN1AFFO11FD047.mail.protection.outlook.com (10.58.53.62) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.1019.14 via Frontend Transport; Tue, 11 Apr 2017 05:58:34 +0000 Received: from [127.0.0.1] (B10814-12.ap.freescale.net [10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v3B5wRHc014034; Mon, 10 Apr 2017 22:58:31 -0700 To: Olivier MATZ References: <1489754838-1455-2-git-send-email-hemant.agrawal@nxp.com> <1491724786-6468-1-git-send-email-hemant.agrawal@nxp.com> <1491724786-6468-2-git-send-email-hemant.agrawal@nxp.com> <20170410215847.704092d2@neon> CC: , , , From: Hemant Agrawal Message-ID: <9977cf0c-e1cf-b235-e199-c5242daa75c2@nxp.com> Date: Tue, 11 Apr 2017 11:28:26 +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: <20170410215847.704092d2@neon> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131363639142715580; (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)(39450400003)(39400400002)(39840400002)(39410400002)(39380400002)(39850400002)(39860400002)(2980300002)(1110001)(1109001)(339900001)(377454003)(24454002)(199003)(189002)(9170700003)(65956001)(47776003)(7126002)(36756003)(7246003)(305945005)(65806001)(65826007)(5660300001)(356003)(4001350100001)(31686004)(85426001)(106466001)(23746002)(2950100002)(104016004)(189998001)(6666003)(229853002)(6916009)(50466002)(83506001)(105606002)(64126003)(53936002)(53546009)(230700001)(77096006)(50986999)(54356999)(76176999)(8936002)(81166006)(8676002)(31696002)(110136004)(120886001)(8656002)(33646002)(4326008)(86362001)(6246003)(2906002)(93886004)(38730400002)(54906002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2283; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD047; 1:Uv4HSjAMgJtiHMTpBIB14pOfpDOyohKEHpWkClHXUgAw8jvi+hqvF1VflUCdycIyU2qggal5nZZ97R6pAN/gQ4UYs1GQ+PxuD+tULGh4VLvi7VhqTHYDv8gLcG4r6/jvT8YERf06Yis0ZSU0KvMVP8329gkVD4Det7b8CUeQfgRWs8qETgnvBsQPWZNiW6FihbuhqcseV4qe4/1sljT2X8UTN+Bz9a+YYWG6X7d1rFS/kReCE6KWWwhvkZ3Ylxx3890vJbGCO9nu6oMQsEiP6dCwSbeUmIF9md03am+VyrpOPoBH7YtlfQq+jE5uKzzzc72oq0z4Fksa7Y5TGc6nBSB/lAO1rkIDbX+O+T8wjgLqd7SSqNLDOUgewxMwnQnWtCYZSuuvcqUjRjyAa0I9lu/GtDRKSqjQgAdiXCRCuXAdSL2Fs2PKoKLqnr1qz1j8Ef3k058UApfWNYwojReAcF6H8A99u3zJonRxoileSDcw+S7gFMnvI6hoRnIe6zVhivdNBNrFXTFXOeVkHe2R+T/GBkRJtTAlAMtxD/oYwkyA8SvfbuWX24Cn2TsDqwyi1heQE78itJ/abkEPP8DaRhGbEUpWfjlzhH5kCrxbz6Hg1/srVrNO91HztGStoKpU X-MS-Office365-Filtering-Correlation-Id: 1d9c3a68-ea38-45b7-af5d-08d4809fc9f5 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(201703131430075)(201703131517081); SRVR:CY1PR03MB2283; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2283; 3:a+qlvebn0LTXrxl5ZRwnmH4aB+BSR3tXkIU/MbnuCStTK0S9Pq3z3Wl/qGNOhOeMVPIKj52FilXC26pAr01QS1IvG0cXgUt3ojOusfz0JDCJKbFj0/k2Xx81J1D5/h9rTWBKXO1Vh6ecnqRmlIGxHT8m/pcZmgJWHehFomN8l6hLKhvqFg/q/8+6x+eiIQ3W8hLZ1cUzxK55HMG/+1sTJep/+6kX9aprsVIv6Kv2uX5xriZ1znmph/6f9ERj/a0um0hdnpCKUX+tO74hSndAskxghuAIuztxO7hxXVltTUfZsY71S3rgEpyGWt4KrCzdN5lV5ewXCSjTMFmdIihtMwiUWOnWwdPxXNzVsxuTGIXci58WDAVBUoY/eAoccyVYWrLVp47+Lw9WwYfHAJYABaGoABx8os6MtsCnxmMJvE5aUVp/Amw3yDGpsBmyHJv5; 25:NbfmSdtUbdZu9ikOtIluznnHYMlRCzChPTNpLHWTRGNLA0CJiu4mNu40+NRO84jiJGklcvL5SZiCLGpG5K0AL6Sm88icxEInaDyQJlK0bJP+r7H0/oZmCsltzwGrfaTiFY8IS3kZjB/x31Hg3U0DcoGIBZsh3Y77Rofz3AFvUv4CEQ2BD1kBS/FrMms47HytmSN9YSsT6H7Gtau04HSPPvyUbCXZOkTA9NKdeWWp8rcp8l27C64PzoXsiXvJ4xfSGH1EqjYkZgAgug7/z87ATeBpnR/DAOjuiXHSDtSnZYzNpOsYqM/PCNf5evTFzE3mbGaKUjrTA7jMp5zHOISoTOGdPM0vaqtmcO7guqTqVovP80w/uyvnYKoe6fcmI57KDtQU5nibJHy2nQW3IPVnf0Rbprw2RTm2ibDYxorH0DYHXU1lYQxbhhpKsJhGmx5q/2ATGSHi/WyKLS+cBDhKxQ== X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2283; 31:n8OJKE9qnGPJTfw/QfKAfxJUa34lH0n5hfCPysEyFsKcZGy6wR41YK5/4UYLgWerYLNZRwEdTeLDQ4wZaL4v0b3D2PXlFYWvGsBWkXrX/qQiGTz9TB4F325E8zgMbaIoVfOjSBDXWhSkbOilxRQPTxN74/igkmP+jdIEFWkCAmbvN/dP/Ovz5HrQI/FFNCmwVDNaL6uON4BgekaavculBGml/+XHLRzVAJ6bkaGwHdzkK4F5bUC88d7bnOxQO573QNS+Il4oQBkj8lYZD+Lu/w== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(601004)(2401047)(8121501046)(13015025)(5005006)(13017025)(13018025)(13024025)(13023025)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123565025)(201703131430075)(201703131441075)(201703131448075)(201703131433075)(201703161259075)(20161123563025)(20161123561025)(20161123556025); SRVR:CY1PR03MB2283; BCL:0; PCL:0; RULEID:(400006); SRVR:CY1PR03MB2283; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2283; 4:VMWE7Nq+2nsz2gV51buM2Ra6f9sCI0TZeCP4Yzz96VDEorUwx+Oc96XUSVx2NRrhYDiMFWBpEw0q9dLTwfRJZnM8efr4H1co7p/ydPyS812UA/a8CmebwLPZRpXGF5GdmccX4+OfQFz2X0luU809W2k4pCbsnv4+mzq2DSUOE7FlRegXPjBP5y1ym+81uTsNIh3d9234kTML/pFaGdFneO9bLyHn1nFReHkbZdJQiVAvFIM2gDbkLAexo8EmtZ6I7D1dDp5zWCSIAou3uY9tppw6nxO5KZ3hHASVnB4fz4W1/Pzu5p5y7M58Qk8feqMrIyNCDi2O0mrf3lRiCJkkOZmcwMG+XU6QtEKTy5UmO+9SCP6KbUmcgKZiN0gA9P52y21D1vgWx+aE24GF7L7mrRblk3H2jUnX4BoxYXAn4gTn1vOcQT65a5IReO7bk9FMmjU29CmCr1rhlWtYnWWd42eWmQ+s5YDPGdBuIdrD+9+SnYg0Kvr/M47JamLhecaecYDsVQ+CXFRh3rb4WBfituv+VkV4/m59vCfZbf23Qgh5MVra/pa0cyDl39TQW2mbBWjt41xgFMSJ7VcIBuKEPws63ll1EtEQvO813s/lgdM1Lip3LT6HhfE+0H9MEneVVoiva6cCw2v+NgDC/MqvRYv5mVmnLnaKxv/PW/+61UUZpB3nihE9YIpsBvB42SkglKaGY0v307Ao03yrF3iuo1V7fjeFQcgfigFqQqPTPp/FscQLHv/aLMsYjiSI/bVFO7b3c3KCnKaM/9fJgirHzU5Xw8F0y8mU44KSo4thP20yzrpQ+z1Cc6tYGLrNVugPchLFoIBdQrtJVv4JHI6nTGs08RFnXJ+I9M13mnpLPKmCv8lGHoxmDbo9yOKegTNP7ziqvCZd4Va+d+FdPohMKhj6FGs49hasRBRSHwZY3bQ= X-Forefront-PRVS: 0274272F87 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY1PR03MB2283; 23:9PQdOhMy/xcq45bB0roX4WQK0gazre41im+31?= =?Windows-1252?Q?qjgDQdjKNVAFj4l7IOQ9z0iqYvKtcY6gthYsjqIBrFJUYw8Cjtfd3GyQ?= =?Windows-1252?Q?45i/Y5PJM/XtFP4ue2HbW6IMKfq/YSNfw5GpHTk0OwcCPlWsVWpKCPRG?= =?Windows-1252?Q?CAYhmlis+LMB8KBX4srOM2pJSmCZIW8mG7b9WCplXCq66XirAIYZ5t2v?= =?Windows-1252?Q?TUCDoEIhEKf095GzJv/clUUqOF4GHgc/k4iB7cfKS3hQ6bDmthGCSTEN?= =?Windows-1252?Q?46dwbRVbdbPXvL5qqGJf8CWrNsPJ9pZMpsyIv4FyrtrhHPu9gsUeiMRJ?= =?Windows-1252?Q?BHyHmj4CDtPMKunKq2O/gBrLiODk+BXRvPiTWO2V2QqQKmp3AIB6ji7p?= =?Windows-1252?Q?QrajnO+MpK26kHShAHKh/022CABFJzRDaTbDmMQO2mGZVpvaIi6krn7I?= =?Windows-1252?Q?RuP06OGzngK2dOlglfSDGlZdYBz28TCVmoJGQB5DJVLhPNUrVdHSVX7N?= =?Windows-1252?Q?QxVaqIIWQKMHyL9RZmEXpSzZFaoUVdE19NzRhZr4HEVI6pW6yVGlguSw?= =?Windows-1252?Q?dbNuXt1wuywQgitt3CMjTeGx6qK37RfOhUlUU1GtjI9jIsShqycoN2kg?= =?Windows-1252?Q?dlMkcTQ4sxdIFgCUmihCtkYmKGtr7/PbH3LxWP/zm+ZEH+DVEAF5Bke0?= =?Windows-1252?Q?8cYsLS1hS6cVbFmM6Cti43AoEBunw95+BCoOFUqm+1GXYQEWfkXGDY0+?= =?Windows-1252?Q?RGnCmEYm7xzaDAT+t1rSV14BF2cL80567MDoyOUSrh6JVv7WDatcK0uB?= =?Windows-1252?Q?HDWhJIoxDk5GKyj77cJSu/0CuI+bLytzbUI/rzAQHkYK+r68O+7FOEA7?= =?Windows-1252?Q?kcAWw4qv7fZY14DfXhFUz3EsMK/emPd6C/TPvToQA6C6EzZk7vdEW9/V?= =?Windows-1252?Q?G1vCQwRAS8uFTf/ZMPlCKzn488RqknzE7bxCV8fW+mwxG6zyzvaY9Gc8?= =?Windows-1252?Q?hiihdgDdGRK1R8Tzdf9kQ+yuMgFXItw8B3NLwFUcmo9hA7PtCotdvdig?= =?Windows-1252?Q?5VPLN1RepMWvYNwJx1ehxDInd1Ec6Kbb/N4MsphysH/G3PL4Q4QqyIw4?= =?Windows-1252?Q?yCpWEcJIyXw1IVBCemgIJsITa1eEhlHEFPmCJyewKKLzk6PDeBb4V7pw?= =?Windows-1252?Q?kWIh8p8jaxFjHEz2TiUtWbLP2bNPJ7e/Q2UMO601T8sEoDtZRKkG8QkP?= =?Windows-1252?Q?NaaxBv/hAdZMx33ULhgoxWZgvwmrMH7BgyEsHrpCVeDfo7rvChQYfsnR?= =?Windows-1252?Q?JJu3Q/oX0UPp+SVGD7P+Hp7pfI7Y9vXIzkJHgZTrcoP5L+znmBVi1c8P?= =?Windows-1252?Q?idi1crLtdG/F8W2D5B0FtlDfxtRoJ4T9knXmyhbpqekXGdYJvAZvsb/t?= =?Windows-1252?Q?t2gB9xVtcg+U30F8qKPrFCTjxjq2PsuKJKLo/kPccB7/zZ8Bm9Jzkqau?= =?Windows-1252?Q?0pwRiaWOIg0ZToEoUj1aCe3dx62fgCpFXzJcEQZJzSUPx+97s72oiWYc?= =?Windows-1252?Q?mh4OVSwZ2udLh56bTjiH+dD9ScJb7wmJuSwL4j3JDENQvsGKfnq0jFkI?= =?Windows-1252?Q?AMj4U+RnUcSiCRMDn3yIpfFo8Gyk/abBpciaXx05DLk2z4CeTZp9vAdE?= =?Windows-1252?Q?KBKRV83GQ=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2283; 6:/6Yu1G3ZECONy9sr8tga93g0Uv4N7VgQYUWEF0D5cVt3KJDSiLAsDFXReV0wccXwYExPYoghBUeyzhLfq20pnP9LP8CwNE5k8fcsIs2KmnX5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Ac5ye/LorGLfe2uPDG/o6HHJSfl7PmSrJMpjwJEuyzN5Qfv9Dgxx5EMhBeg== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Apr 2017 05:58:34.0219 (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: CY1PR03MB2283 Subject: Re: [dpdk-dev] [PATCH v2] 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, 11 Apr 2017 05:58:37 -0000 Hi Olivier, On 4/11/2017 1:28 AM, Olivier MATZ wrote: > Hi Hemant, > > On Sun, 9 Apr 2017 13:29:46 +0530 > Hemant Agrawal wrote: > >> DPAA2 Hardware Mempool handlers allow enqueue/dequeue from NXP's >> QBMAN hardware block. >> CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS is set to 'dpaa2', if the pool >> is enabled. >> >> This memory pool currently supports packet mbuf type blocks only. >> >> Signed-off-by: Hemant Agrawal > > [...] > > >> --- a/drivers/bus/Makefile >> +++ b/drivers/bus/Makefile >> @@ -33,6 +33,10 @@ include $(RTE_SDK)/mk/rte.vars.mk >> >> core-libs := librte_eal librte_mbuf librte_mempool librte_ring librte_ether >> >> +ifeq ($(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL),y) >> +CONFIG_RTE_LIBRTE_FSLMC_BUS = $(CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL) >> +endif >> + >> DIRS-$(CONFIG_RTE_LIBRTE_FSLMC_BUS) += fslmc >> DEPDIRS-fslmc = ${core-libs} >> > > What's the purpose of this? > Not sure we are allowed to modify the configs in the Makefiles. DPAA2_MEMPOOL will not work without the DPAA2 mempool hw instance detected on FSLMC_BUS. So, it is required that if you are enabling DPAA2_MEMPOOL, FSLMC_BUS is to be enabled. Currently the config structure do not provide such dependency definitions. This was done based on the suggestions on the initial patches from Ferruh and Jerin. >> + ret = dpbp_get_attributes(&avail_dpbp->dpbp, CMD_PRI_LOW, >> + avail_dpbp->token, &dpbp_attr); >> + if (ret != 0) { >> + PMD_INIT_LOG(ERR, "Resource read failure with" >> + " err code: %d\n", ret); >> + p_ret = ret; >> + ret = dpbp_disable(&avail_dpbp->dpbp, CMD_PRI_LOW, >> + avail_dpbp->token); >> + return p_ret; >> + } >> + >> + /* Allocate the bp_list which will be added into global_bp_list */ >> + bp_list = (struct dpaa2_bp_list *)malloc(sizeof(struct dpaa2_bp_list)); >> + if (!bp_list) { >> + PMD_INIT_LOG(ERR, "No heap memory available"); >> + return -ENOMEM; >> + } >> + > > I think the cast is not needed. > Are you sure you want to use malloc() and not rte_malloc()? It would be in > hugepages. > Yes! you are right, cast is not required and rte_malloc will be better than malloc. > [...] > >> >> > > > I still have some concerns about the fact that the mempool handler assumes that > the objects are necessarily mbufs. I guess for this reason it does not pass > mempool autotests? > Based on some of your previous suggestion, I have some thoughts to address it, but it will be longer term. 1. add some kind of capability APIs in mempool 2. Or, indicate to mempool to differentiate between mbuf pool vs non-mbuf pool. I will initiate discussions on these topics. > We should probably move forward and let it go in 17.05, but this is something > that should be enhanced in my opinion. > Thanks for your valued suggestions and reviews. Yes! Once the basic stuff in in the 17.05, we will start working on making it more generic. > Regards, > Olivier > >