From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-CO1-obe.outbound.protection.outlook.com (mail-co1nam03on0082.outbound.protection.outlook.com [104.47.40.82]) by dpdk.org (Postfix) with ESMTP id 16512F95E for ; Mon, 27 Mar 2017 06:48:58 +0200 (CEST) Received: from BN3PR03CA0074.namprd03.prod.outlook.com (10.167.1.162) by BN1PR03MB186.namprd03.prod.outlook.com (10.255.200.143) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.991.14; Mon, 27 Mar 2017 04:48:56 +0000 Received: from BN1AFFO11FD044.protection.gbl (2a01:111:f400:7c10::165) by BN3PR03CA0074.outlook.office365.com (2a01:111:e400:7a4d::34) 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; Mon, 27 Mar 2017 04:48:57 +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 BN1AFFO11FD044.mail.protection.outlook.com (10.58.52.191) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.1.977.7 via Frontend Transport; Mon, 27 Mar 2017 04:48:56 +0000 Received: from [10.232.14.39] ([10.232.14.39]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id v2R4mrhX007967; Sun, 26 Mar 2017 21:48:54 -0700 To: Olivier Matz References: <1490004190-16892-1-git-send-email-shreyansh.jain@nxp.com> <20170324172227.5bdfac8c@platinum> CC: , , From: Shreyansh Jain Message-ID: <452b48e9-c94e-954e-6692-94692f456dfb@nxp.com> Date: Mon, 27 Mar 2017 10:24:51 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170324172227.5bdfac8c@platinum> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131350637366521878; (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)(39450400003)(39840400002)(39380400002)(39400400002)(39850400002)(39410400002)(2980300002)(1109001)(1110001)(339900001)(24454002)(199003)(377454003)(189002)(9170700003)(47776003)(2906002)(77096006)(8676002)(81166006)(230700001)(36756003)(85426001)(305945005)(356003)(189998001)(83506001)(5660300001)(65826007)(106466001)(31696002)(64126003)(86362001)(6246003)(76176999)(38730400002)(53936002)(110136004)(50986999)(8656002)(54906002)(8936002)(54356999)(105606002)(33646002)(4001350100001)(2950100002)(23746002)(6916009)(229853002)(6666003)(65956001)(104016004)(4326008)(31686004)(50466002)(65806001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN1PR03MB186; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; MLV:ovrnspm; A:1; MX:1; PTR:InfoDomainNonexistent; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD044; 1:KYAQA2ahhEeKIhAKMgXBQY0QkgS2gVqqB2veSCnE9EinB2vcfdz2StM4w5Rg9AV0g5OqPFUtMfOUWLLfu9kx5wZlVcHxnZJEL08W8yzAReUFla5MlkbZKFX4RoKx6p20vm/Z0EFHZdSZ+KVC3MJZxh+DdrhROL3s/nNDWgJOlpiZfVNKN628ZaatNDpt+Kju9Cn9TAf2gM0m32FJHH1YVbqF8UYFg40yzIBh0BMCCgtHaSGpT/4o4NaIWn9vB3DdiTWH2vim6YoDKbp4qvExRzMluk/jzB/2kYxcRSvBCaXurYEH52SeZYMDVJpvxYsdaKG1d8XhclQuaPN8njd0rxSVn8UFDk6cnEPd2+1ghIXloGnEgS+KUqnTi+WfwSZijT7HrsCuVKfi8IPArle4sFb0FshfzMR6T1MEMADgAKSID5iVQRG0shPRENPzeQ7crckouQeimgS7FOoQa0gzMKzPBJdhndAZEpRNf4V8ZW0L5SP9Yi6ovFPHtWqQ4SNusuhlhSk6Apv7dP8rPXvWef8NCU6mCzemxS/oMGt8yI+WGCv/+FqTaxGO161NG1KW X-MS-Office365-Filtering-Correlation-Id: 73e4ff72-dfc6-422e-4eb4-08d474cc93b5 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(22001);SRVR:BN1PR03MB186; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB186; 3:/vl4Qz/Z3Mnhyj8oTI+P6tukhVuJ5LDnO5T1pcuA7KiSO2fJYtJQpQDkDJuuQWvMDmDRUoWVbtseMmhT7Whho052MnmSlRabJU3M1AICRO73ch+DUAMfTnj4v+WeMPzCQPiEuGhm7UzbuYWMD3wvBu1i/tNa8YcxF5o4kES9VRITaIqx7Xe+tncsV4+3Sd1/LiHLOQK/Q3yrHshFfpMClTgtNi0kooAqwBP4jgt0B4fCHviztSofa5XtvRc0zvhrdg/SdGV5YRv5wk9dLkTvOOIkOQAI7p3omnyDug34K3q4mFcnoRARpJYIh+j0B5wfpzRH5kqrJgIl/4nP+HhEJ9Oc7yE2EKKu9jhaStD4tCg+AY05yDlxwlkjwmeZYqSR; 25:xfDRkJ+SxH4XuN3o/14zp7MgGziexaWUmEusJNF0Lpjxgpxjkd1m1pnyyGe7XDd/i+3F5sAqocPvAj0yutq6AVFvWMFy5FswXkAVtPCy7sdWh6mMWTsxg33UcS30/fuey2zO1TzSWoapCNNJH74sFT1qMhOwVJHVtEwfrTecJWuUShHZgUZM08Iokw1cm/pfZZqFpkoUh83Q3O+1jCD5MLdmfXtpc/t0ZwAmnCOPDvKxS9EdOy9ArDHyI97B5PXJLktP3h1VLo0OqrUntNJZTUA9R/IkbLWGUTwCimMl9IK8kblARJDWqcmCBKZjrsXWzce38OfJc4Noo301rLlPEmJ4Ctzr/QcB2ZeRakFllAMk1Ks0jTgqiONzcoIUh59ggRMBl7SLGdBacPqhVvvVASz3nz/Iguj3iqC4tRa4d7kEntHUAycllzPkjSzbdPkcdoJX7YHLTa1JibDSY+FLtg== X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB186; 31:rfui/KZawLDfizVG6ieMLLGOTZk1AXqu2c68lnldgThoXnoptwRnFJh+PgpbyL+2Y3uD9IheXoR6OA5//3cZLTbhAfHn/pVz8OEyBnoOHWdR8wV3qGyt2ODSQkUrTiEG4tZQeC+Z7Zvc54Qak9NkcjBBQigwNYWzSI2+PUZSAdYFdT5I1j9XLwEyNwD7/Sjsgw+gRTrpN/IHNlpj7Y11F7o8cw6GnZhG9YQ3Hlibnf+B28I/rJVp39N4G76o8Yz/fiUjOhVztQBa1y7lc7rADq1erF4x+YLvfh04iNM1aS8= X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(60795455431006)(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095099)(601004)(2401047)(13023025)(13024025)(5005006)(13017025)(13015025)(13018025)(8121501046)(3002001)(10201501046)(6055026)(6096035)(201703131430039)(201703131433039)(201703131448039)(201703151042039)(20161123563025)(20161123556025)(20161123559025)(20161123561025)(20161123565025); SRVR:BN1PR03MB186; BCL:0; PCL:0; RULEID:(400006); SRVR:BN1PR03MB186; X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB186; 4:68tsLQtHhHda2FYQIl/A68a23sz5+h0X9Q6j/CtUcoY9Lxu3jVwHONXDwwWjzJlJMShmJ/IDlsO8EIrASBq/hUCrLs3idIkoYHJyJYiNZ/9uY3G0cWnnZL0t3wv4Sg4nrTQxRpxtxbX7I9F9ZlPo/lPthC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+aT2aIJrG9CF+h3sHM0NHttbg/65Bfo?= =?Windows-1252?Q?Os9Dvw272pE74wSh7U/MPgBQDjBGrrEZANJ2u4AaxecY1pevec7OCJ1+?= =?Windows-1252?Q?2p+8BfDbUSSCza0DzDwx6tyByiwk33+1Eg2HTzId1/G45vwcWhUK1LNH?= =?Windows-1252?Q?8LMHF/SPllSwsjxCvUxpgHuCi7xhuSYo2aXo3HM2mnWLJJQBNMluB+GA?= =?Windows-1252?Q?Xf4iOZT1CrE7luslmsXU2E8tHpIgrxhVTOgzV06BiAUXuaUgJmVK3R1k?= =?Windows-1252?Q?itONW3tdzjCwD+cC/rho+updHWTDYyBPruzm9lW7e4SKjCHVZIddLGjk?= =?Windows-1252?Q?8FJDNjsyvO4FEZXTecmBW4vTjvSVBPP9SVfdM4KAGwTgJR9Hz/0OOk/b?= =?Windows-1252?Q?xg6U3NwNpteVbKXdAQVclY+JQPWblIu/j53NtatPLk7xVodOUNRS77n2?= =?Windows-1252?Q?KFR+8UZxCy8ILH+XNDUuWt74Ht8RrqjsyEktBNqG4qU9jf4uJ/NOKwrV?= =?Windows-1252?Q?n+v5uZona5LKvCoZ6qBjJurfMY1Lm9VSucj1okkWNZeg9FtrlifmnRbY?= =?Windows-1252?Q?ikWZNvgv3K1702s5T0w4vuBdtJRrALBFgYWWavBH35VPtYn4wOyXjEJ4?= =?Windows-1252?Q?TzqXhWGQ5Ur3+0vvo0iY8jR0djTenxCTmzufRvsc7w/7+RuP/19PUiqx?= =?Windows-1252?Q?nUcBKNvajd/0JxrnvyMdBBtNUHsWvZxu9Y0ytW+neFf8yYS46x2r6g15?= =?Windows-1252?Q?2sPqHHxy33D7YV4CsUVxoVFgLdauZV/6f4Od9ACdMIO+0sCv9MpWBcuO?= =?Windows-1252?Q?WJG2YndzsDkcR+fiAmdmhAs0sPPV4hlrD5OgxXPnbOduI2ZsD0VCMAbA?= =?Windows-1252?Q?NhxJ7qIxNJUXFsKOqXV8O+vt8PQLylcXISX7o2h5IHp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LS17KpH+9NEoTDXxjzKhF+SkjLanO5GhN/CHTRpizf09hrmoyIjLtGNvyRppu34GVMwBSnhIqrv7GQ8L337lHyYHV6bV8wnp2mYkQY9aBoPsZBiL7q2w3I6CR4rKmzfEofaeSEazd5; 24:L00aPgKZ0XahhmozLu1YKtEbF3Kv6ilzeoukyTZ+xSczECjxOgEcJguKgGTTyEi3f0wt/6FJyDygh7Fq+Th7xePCdB7b3kBYv3gByrWQ3C4= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1; BN1PR03MB186; 7:Xo9pHO2WUU91vDu/yI3OWMekkNEOTSFAi/lU1N/9pTA+KgE9q5TS/Jtir9jtrxmetU68S02c5VpLOQTzKdZnG9a4/9zTDeHUbN5jv3YXQqL51vAift6Smm/g9WtGRgx47UftZ8cd0wY3M/fwXBe31alDkieFbM4TQVDWfmEe+0m0r39rHyyEd3/1SAsq7qzvBcn6IRlwo6x7JiM32g6Ie/RhORrts8LEr/SKepGJfidUsRC3p4fjGywuP0Jvxk95qYFVsrtw0qSVYdVvoSSNQtLUwJtmAIVI+k0ME7T69Tx5d7gr9867Xaj9jCDumo+BHGhrCbUoYUn6SSxOxxX2Aw== X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2017 04:48:56.4649 (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: BN1PR03MB186 Subject: Re: [dpdk-dev] [PATCH 1/2] drivers/mempool: add stack mempool handler as driver 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: Mon, 27 Mar 2017 04:48:59 -0000 Hello Olivier, On Friday 24 March 2017 09:52 PM, Olivier Matz wrote: > Hi Shreyansh, > > On Mon, 20 Mar 2017 15:33:09 +0530, Shreyansh Jain wrote: >> CONFIG_RTE_DRIVER_MEMPOOL_STACK option added to common_base. >> Stack mempool handler moved from lib/librte_mempool into drivers/mempool. >> >> With this patch, the Stack mempool handler registration is optional and >> toggled via the configuration file. In case disabled (N), it would imply >> request for creating of mempool would fail. >> >> Signed-off-by: Shreyansh Jain >> --- >> config/common_base | 5 + >> drivers/Makefile | 1 + >> drivers/mempool/Makefile | 36 +++++ >> drivers/mempool/stack/Makefile | 55 ++++++++ >> drivers/mempool/stack/rte_mempool_stack.c | 147 +++++++++++++++++++++ >> .../mempool/stack/rte_mempool_stack_version.map | 4 + >> lib/librte_mempool/Makefile | 1 - >> lib/librte_mempool/rte_mempool_stack.c | 147 --------------------- >> 8 files changed, 248 insertions(+), 148 deletions(-) >> create mode 100644 drivers/mempool/Makefile >> create mode 100644 drivers/mempool/stack/Makefile >> create mode 100644 drivers/mempool/stack/rte_mempool_stack.c >> create mode 100644 drivers/mempool/stack/rte_mempool_stack_version.map >> delete mode 100644 lib/librte_mempool/rte_mempool_stack.c > > > > I tried to pass the mempool autotest, and it issues a segfault. > I think the libraries are missing in rte.app.mk, so no handler is > registered. > > Adding the following code in lib/librte_mempool/rte_mempool_ops.c > fixes the crash. > > ops = rte_mempool_get_ops(mp->ops_index); > + if (ops == NULL || ops->alloc == NULL) > + return -ENOTSUP; > return ops->alloc(mp); > > Now that drivers are not linked to the mempool library, it can > happen that there is no handler. Could you please add this patch in your > patchset? Indeed. I will add this code set as first patch. Thanks for suggestion/fix. > > I also checked that compilation works in shared lib mode. It looks good, > but I think there will be a behavior change if CONFIG_RTE_EAL_PMD_PATH > is empty (default). This option is probably used by distros to indicate > where dpdk plugins are installed, and when it is set, all drivers of > this directory are loaded, so in that case it won't change. > > But when unset, the drivers have to be loaded manually, and with this > change, the mempool driver will have to be loaded with the -d eal option. > Could you please check what occurs in that case? At least see if it > displays a nice error or if it crashes. I suspect it will crash Ok. I will try this and if there is any issue, fix it. > > Also, the MAINTAINERS file should be updated. Yes, that is something I thought of updating but left it out before sending the patch. One confirmation: I assume that maintainers need to be added with "drivers/mempool/ring" and "drivers/mempool/stack" folders. Who should be marked as maintainer - You (because of existing lib/librte_mempool ownership) or I (because I have moved the code from lib/librte_mempool)? I think it would continue to be you but wanted to take your confirmation before adding the lines. > > > Thanks, > Olivier > > - Shreyansh