From patchwork Thu Jan 18 13:26:25 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124952 Delivered-To: patch@linaro.org Received: by 10.46.64.27 with SMTP id n27csp125647lja; Thu, 18 Jan 2018 05:27:50 -0800 (PST) X-Google-Smtp-Source: ACJfBovQRjFYchsMYpWFSXeGHqtnBbaXEvzPZs0az55nxzaV+mnObfXT6g9wmpBL0ZavRtB6UKWX X-Received: by 10.223.160.129 with SMTP id m1mr5936350wrm.119.1516282070383; Thu, 18 Jan 2018 05:27:50 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1516282070; cv=none; d=google.com; s=arc-20160816; b=kEbFvDQHyh16A27QU2OdEltPvrEZU7JlWDE8OfKxjSDasZ3wL217bIPDcV7dhAvi8g w2DDU/4JbnNSvc7YsjEa5zdzZUxAvWQ/0dSxCpnqfDgENtpHTALC9+h8ik6BgKvM/GSk CjiVsbwgGUHfWcs6c/GtHf5Wf8GMg1KFP0lniiz+Nw6u2AJahcpTtYHQRVErBR4GmrtF luHke7zCaVoJB0u3o1M86a3JINQrlEx9ce+YD4S3nV7KbfdgpWIex4Eygfr7xXEn2fuY ddleQkIiD6eOhMv2wFq1bFzvP01ePs0rbFXaFB/x/DzU8ivyCdBoae7iDm+hgF8zrDuw fQhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:list-subscribe:list-help:list-post:list-archive :list-unsubscribe:list-id:precedence:subject:spamdiagnosticmetadata :spamdiagnosticoutput:mime-version:references:in-reply-to:message-id :date:cc:to:from:arc-authentication-results; bh=FQLBMpPN46026NDnvddb22gudq6D6G0uBA/+3/w/Nug=; b=w0FvvXg//08CIcGl2rUsqj+Czn1O2Ny9/BMKrT31kCMtw1J1DKK6yQ0WlGjuxPTc5B ULhbK70F9D41e6g+Y8/qWALScebOoNGRejj4u6ke4SfWSzgeQKecPkiNwJU5QV7O4Q0P dWlGeo5OvI/s/Gzw0mYoSvMjnaX253AxNhsN/8FcpX0oYCeLIfcc7usl4hEbd0Vhvnw8 P4P41A8R2SV/DfVTK/K4+Arylbje/yTTqothpXg0z+bbBL11nQR0HRlWajCVdnGA6GVU DIiSoscaJf1Al35HUZaVd4qWRTkSAql5rC/6FOB8SfG00oEDxKOB3ymc4377ANMuYjjt K5zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from dpdk.org (dpdk.org. [92.243.14.124]) by mx.google.com with ESMTP id j12si6101424wrh.73.2018.01.18.05.27.50; Thu, 18 Jan 2018 05:27:50 -0800 (PST) Received-SPF: pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) client-ip=92.243.14.124; Authentication-Results: mx.google.com; spf=pass (google.com: domain of dev-bounces@dpdk.org designates 92.243.14.124 as permitted sender) smtp.mailfrom=dev-bounces@dpdk.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 074801B2B9; Thu, 18 Jan 2018 14:27:50 +0100 (CET) Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0076.outbound.protection.outlook.com [104.47.32.76]) by dpdk.org (Postfix) with ESMTP id AACF01B1E1 for ; Thu, 18 Jan 2018 14:27:48 +0100 (CET) Received: from CY1PR03CA0020.namprd03.prod.outlook.com (10.174.128.30) by CO2PR03MB2358.namprd03.prod.outlook.com (10.166.93.18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.428.17; Thu, 18 Jan 2018 13:27:46 +0000 Received: from BN1AFFO11FD005.protection.gbl (2a01:111:f400:7c10::126) by CY1PR03CA0020.outlook.office365.com (2603:10b6:600::30) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.428.17 via Frontend Transport; Thu, 18 Jan 2018 13:27:46 +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 BN1AFFO11FD005.mail.protection.outlook.com (10.58.52.65) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 18 Jan 2018 13:27:44 +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 w0IDRdIj028023; Thu, 18 Jan 2018 06:27:40 -0700 From: Hemant Agrawal To: CC: , , Date: Thu, 18 Jan 2018 18:56:25 +0530 Message-ID: <1516281992-6873-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> References: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607556659365101; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(39380400002)(396003)(376002)(39860400002)(346002)(2980300002)(1110001)(1109001)(339900001)(43544003)(189003)(199004)(81166006)(81156014)(68736007)(51416003)(104016004)(36756003)(8676002)(8936002)(47776003)(59450400001)(76176011)(50226002)(53936002)(48376002)(97736004)(77096007)(26005)(2906002)(356003)(6306002)(50466002)(305945005)(966005)(53376002)(54906003)(498600001)(2351001)(16586007)(85426001)(5660300001)(6666003)(2950100002)(105606002)(4326008)(6916009)(316002)(296002)(106466001)(86362001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2358; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1AFFO11FD005; 1:Pd45DJtQHbQyPSbhfhojSt+PuOj6/D3iw4mUum3Xqb4G6nqArepUQM4rsio1m71AcJlpli5zG4R0/71EZDlAQ+nHl9ss9tuhCoMsq9iLZ1fnWG+flig11Kpp9o5cBoRq MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 13814bfe-a796-4657-44ed-08d55e7742e7 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:CO2PR03MB2358; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 3:kcPegr51fb+XOkvIYrpajj07AUNB34AJBxvY+3RamcRKU1s0Cvoj7hg+7UsEawywDjWVrQsTJhw8d5dYXOy2cPNunnE/L4LZKJMTPGITOYlSpDeGMYQcjgnfXL/5st6SkkY3bkW7LHHhfvcUFvY0X45x32RbbnEXA0Aktodo/YzZmMiGo/2BnInNJfvhMTXTZna5jz7ys4XkPcDLJc0La5llu4btBfMDBt3cfb2LtP2SVbJtvRC0Nx5XBYyGt8eTmbU9dKTpVRrwGsD6F9kYXQx49aeQu0l5sCbhQPbkwAWNb/0S+QeJG/rSE/MqL9G+jlPuoNFnhs5Uwf/6zck6E8dfaCkNPDjf9pG8IstKzFw=; 25:1C7S0ZAlxNLNeWhc3C/t3H01zgRD4AEk96jgqQ1lkhEZWfg01ivDPFB8kR3vEnMEL7f8Bq3lPFhErAUkQWyLNESSIR9eHcZPgAjZBt/BrDn4Lcthr/GmwJxzI0Lhqlmdlo/A9GpYoA3paqUR1F2XxDRiViWstaWXL+bKrD/LwpmKzONZTlwPmom0Icy4YJYbFK7CKY8hj67F6M5Ir9FlOX7+c/qy7F3QVgqwcy9cBSXuA4+DhmDRzQRIP9G8qIsB2DkK1Q/fYyisk7BPxOtRaBBnJE6TLmAEs+Y32yslz9b2d1kybe8Z3lRAm7D44BcCbGGHbEKzSE1baHQ02eNn5A== X-MS-TrafficTypeDiagnostic: CO2PR03MB2358: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2358; 31:QvbrjlkcPyRAdveuCyWEaCKj4odk4KBB6Gu5C/HoZWCXu2C4nCNcB2nrEyacGyLioaIDe1dt1uA7fJIRINax9Q7r4fQ3KiiwYPkGGfM7RSXCNtUHjJuJGABye4Lwf5QMNfHRZlSnHqwKzGSnFSNKCKq7U6ritTgBlJE2UmrE0dSJWI5VBKD97//Ols5YMcOCR437bKpRD922nSteT2KPV3hnUBJnOBL9S/Ap7460HIk=; 4:pm/26vWDGzm6hB/5vIYYRL3iCwxHbc8naSVo8LPQM9Pru+0/lGKGI7kRHhurA7RXRZY7Ca6ifiletL6dyuuCTmB04tjbj1hwq9kENtjBA/arlNyIq7hm5aCTHFSj9dJE+mSSdrXn+E1cL5LK5V3Txz2ssvGzN4q/yVzQ+vXndunKzzx/xbd0+657bUOg/ag63WYcnjGr+FSt5j00vGhJl89VaAxUXTUJBCz6YpawR4K48KnkNoEw6Ao4lrtRrGEIRv+0dRck9mgIgrggVGs4f2qx/GloxHmgDOKNVaRfl4snlj3avzduSZeJfA268qbw 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)(944501161)(10201501046)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(20161123559100)(20161123565025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(201708071742011); SRVR:CO2PR03MB2358; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CO2PR03MB2358; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; CO2PR03MB2358; 23:CitDW1LQTbAaFxB6DO8d8ROoMgu9UKIfnTE0N1of8?= r/mLivorfjc/gPDOLBYsUqeOi02nrMmdA7nIxjsmCngaoNR/Wx6Qilcs906zLZCz1pZE5s3oioe2XUZgw8SeQ7ce3AsefxxuJAAwQ1avKht+h+pBAIEXn0S8KDrTWv025rnnPzpnireinvMGt43p13KBzad+bD6oVZF568ao8L2jLuWN6JcSCur8su2c+qCfYdiWslG+oBGifQ5NqhMje2aI01qtym8dg+Tsit1Otpgc3vonUUrej8FTB9J1r+8AZB4OHj6/cBp5ZyaTc7pZiuAX+Oo77r2slMkLsStOO+GXSuzOyi8noYcEak9Jk9qZ91EUZzQCaYlOOsdHBk8jgUCBWPA/Iq1mxTYu0wPJDWmHhe0hUP5EYV6N7hZIw41D7Y4cgnN+emLt2kk3/OQrexk1zbjHUuNSwhF7jPfze0SVBhzWuodIEocJPx8VDA9qXdV9ltg0Ic88rKLG6w5x9wCTbE7tAGVnYaPU/sL98KDu/Ea5eEamveYikBd2IbIiOhrTrw6CsJmFxLeNpWhvhnJRLxlBAijrPBKEEgR3dhFfKsVE6PNxW3ym4e7VLBuTlX2Ofil2PPt8paua8+dU8zp/oeCV14XZIV27wcVYn723UWWY/wIcpr5odhWiQcHEG61pUcliZH9a1QQW6Y7tUsbRw4HnH1wZp10y9kIBeNvneVGCOTxsLsMDhmU2AZYRgT3F1DJNM9aQH2RwZsTPMG74+hIXS2HANYDgeQnT6lWzS4xGRdUAZEbF3UTG5B+rgt/5mU+wQlNU1IgqQ5Qcr8akip+I6E8TEEPI56VcQsLw7XJxX4L/AcSql+88DQoxvtvkfMWOFiVj7aA79x+1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0JLaUb7xlIIGD5ft9MJmoLYJ4/IjD2nOY59QAEL/X2qY9sR02lhvNJgMFWtsP3g7IHkvzucj3xuftxfowmznAGRQlzfF7CgeQ0VA6WtTDRKVM1jBSyVjamfSFcMu/vlEU+xl3ed0cKa05ELYDhuWBgIKPNRfQY9S+Qy5u+1HOJC9p7 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 13:27:44.0182 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 13814bfe-a796-4657-44ed-08d55e7742e7 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: CO2PR03MB2358 Subject: [dpdk-dev] [PATCH v3 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 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. *Discussion points* 1. The command line parsing is done in EAL. So it is better to keep the user defined mempool in internal_config only. APIs are provided to access them from EAL. 2. 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. 3. 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 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 eal: add API to set user default mbuf mempool ops mbuf: add pool ops name selection API helpers mbuf: pktmbuf pool create helper for specific mempool ops dpaa2: register dpaa2 as platform HW mempool on runtime dpaa: register dpaa 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 | 10 +++- lib/librte_eal/common/eal_common_options.c | 2 +- lib/librte_eal/common/eal_internal_cfg.h | 3 +- lib/librte_eal/common/include/rte_eal.h | 9 ++++ lib/librte_eal/linuxapp/eal/eal.c | 10 +++- lib/librte_eal/rte_eal_version.map | 1 + 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 | 68 +++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_pool_ops.h | 87 ++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 11 ++++ 21 files changed, 271 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