From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0056.outbound.protection.outlook.com [104.47.37.56]) by dpdk.org (Postfix) with ESMTP id 8010B1B2B2 for ; Sat, 20 Jan 2018 08:25:17 +0100 (CET) Received: from CY4PR03CA0094.namprd03.prod.outlook.com (10.171.242.163) by DM5PR03MB2699.namprd03.prod.outlook.com (10.168.197.137) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Sat, 20 Jan 2018 07:25:15 +0000 Received: from BY2FFO11FD044.protection.gbl (2a01:111:f400:7c0c::191) by CY4PR03CA0094.outlook.office365.com (2603:10b6:910:4d::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Sat, 20 Jan 2018 07:25:15 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) 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.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 BY2FFO11FD044.mail.protection.outlook.com (10.1.14.229) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.428.12 via Frontend Transport; Sat, 20 Jan 2018 07:25:12 +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 w0K6GGgc024888; Fri, 19 Jan 2018 23:16:16 -0700 From: Hemant Agrawal To: CC: , , Date: Sat, 20 Jan 2018 11:45:01 +0530 Message-ID: <1516428908-5430-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> References: <1516379639-25586-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131609067146703152; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(376002)(39860400002)(396003)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(43544003)(199004)(189003)(81166006)(81156014)(2906002)(305945005)(8936002)(356003)(8676002)(50226002)(68736007)(336011)(97736004)(5660300001)(36756003)(50466002)(6916009)(59450400001)(316002)(76176011)(48376002)(51416003)(6666003)(2950100002)(16586007)(54906003)(47776003)(2351001)(86362001)(104016004)(105606002)(106466001)(4326008)(53376002)(107886003)(966005)(53936002)(6306002)(85426001)(498600001)(77096007)(26005)(4743002)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:DM5PR03MB2699; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BY2FFO11FD044; 1:7Cqvkba6rQalICoLHJDH/YtMPzmc5EdZ3PeR7u3+SK2KqRowzKkVp8g2RCQPBIfU/oG5RYmIJy8szdZn78YL1HMl0vXxxuiju1x86loGbFIvEEZO568a8hgvTMsOgQTh MIME-Version: 1.0 Content-Type: text/plain X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: bf6a07d3-130b-4842-84c7-08d55fd6f2e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:DM5PR03MB2699; X-Microsoft-Exchange-Diagnostics: 1; DM5PR03MB2699; 3:yERsXAWaVonPgNn8xwatbstIoX32UpRQQIGdDt5qqTJUeJj0VJ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1aSmB0VlGhhJ3CYiiiAX+L4EGsiVGD9A02J3FRjemdTSLD1vcrl/q0dc5z4NjdiEGRlpkWxwZcDymO/6Y/bK2J9OfXXWLpL5xxQvlguwH9RzlftP1OwQ0x31a+KS41VOl4TZ4RpF66L2gGY/7pDmwyuRiUgLau7cfypuOWhIY1FZGasPHfBk8KS5X4VZ2uBtfaQahZ7waykouwnydn X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(275809806118684); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(93006095)(93001095)(3002001)(3231023)(2400081)(944501161)(10201501046)(6055026)(6096035)(20161123563025)(20161123565025)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(20161123561025)(20161123559100)(201708071742011); SRVR:DM5PR03MB2699; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:DM5PR03MB2699; X-Forefront-PRVS: 0558D3C5AC X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; DM5PR03MB2699; 23:+9vIWgTbH9mUS/ii6/l168VeCqZjYVCpmXTN+s6z4?= =?us-ascii?Q?Q0WUH+ax9kQtcwnvfmIxXoBJgwYrbzt/3rFvwYQqMEIMtv7ka2YAU9qwZdw5?= =?us-ascii?Q?ZSBEUHgYfBe0JxmbemLjbzjeZ7I0mJopsrsCzVcX0gGu1J4sTaNMXHXaHrnC?= =?us-ascii?Q?SoIDkGBwdShVH4o21zfRzWhTgLfh3+zU2M+nWPXukyf2CqI5ktV5rZSTnIOr?= =?us-ascii?Q?gT93MO6qrYedJnkIA5lI9jTGCjChY+KoYYRWHwz2yaRoRqtGhi92U7vWc4kt?= =?us-ascii?Q?BDKCEjRHeW8A5qOnCNiJQ4t63xORda5u+XgL3WQs1/D6E4AndvLapXx7jPk2?= =?us-ascii?Q?x9ukMf23dvJ+H8hHV+/wCHVsyQHVvN1086D/fv0gXOSoHVzN0mP/kj/C7l8A?=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riginalArrivalTime: 20 Jan 2018 07:25:12.4239 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: bf6a07d3-130b-4842-84c7-08d55fd6f2e1 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: DM5PR03MB2699 Subject: [dpdk-dev] [PATCH v5 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: Sat, 20 Jan 2018 07:25:18 -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 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 | 91 ++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 ++++ 20 files changed, 282 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