From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from EUR01-DB5-obe.outbound.protection.outlook.com (mail-db5eur01on0054.outbound.protection.outlook.com [104.47.2.54]) by dpdk.org (Postfix) with ESMTP id C02931B322 for ; Mon, 29 Jan 2018 09:12:19 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=FdFaZXFGjHe8JhbWOnJl0NIiVoBg0Zta4GEI7mwVTQY=; b=slCx18C14nxFQWRvJU2fYXqXlSFwlG4OgjSJ1/ppWtoBz8K/6wfQiQYgFOq5KwsiTbe1gjt5laMDn0TLGBN5l9eCUrMSRv9BFaFHivm4P4ApHNkhcZfUNC4serHYf3iDeADejyzx/xemOKe82td3b5Ty3PZqAJHhZQl8eCtAqYc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=hemant.agrawal@nxp.com; Received: from bf-netperf1.ap.freescale.net (192.88.169.1) by AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Mon, 29 Jan 2018 08:12:16 +0000 From: Hemant Agrawal To: thomas@monjalon.net, dev@dpdk.org Cc: jerin.jacob@caviumnetworks.com, olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com Date: Mon, 29 Jan 2018 13:40:42 +0530 Message-Id: <1517213449-678-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> References: <1516629083-13967-1-git-send-email-hemant.agrawal@nxp.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [192.88.169.1] X-ClientProxiedBy: BM1PR01CA0094.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1::34) To AM2PR04MB0756.eurprd04.prod.outlook.com (2a01:111:e400:8411::16) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 9bfdda44-ca00-41da-e862-08d566f00369 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(4534165)(4627221)(201703031133081)(201702281549075)(48565401081)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:AM2PR04MB0756; X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 3:ENZKZfpnkHMiIUJx4O7luTu8yddCHCrQRnY6sN+pwkKMndz7LT/mwFuz/1HRCLucvxwFwJuXW+YXIrHcgv7Tr+U7GFZE1zSrjXO5D7ZEy2l2U44uoQ4o5lE1YlAzrHVhAfIfdqIwtUd1U9S28X1vHSb5OdeJafTWJqrHAyeFxalCSOsHEBGBZrXhcbTAfH2R0RgZeHF1/iPGryWi5Q9SuUEfodNDSHnt4S3u9bJlC/OKHXmvIXEejM32nDiSLnDZ; 25:b7AKyxp67VhlPHhQRfJMf5s5yu/pvoN5nmPb7hxTW/Ow3ZwVEkK8t0AAIWN2IQ4pLol3+OMtkSK2L6MrxhWsTUgYV1JOlJcUHGVcSvOVXRm9tIQus0I6goUOnkQ42BnYjXIzDdVImBAI1U5XUDxpLTjQN8tlg1qBa5F3AJdCtHAcCxJEkkT8K4+KwgGukTRy1Ler2WggRZzv2aJ6mIkV8ICYI7Jtwdn9AsTf/ZJ0QlIcqdsqDCuyPp3OEuGvr/PKY1Ribtfb8u1hqhRGV6IF4NeRvXPoAGsSkri7B8XCZ8Gr2Y3QLcMxCo5RAae9EB70zJUKBrTEbeOsc9DEl0zwvg==; 31:+xZjrfjmEZoRzgbhd2wOJYulGri4RpW3vUPYoMZiVJzN/mhVVjoxcaL0/lbDamS4z3t8OgDi5u4DXZgvJVUJoEvFdN8hukFvarRjAmbqWq8IA5/i/cGxZrHz+K7WIOGme4D+Gly1ak3rQ/l6tOZXahnINg5p/Dm3+InUNrcwQnkxiX1SiE47Y7tERpGWokzLujLyX0ZA0ENpzsq0nNSQyVTbjMAlGpHAk7CCLMUdJbo= X-MS-TrafficTypeDiagnostic: AM2PR04MB0756: X-Microsoft-Exchange-Diagnostics: 1; AM2PR04MB0756; 20:Pme9WMWz5ETm7suyrvff03lK6PqCk+Nc63PF5OjvnCEq1/3mXB73OlOlL7uMWnd2KaRlbTjIq5Jzig9a6bY/IkNR9oIyQvOhGBfg4e0HOYhf+8h2o9JgD2K+qcQ70bsdjw//Hh6BV/7Y93JCrhLhj8RJUXDsFt/qAXseIlk7f9qIeQYICKda+6z0Fcb7dcNegSd+oyKso6Xe6rouyczWURlC7cD+FbVpbkrCgiqVf3j/DTq1j3/D0kNi4TXwPvhAc8Ko91C06YQCIQeRT5YAgFvff6fGS5duGYgxGYImAE5iyB+9F4iN0nQYi/fubuXorCtSSTh170Sfu8ofquD3xXHI1SNQj6umfbUbCqk73FHE9b9JNQLH+07xzKS7mp7/DVOOpQJmJQQbhOmRVZS1jrEMhp9EJySQsMvboHLSw7FfmNs+PvMeWR7oQQUyfurCgv/jVq7DkgA3aUbcC74C+wP+pct994dWTUR9WL7MYNQEJjHnEgtQU9KFl2fxgeub; 4:zTC4p4wVnYYLyBnKhIcXSNkqq7hnO4bJbAGoBUR/jzJ3RIyadkyXYID7fmUAIOq+Qq2GBrFRND5FJLlQgDaJQdkxjXHEHZ1WrrtMCudDDQlxo81du0BTPTZREJr4PPR7tYieuDUo5kkFrytMhMkyMzCqsW5UbRYELOnRGtlugm6MZh9Nb+zx4/3oh1dYCc6RjxvJH6Te/F8ajshUgssex3E61jWrFYx2qHDL5OLd1HYqKJwdD6ToGLMF5cf8VSRI6w22sj0e3yspfvTqCb8uzBhDkqI8ppvClPA+QGzaw0H9DcK2uNlNVILetNAreDul X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(5005006)(8121501046)(93006095)(93001095)(3231101)(944501161)(3002001)(10201501046)(6055026)(6041288)(20161123564045)(20161123558120)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(6072148)(201708071742011); SRVR:AM2PR04MB0756; BCL:0; PCL:0; RULEID:; SRVR:AM2PR04MB0756; X-Forefront-PRVS: 0567A15835 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(39860400002)(396003)(366004)(376002)(39380400002)(346002)(189003)(199004)(43544003)(5660300001)(6486002)(4326008)(86362001)(16526019)(53376002)(3846002)(105586002)(68736007)(36756003)(6116002)(76176011)(25786009)(59450400001)(6506007)(106356001)(386003)(305945005)(7736002)(51416003)(966005)(52116002)(97736004)(81156014)(81166006)(2906002)(50226002)(8676002)(47776003)(478600001)(8936002)(26005)(66066001)(316002)(16586007)(6306002)(48376002)(6512007)(2950100002)(53936002)(186003)(50466002)(6666003); DIR:OUT; SFP:1101; SCL:1; SRVR:AM2PR04MB0756; H:bf-netperf1.ap.freescale.net; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: nxp.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; AM2PR04MB0756; 23:vlvobdvGhpXirJ9qlPHXrBSJfUqtJMIw03rZBrMCs?= =?us-ascii?Q?1McZySQMZ2jID5eG9VBM27F3lOgKiaDX2/l7SjW1FNlml43KNsdtof7AHNsm?= =?us-ascii?Q?DUmAJEc/Vog9jmHCjWBGQDawu/hiD6Aln0ecgyhcwyhAPJ1/aeaGQAwSZGwM?= =?us-ascii?Q?X8w/fmwQVuWDuK53JKTYAdNFA4Io43cJmbYeEL0DMRxKF8AGbMaL8A4UJA81?= =?us-ascii?Q?P0xSa2J0O3z6YFnlc+g2e8N6mx/feXcX9cas5VCiSuQMKl32gUp98mOJyHAi?= =?us-ascii?Q?H6gI7FfmylVYQpPZUWKJ6GDaUL53hJQxFO4qOXd8F4NXhkXGn9s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Exchange-Diagnostics: 1; AM2PR04MB0756; 6:t36npbCSf32TCutIyHXiFeZWLk6c19vo9SNrkSDaLltXaqfLZaSE+CrbfMHXnQd6u8AhpE3c/TsG6bt4m3H9kU5ETJ/k3XPmTCe0ad+ARg/Bxgph4E7sxDzO5GcRN8KMhGl4auxMd5gLalWyPpaAWdyHVwhTYhX2qLWkONahy358hOkVFWk9Ebcww8QTzaA7IEpn3huspzumcDRAQ6QafBgCwX673VFvWR4dns+EZCSN63VNmVsrF4Yt6pxBg6sniEQq+SVF5KN45trUGU395VCSmYn0qdH1If0Sr1i2vC0CviWS+eKY8CZ8aljUI1kqTZB5Qli+AalXSuvkt7lSMXW9sUdsUdfZqZyl6W6pkdY=; 5:ArBWxCAmStbMAMi9fDXfKjiejWNP5puoxYYD3d8cpgv+vCM8MzWtNCDG4Br3zTlFhY3MoFEOOeV3xNjroPJ0Mm1tAFF6FpKwG5+4aGaaXnFzKhvMZZrQzkmjO2BqnsKZIU51t2EHsWsJRt6zD/mj7142XSSe+wa5ZjESFI0GDQs=; 24:GkjxpM5mqPQwCQj1gNiB9GA53o8+G6QJztJfi8TVtj1pcO5L50McdQVdm7DNw5fK6oAxZOhSXkAQKu5q1NcqFw2KOl3wvGW2Ri1MM/r+8kU=; 7:C+zaR4r+doAYbQTy2V0F5oIcI0yjcsQ37DM88/ToavxliGMFOtglzTh+zIBE7whTaWxeEPkFmwvTn+BopUE3YyOlxxLjFANzLC021E2BPkdKG9aFcMmb8fGGE80E7PtpG8kh4SurRoIyEM+X7NVhCREOsFCU0eF8C4pw1RQHIakp2R/9ApjISNzBFmIC5Yjh4JeYgH4JoVjlyXHhAc+SD8T8HLUulKJQEoaKPPbfKu9kBgYV7Qyooja3A/Uimr0O SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Jan 2018 08:12:16.3407 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9bfdda44-ca00-41da-e862-08d566f00369 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM2PR04MB0756 Subject: [dpdk-dev] [PATCH v7 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, 29 Jan 2018 08:12:19 -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 v7: 1. new APIs as experimental as suggested by Thomas 2. fix patch commit messages. 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: add debug to print preferred mempool ops 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 | 7 +++ 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 | 96 ++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 12 ++++ 20 files changed, 292 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