From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0074.outbound.protection.outlook.com [104.47.34.74]) by dpdk.org (Postfix) with ESMTP id 923FE1B208 for ; Fri, 19 Jan 2018 17:35:12 +0100 (CET) Received: from BN6PR03CA0073.namprd03.prod.outlook.com (2603:10b6:405:6f::11) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Fri, 19 Jan 2018 16:35:10 +0000 Received: from BY2FFO11FD033.protection.gbl (2a01:111:f400:7c0c::165) by BN6PR03CA0073.outlook.office365.com (2603:10b6:405:6f::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Fri, 19 Jan 2018 16:35:10 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; NXP1.onmicrosoft.com; dkim=none (message not signed) header.d=none;NXP1.onmicrosoft.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 BY2FFO11FD033.mail.protection.outlook.com (10.1.14.218) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Fri, 19 Jan 2018 16:35:09 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0JGZ6a8016753; Fri, 19 Jan 2018 09:35:06 -0700 From: Hemant Agrawal To: CC: , , Date: Fri, 19 Jan 2018 22:03:52 +0530 Message-ID: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> References: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131608533104232179; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(346002)(39380400002)(396003)(376002)(39860400002)(2980300002)(1109001)(1110001)(339900001)(43544003)(189003)(199004)(16586007)(6306002)(2351001)(4326008)(81166006)(8676002)(2906002)(50226002)(106466001)(105606002)(68736007)(53376002)(81156014)(47776003)(5660300001)(8936002)(296002)(26005)(316002)(6666003)(6916009)(36756003)(86362001)(77096007)(54906003)(2950100002)(356003)(53936002)(97736004)(50466002)(104016004)(51416003)(305945005)(85426001)(498600001)(48376002)(966005)(59450400001)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD033; 1:MXp/lMB0wkNCgupFA+L0x5p4nQUHGKIKpytJ1lz0u1jauVdoAMFRxD5X2RcyN2G4wP4L+sTp2BhVA+5d2wvoKr+EXWvdAa5nGzyZehPrCD5aKPfQDeui3aV4MzHLWQpP MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ef88a2a2-aa9b-4ff5-86f3-08d55f5a9b8d X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:wpB2EKIVRFZpBMGyEM1o6vr7vsOI+frQquvjpC72KLU8PYffcTdj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JBMpZlDlsWq9jAUN3uczt3rJMi3ycCvuzQ8TGRQYSeWGfEOB576JiIhkkv+Bs+NorJ5/lKciiY51wfP2ugAYrCDRhMmt5QprYh/Usr5A9Qf/mRvC5gLchg865ElosywN6OSJ8/jOArAVzGDoIp/4DPtD4c0M2Z5aWtY6zp2hQoXpMPMPSsy+33T/z3tCZKXXtCPUGT3T5La X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(93001095)(3231023)(2400080)(944501161)(6055026)(6096035)(20161123559100)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123563025)(20161123565025)(20161123561025)(20161123556025)(201708071742011); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 0557CBAD84 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2366; 23:iuYIXdW9BL6ad1fOFohzx6SndGjH5MxQQECOa0t2G?= =?us-ascii?Q?DbihT0Xqn+LWmPfOvi4eATuXCBhTNZmHoIlSTJhq0KSLztPAdTSXrGvXKsD4?= =?us-ascii?Q?PDQe5VcUil90zxOyaMMSkggsxpK8JAfJWBu0sNb1eivLywA4B6BUbz3b6bu2?= =?us-ascii?Q?uVnlgWL9q36OoetUM7gFfjgtIZbY8N66qjvtpdRQxLuHwlsPYncgwjC1qkyT?= =?us-ascii?Q?j25EN23OU2WQ8T82ntjMDf7nDMQnMX3US6upT5SnOHUm7wFCBxjIMx4EyEMK?= =?us-ascii?Q?y3+swtjamPZvM3ZyhsA2NKK1VoyxHBokGawUM0m0QOPenxTixW0RyEERGHqm?= =?us-ascii?Q?uH1Iezz0+7WZlTfFtR1T1UpnlHNXhlMY2N/5MT2EuBbJ0qUT3BAJaFsYf6/k?= =?us-ascii?Q?phGCmJxkhXjMdyGnjRArqq3IpoLbXVhuJJ1KG4EgJ+xTtxv7l0QxpBkxzx0u?= =?us-ascii?Q?CLryTIuhjtmzG0xmC1VhTFLlidPyVQSOsh+Xju5RkvAAa4SUYqSY8dtEcmjG?= =?us-ascii?Q?QvuWp8qNTXDVAUBjrBbSUwnW0bmhw/vgdnwIzSGFGtMSsphiIrMxI1N262fm?= =?us-ascii?Q?/1NzXyQhwO6amGov6sB+2RT0EMEQqoIE9+o3q/vJ9SCWJiABiEI0A+JbXIAC?= =?us-ascii?Q?CIrbBaa94/HElfuTJNQp965EfGRQvRQ9EiF62fvDhivWteA+248uS3bWaIux?= =?us-ascii?Q?GCDrdWqlLi9kzy/JAapXkIevjYytgtiCoEKFdsqmZTyE4MTISToHBvHLh9tK?= =?us-ascii?Q?pnE2Qvj1YeEDyYkRqASwmfASlnAQDL7VUzlg70GfKenUKC2ugVd6XUKuklSF?= =?us-ascii?Q?l9nckb1LvFIZ91Qs7B0ER55CQrgje5rbOHLZ/cwcMIwviEJjWmvRf3fndoAn?= =?us-ascii?Q?nxsz7yltsWj24rJHhT+tbzngMVuCL3JoWNncIWXy+uXFQTZuHXOKH8gJYsw0?= =?us-ascii?Q?ysTY7o9bcmypM1p9t0B2VN6V+sM/MBrwUbHDtPcM35nTjgAXtKYSSOxe1Sqa?= =?us-ascii?Q?d37/WIpM8v8G7xGqRcBuBtYSsvXPj0kmqGXdlam9ppXtbQ14Tk2HMgeydz2D?= =?us-ascii?Q?OI1uQMfwUGAkBhu1vdaMo7WIpKUmGkWeYGBCUQPUARxZC/iY5Dp+7KbJSefE?= =?us-ascii?Q?obJ2V+GHyA0Tna2R7Jp4mRwRzbmqgdiomevgl8CSl9hZMniE1E2t/sA9AlLe?= =?us-ascii?Q?64jaJu629YMRK8=3D?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 6:np2uTtmvbNiOF/AlzbgGAUJfUyme2Q88uWw705f6dApJOCluRF/swrRAUQ19Z2LM9xBuY01Cv/exSEYRgWdXEVStCdSr2C49/FtW1eNnz15aLPeMWUNjkRgjInn1hbZO+5g2SVuIwkri0tuEG0+6WExpnVe8MOJBzgh4tTWzzjqA49CySk4MlDtxghJ/lICLzvklmyauyFSX2GFK0yKA29DcC/OwLBJzj5z5PKsMgoyMmcdBX9XyhtYjsckttdOylC4Bc8mVovB/9UhAmL2EOTjyphMqiJr7BmJqepKxtqc6mqrfdaY48jYmpuPdSlNXfRby8Siu7lZe56aIhqYoIA8D8g+xuoZmofEMfhR87pA=; 5:dy7Yhkxgf3RtSncraC10xhUul47yogCo6nnFt4bImHajpi9UfPmjkoSzJYCjQHC/5stL7R2EgorBnK8gx566FLFBlHQUp6z4QdIodHcQKR5ds5bHVcH1JH09qzbsoab1EQIzoMNeFM+C/ds/7pU58h8Cc12vChHss1Flj2l7wOA=; 24:GjR8GqCrkANr76RPEbyNqCWaBlt8KtShgRowG4xhRrGTrE4n9GAC1CiSxYZApXPTC0RTZQTpuO1ZZMrvtjGFpe1F11cSbWbCwDvyU8c6Zco=; 7:ns+Th/vJr073t1RGjrJHWqOlNjL83aRB+vtbTB9vkYKGlzgAEBYX9u1SMzTMrSn1Hi9KYixYmS5ab07iVfSWAR31f4rGZ4A5wX14i/rESM9/7DdQF863gtaI2dpKzUQrKZ4gQmAiX7TYxni2X892i1iLlrdcuj5iXLrMC7/3ZCiw+KIGkXyY5JaMeYsOp1vI7ng4aDSDdi1Y6qV0+rgpQWvKIQbumkaxoibSYGyWWLRY6J9TfTrdwmYeCXEn9MPA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Jan 2018 16:35:09.9240 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ef88a2a2-aa9b-4ff5-86f3-08d55f5a9b8d 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: SN2PR03MB2366 Subject: [dpdk-dev] [PATCH v4 0/7] Dynamic HW Mempool Detection Support 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, 19 Jan 2018 16:35:13 -0000 W.r.t the multiple discussions in the past about the ability to dynamically detect the HW mempool support. [1],[2] & [3] This patchset helps in removing the current static mempool selection model and provides a flexible model to select the pktmbuf mempool in more dynamic way. 1) This patchset updates the hw mempool on the basis of device probe()), thus avoiding the need to specify the hw mempool in config file and focing different binaries for diffirent config architectures. 2) Selection of mempool ops though --mbuf-pool-ops-name (cmd line arg) which can overridden the scheme(1) 3) A new best mempool ops selection logic. 4) A new wrapper for the pktmbuf_pool_create helper to take mempool ops name as an argument as well. *Future Discussion points* 1. Platform OPS name is to be registered by the respentive HW. So it is the responsibility of HW to take care of not registering it from secondary process. 2. This logic can be further extended with addition for following patch, which is still under discussion. The ethdev PMD capability exposed through existing rte_eth_dev_pool_ops_supported() to select the update the mempool ops with some "weight" based algorithm like: http://dpdk.org/dev/patchwork/patch/32245/ [1]Multiple Pktmbuf mempool support http://dpdk.org/ml/archives/dev/2017-September/076531.html [2]Allow application set mempool handle http://dpdk.org/ml/archives/dev/2017-June/067022.html Other discussions [3] http://dpdk.org/ml/archives/dev/2017-December/084775.html ------ Changes in v4: 1. Taking care of Olivier's comments 2. Changing the mempool ops name memory to named memzone Changes in v3: 1. Moving the new mbuf APIs to rte_mbuf_pool_ops.h 2. Taking care of comments from Jerin and Olivier 3. Adding memory for platform mempools ops in librte_mbuf Changes in v2: 1. Changed the active mempool to platform mempool 2. Moved all the relavant APIs to librte_mbuf 3. Added pktmbuf_create_pool_specific wrapper in this patch series. Hemant Agrawal (6): eal: prefix mbuf pool ops name with user defined mbuf: maintain user and compile time mempool ops name mbuf: add pool ops name selection API helpers mbuf: pktmbuf pool create helper for specific mempool ops dpaa: register dpaa as platform HW mempool on runtime dpaa2: register dpaa2 as platform HW mempool on runtime Pavan Nikhilesh (1): app/testpmd: set preferred mempool as default pktpool app/test-pmd/testpmd.c | 3 + config/defconfig_arm64-dpaa-linuxapp-gcc | 1 - config/defconfig_arm64-dpaa2-linuxapp-gcc | 1 - drivers/bus/dpaa/dpaa_bus.c | 2 + drivers/bus/dpaa/rte_dpaa_bus.h | 2 + drivers/bus/fslmc/portal/dpaa2_hw_dpbp.c | 3 + drivers/bus/fslmc/portal/dpaa2_hw_pvt.h | 2 + drivers/mempool/dpaa/dpaa_mempool.c | 2 +- drivers/mempool/dpaa2/dpaa2_hw_mempool.c | 2 +- lib/librte_eal/bsdapp/eal/eal.c | 4 +- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_eal/common/eal_internal_cfg.h | 3 +- lib/librte_eal/linuxapp/eal/eal.c | 4 +- lib/librte_mbuf/Makefile | 4 +- lib/librte_mbuf/rte_mbuf.c | 24 +++++-- lib/librte_mbuf/rte_mbuf.h | 42 ++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.c | 100 +++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 90 ++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 ++++ 19 files changed, 284 insertions(+), 18 deletions(-) create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.c create mode 100644 lib/librte_mbuf/rte_mbuf_pool_ops.h -- 2.7.4