From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0057.outbound.protection.outlook.com [104.47.41.57]) by dpdk.org (Postfix) with ESMTP id 74B9B4B4B for ; Mon, 22 Jan 2018 16:03:21 +0100 (CET) Received: from BN3PR03CA0109.namprd03.prod.outlook.com (10.174.66.27) by CY1PR03MB2364.namprd03.prod.outlook.com (10.166.207.151) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Mon, 22 Jan 2018 15:03:20 +0000 Received: from BN1AFFO11FD018.protection.gbl (2a01:111:f400:7c10::167) by BN3PR03CA0109.outlook.office365.com (2603:10b6:400:4::27) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Authentication-Results: spf=fail (sender IP is 192.88.158.2) smtp.mailfrom=nxp.com; dpdk.org; dkim=none (message not signed) header.d=none;dpdk.org; dmarc=fail action=none header.from=nxp.com; Received-SPF: Fail (protection.outlook.com: domain of nxp.com does not designate 192.88.158.2 as permitted sender) receiver=protection.outlook.com; client-ip=192.88.158.2; helo=az84smr01.freescale.net; Received: from az84smr01.freescale.net (192.88.158.2) by BN1AFFO11FD018.mail.protection.outlook.com (10.58.52.78) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Mon, 22 Jan 2018 15:03:19 +0000 Received: from bf-netperf1.ap.freescale.net (bf-netperf1.ap.freescale.net [10.232.134.28]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id w0MDqVQN020039; Mon, 22 Jan 2018 06:52:31 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 22 Jan 2018 19:21:16 +0530 Message-ID: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> References: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131611069999544988; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.158.2; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(39860400002)(346002)(396003)(376002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(43544003)(48376002)(966005)(336011)(16586007)(47776003)(54906003)(8676002)(356003)(104016004)(316002)(81156014)(81166006)(4326008)(59450400001)(69596002)(50226002)(76176011)(2906002)(77096007)(2351001)(68736007)(8936002)(105606002)(107886003)(53376002)(51416003)(36756003)(305945005)(106466001)(5660300001)(97736004)(86362001)(53936002)(50466002)(6666003)(85426001)(2950100002)(498600001)(6916009)(26005)(6306002); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR03MB2364; H:az84smr01.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD018; 1:8/ZMKAOT0LI3aS9fgyl9fnDqdOakeFwbgeRzV+iJ1l8rZasPYtHXWv29L4y2NAU28untk0D2EFW2FBpiLfYd8+aOjv52bernd6RvXNK75FTQ5qdwZCCwqGyupm5viGUr MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e03e142f-60f3-4400-ef94-08d561a94638 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CY1PR03MB2364; X-Microsoft-Exchange-Diagnostics: 1; CY1PR03MB2364; 3:Jxkqv3AlMOAPSE0PDaPaAXwBLm3J8kT0Sxgq0vqAAk8ReWO2uTqhjtdY1iomjE1WdvTV9ga4OsA5BF8f2dFaLUW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o0KJeEUsFJx6fkVBF4owb6iwqdwRFnc+Zyg4ASRT4W4xnEpScwtSoUn/ZpFe+SIKuRpXQ7JQfCWLxTNBPyX9X5WLGyBA1tmwtqerE8sB9BjbPU/y+OiycLG4sbpeYsr5jy8gtfNWErQLgLUmY6AgS/xw+XlVc/uFliYS4rpUyj2zXMvMH087gEj5B4wx 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)(3231023)(2400081)(944501161)(93006095)(93001095)(3002001)(10201501046)(6055026)(6096035)(20161123565025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703151042153)(20161123559100)(20161123556025)(20161123561025)(201708071742011); SRVR:CY1PR03MB2364; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY1PR03MB2364; X-Forefront-PRVS: 0560A2214D X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CY1PR03MB2364; 23:ks7TTl6PFEN6hSfjMeJ03dzUD70tR4HX0/bSiyBYZ?= =?us-ascii?Q?/B5GV6SXtm21LYtLSUP1uu7dVXuN5Jn7LFPvsJ8T562TGO+LFETtalQrujdr?= =?us-ascii?Q?157175VHFcVvvHSE2mbVLInUAKk/MqQKo0xtZcmok0SZaR5Ukbp3wb4K2d1Y?= =?us-ascii?Q?p4vL6IIn3UV6KPPY9zsPZAIyhTQYnXLrDiuHvgqLB4L7baPFmuQouuu77Phj?= =?us-ascii?Q?Kb7RIP9SfKOGeAEBRF8qrMg+asLD0YYpBLmbUpgU9Lsutilr/XwbIFykRfqO?= =?us-ascii?Q?j9HsVx2wxZ8+NKfboxlcue7NcYUlzDMa9PffRLvfT4QVm8/RXKfwnyRZsTnr?= =?us-ascii?Q?DVViS+J0vFSseMkxDLtrgaLU//tbnRgQ5qgRGoq3X4CW+1WwA/ViehBnT2KU?= =?us-ascii?Q?lEqLg20nExIzY4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X+jkm81/eCOMJ/rWL8gvQLc0vbr9e333jY/dva9+5sCDvneD16IB+px8bbbIaKWdihhRBPhqYOtk65plFWWi2ckwaEa78jwSWXzJlarXqbDcAr90QgpyJKfcyVP0U2ic8FFq2U15cyKHSV6zRGuw3Nz2IPtMxYmdaqA6I+Zjp94vupvXgC9Q3LGbwP8ir9Tq7HTNWI+TuO0AEi4yOveiz7p04tf4X9JlJ/K2c559hUopyZqafpqfT7En2Mc4gXey31qbdoiDHv1T/e05vV7V4YgLpcQfL13YRA8j5edxHT9PBnnbF7ty8rj3lH/09xvuHKWGmfXoKL2LoaVNvp+gicH39Tl12EGso=; 5:TSpUCxcBEWojqf9hDm0MS+h4/jDD2e+EvBzj6BK2jFh529xvYKE8W6QL/+1aBoulkMo8jenxAxNXPU268hSFiyS1i+owc7t2SuCEb5tCfF7e/F6bMRPvOWzs7mWC3ZIRDgswgZIpR4fDNmkoi33MPDm/tABT2aBWXTEiRrQzRoM=; 24:jrDtRoqVfISCEjf4oLoCmnlQ4shf62CfAhKCBSTnaj7tFEaAvSECvRt/mQaaBCopSwV07dbe5x3SbEfVOiXXEUoovXeAXJy0cPmpexiD9ng=; 7:395uKgfWxKw4albgtAf+JnqYcSE35/qd+Sxd5xatjPS0k1JRsUOC/YUAXcFqTvs9cTrpTQjm6+yNTutKsqYyFhqWn5YZIHJ0k/oi9NFzxbAeGDNqZnjlHk7Q6ivRknWnMs+Wh6RCA5tDzYrdtpx/N4Q9tXJo/sM2nhIeLB42RztpSQeBTD17FuWCD5Xpxfkeo5gjrxOrFZUGMs0xMemg39F8RK0slByQ+5bFwTMgRcyPQ+S2ErNacvJXRgL15K/Y SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2018 15:03:19.5020 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e03e142f-60f3-4400-ef94-08d561a94638 X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e; Ip=[192.88.158.2]; Helo=[az84smr01.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR03MB2364 Subject: [dpdk-dev] [PATCH v6 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: Mon, 22 Jan 2018 15:03:21 -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 v6: 1. Fix compilation issue for patch 1/7 2. Fix return value comment for patch 3/7 Changes in v5: 1. Fix the doxygen API issues 2. remove unnecessary memset. 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 - doc/api/doxy-api-index.md | 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 | 96 ++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 93 +++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 ++++ 20 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