From patchwork Mon Jan 15 06:11:09 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Hemant Agrawal X-Patchwork-Id: 124469 Delivered-To: patch@linaro.org Received: by 10.46.64.148 with SMTP id r20csp568574lje; Sun, 14 Jan 2018 22:12:29 -0800 (PST) X-Google-Smtp-Source: ACJfBotV6Ybqkhb4iIavEbSDfd0+pSu6jI3mHgUoDWJgmTRTGLtLo6+iJRN4X05eTEjrYsWZ5pFN X-Received: by 10.80.219.1 with SMTP id o1mr510062edk.301.1515996749914; Sun, 14 Jan 2018 22:12:29 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1515996749; cv=none; d=google.com; s=arc-20160816; b=sxJKwUgT0IFOj+yN4H2kdarUjWk1CVLEzF55kMvHYYG/LaMW+hG4U+YOtmst54xeIv sXNx6tJcZmoadmPqBfXstvn/KimpQ2xt+YfI2CgcKE90/4FNYu9jlqQmK4LT6QqLsmEK zzSkDbsSh3x0V6ORM2IuANdr9MD9K5aW2riRj4I0Oja1mNkF+WFybBNi62Z+WesUDUp6 4PbbiL3NBvA/pIJ1eYiViO1G0jpsemy7fAnX3va2kn5/gxP2U0i2dG3cCNdSHU7F633F f7wjBv1sMOsdkf/wthA7xMjQUz5pxdcDWmYpVbhqiWBTwfOk4qSFV+wo2/SJdlyEBHTy MghA== 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=CnHnlbZ8f61nXHF/mZRhXW34x+mO8GhCO8EZrou5L6w=; b=yMR83aHueziYkG3G7aeSXpsp6dEsTkakS4xoEniAlWD+mx3Fb7LxwyGq8IjOZGq/HC C66nVuTXETu748GK8YEutVK3Tm4Rcb129NSGZ++tubb2wiJnNvmsJU5KLzWAvqDbSyle FYJBC5SX9ElOa3f3uN2dPr7aQq7YCWE3x+3UrXusjbjzt/kH6+RramttHy3SwHId9o2+ qqsw0xvSD91plUV4zHJIsaFansTMPth6ChxhDOaYUgPfz0ApPKrFLbHGT35IQRqclJ6o x60L1+02BItnbVPENmf2GfVGKIde1Ls7+/+SdHJxHonoG19sbINPxZ1EBII3DgXLXKJL 5tOw== 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 c10si87896edf.457.2018.01.14.22.12.29; Sun, 14 Jan 2018 22:12:29 -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 871932C6E; Mon, 15 Jan 2018 07:12:28 +0100 (CET) Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0080.outbound.protection.outlook.com [104.47.34.80]) by dpdk.org (Postfix) with ESMTP id 1B9262C57 for ; Mon, 15 Jan 2018 07:12:26 +0100 (CET) Received: from BLUPR0301CA0023.namprd03.prod.outlook.com (2a01:111:e400:5259::33) by SN2PR03MB2367.namprd03.prod.outlook.com (2603:10b6:804:e::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Mon, 15 Jan 2018 06:12:24 +0000 Received: from BL2FFO11FD036.protection.gbl (2a01:111:f400:7c09::129) by BLUPR0301CA0023.outlook.office365.com (2a01:111:e400:5259::33) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.407.7 via Frontend Transport; Mon, 15 Jan 2018 06:12:24 +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 BL2FFO11FD036.mail.protection.outlook.com (10.173.161.132) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Mon, 15 Jan 2018 06:12:23 +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 w0F6CKAE011776; Sun, 14 Jan 2018 23:12:21 -0700 From: Hemant Agrawal To: CC: , , Date: Mon, 15 Jan 2018 11:41:09 +0530 Message-ID: <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> X-EOPAttributedMessage: 0 X-Matching-Connectors: 131604703441504103; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(396003)(376002)(39860400002)(39380400002)(346002)(2980300002)(1110001)(1109001)(339900001)(189003)(199004)(356003)(50226002)(104016004)(8936002)(6916009)(77096006)(16586007)(2950100002)(81156014)(59450400001)(81166006)(36756003)(51416003)(2906002)(54906003)(85426001)(53376002)(76176011)(2351001)(6306002)(86362001)(68736007)(316002)(296002)(47776003)(48376002)(8676002)(105606002)(5660300001)(53936002)(498600001)(106466001)(97736004)(966005)(6666003)(305945005)(50466002)(4326008); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2367; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD036; 1:Yv5UFkhWUmxk+xl0jVcbZgY1DqXt2v3asxSWz7nSSAk2g0GC7vBpYKWh1Cd666MqgdJd30+xq+sLgolGBYKSO0VepfWKhnIR8nPTK+LYQQM9+6lBuW5RtFXERWBEsEse MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: cd353760-eee2-4263-c767-08d55bdef1dd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2367; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 3:MEkLDykm76vM/TOvBVdF0xgXyG0nLkIwYzQIR6aWbBWpLHKJWUn731YfLWuOp/HM5UK2aeIMdq9alwO/gaEILtj2RTxCqabTb66Ibfvzfre/kY5g64nOKG/4pVcQtM9fwiP/gojOISPaY0J9aMDMyCc3orrzoL4yp1EI9yqhz4fKUS1L99Rk0YeMNTMcjkFKtcqZiv+sNni1l40Av0TH4wAAwHXaEzfAOCnZtwM6U95ZmN4Gi05RK3zUCzKqJMVmo8F6u4hUc4KYePLlnBkyOoTHpyIGzs+Ppbim2dyLdy4gSI70Bt4C0vl2Xi+BWIEE56BqOEM5YcTv/di2G1rotruGthKLDnOkzHjA3w3wJ7w=; 25:PjEXRlj2I5AOfPT+dhj+bmbHH1Q7wCfHfeN7wYLNJHli9ZmRy/u9wvJgMzTv/olO9vSUiFcZSWxzQXpYPtvFtZMfMz8UoeLHZuMDUlWPqF/EL30lIL7zKGfFHeDyRA405xID9LceerCTUNX1dZirpsnuo9VpfU9i3N7DJdrEXgHffijiUuukBkHrAaMcLsvPEcZ1YMJ6d23yRfCcf65l+mTCkBjjHon803t2rf9FvS8NKhhKppp5r6YcCXMelqv+qCEz6iNGhUWj3zKfLKz1Dv2fP2md2ktIVW4aEHD7y4pWyo6+Rq7gRYZHssgj/PUxMSMu5W0VyfFYrTc+Do0jyg== X-MS-TrafficTypeDiagnostic: SN2PR03MB2367: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2367; 31:Rr5hGUTDb6Du0tGWTV2Grt9XIV5pnrhQbAj48bAFQJCnWnZg+pWBa4V7rhBhXHla93lWP5ZMgOXn2WTcZjV1c1Keodad1A/Z/03xde3T4SXk0bVFqsN4jmwb746oDiQQnsLX+uwvfA439qTrigwI5FSRhmGMCiLqGYKtR8nAyLCJMkFGhz/uhxVVW41Gos41baAdrVlK9oW+eM9o/ML7u2UoouZUomFaU5eytmxtXO0=; 4:9CQkvt927R6pgSD3T8bOUfyxZnrgHdvLmkYPuTqDitLE6XW44YEAk9Qyse4zhCkQhFrHYuBr+w59cAOyNCRkwQOf7weFZoPEFSe6VILWVg4CTNZZLcNSXsbsq6FORinW07aDvvBHvs7BR16Ddu8LprWLVT/3qtLiBijVnsX4IddLfZAL//21SJT0vX0J00xApz/OlyVIBwvDogrMP2ml2IeP5sTf0HvxnUDCT5VbKVGUMyMsq7vinQ5I5VkjXKDs6wgJceecbQYLx/ndgY0+6A== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231023)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(20161123559100)(20161123565025)(20161123563025)(20161123561025)(201703131430075)(201703131520075)(201703131448075)(201703131433075)(201703151042153)(20161123556025)(201708071742011); SRVR:SN2PR03MB2367; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2367; X-Forefront-PRVS: 0553CBB77A X-Microsoft-Exchange-Diagnostics: =?us-ascii?Q?1; SN2PR03MB2367; 23:+yWo96g0QcS1REd7hP+95Tf8SQZbwme3OpH4Or44v?= RPYojKPrrdYVchu82hhrFWddcX0I2sxLGlvtnnnUFjpnPx+qAHaqhkd1JlGNEI7Q4hR4l633SmFVCiemCG2qxMqdpSkKr9blZlKXQHuGyV6kh8ZSL0yqXSLyxO0JQNhiaeMzotWc9QiDJropn8pw5ytJ564Pd1ESBj44/SUJmtGr4gZFCi3BHcUc8LUb+dAmLyJKbbUWaq32vU3xscTqjQ7CFyuA0BP+j0o01tTgWtt5RjzviByPiX7u+KJQ/w4NBa+u6fDl0BZHHUh2xfhfMa9/wR/abEcY7HVcsDOFeUXtzuXXyw+OeyP9cmGz8mMKuvHHVU9VOuoBqx3Gr5Qsw3oGgy6zzGttujFs7DMznT7WjfO/OjmWQfzCKY4uE1qIUnU16Lp9j1HKUAezexyZL7zhYiYeD9uDkgcJ0M0s3EiQtchwP0cw4isbzffZrncEXAGJuxF0+asQ8YJ7wMpNW2MsUuRLjuUpcDwXQImFXw2Et1M41Dp3kXPPCwA3IQq0NmyX1OIW4kizTfkx6NiFQRq4/zKle4JX6iU8r1ay1Lqy32vzPnOa4TJyrikMJ+dmQeKF9Mof+BmRcS3pQ/xfXK7xuodohGodKGgyx5qq+fbETBKGkb8BpLNsO2h+YqhmhmDlpgmJFw53+zufcUzxehTdqf1poClc5FiMvfBVEOpOMxwKEnYSeoYcP7fVwzOF/OYqTHc0O2JiVs64q53jhHd62xK9nilJDpIxC0AO0rXg/Sv96AJuIBL7ST01oPOIPMbWkzM3/sC8fgpa9UW3cayA1fPQ+kQJTc58fb0pwNU6egatpD2vLPU5ockJ/QP0SHQqYSGhR+pmwcUN8SVWwiAr4jdjtjrqzn/cuzly8op96s3fLjt+4usr/qjTe8O1oucvz2/Q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yF9qkBhWRk3h4fkOJ3ncxc2TApJCENaVO3r0r7Z2u9+gpQYuyMAcHsDu0AEgFzV9ey9YiwgQoaAy SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 15 Jan 2018 06:12:23.9944 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cd353760-eee2-4263-c767-08d55bdef1dd 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: SN2PR03MB2367 Subject: [dpdk-dev] [PATCH v2 0/5] 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. *Limitations and open points* It was suggested to add all APIs in librte_mbuf, currently internal_config is storing the mempool_ops names. So internal_config is exported in this patchset. An alternate would be to keep these APIs in eal only and access them indirectly from librte_mbuf. Moreover, 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 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 (5): eal: prefix mbuf pool ops name with user defined eal: add platform mempool ops name in internal config mbuf: support register mempool Hw ops name APIs mbuf: pktmbuf pool create helper for specific mempool ops mbuf: add user command line config mempools ops API doc/guides/rel_notes/deprecation.rst | 7 +++ lib/librte_eal/bsdapp/eal/eal.c | 4 +- lib/librte_eal/common/eal_common_options.c | 3 +- lib/librte_eal/common/eal_internal_cfg.h | 5 ++- lib/librte_eal/linuxapp/eal/eal.c | 4 +- lib/librte_eal/rte_eal_version.map | 1 + lib/librte_mbuf/Makefile | 1 + lib/librte_mbuf/rte_mbuf.c | 67 ++++++++++++++++++++++++--- lib/librte_mbuf/rte_mbuf.h | 72 ++++++++++++++++++++++++++++++ lib/librte_mbuf/rte_mbuf_version.map | 10 +++++ 10 files changed, 162 insertions(+), 12 deletions(-) -- 2.7.4