From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0064.outbound.protection.outlook.com [104.47.34.64]) by dpdk.org (Postfix) with ESMTP id 0EA6E1B53 for ; Thu, 28 Dec 2017 13:08:03 +0100 (CET) Received: from CY4PR03CA0075.namprd03.prod.outlook.com (2603:10b6:910:4d::16) by SN2PR03MB2366.namprd03.prod.outlook.com (2603:10b6:804:e::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.366.8; Thu, 28 Dec 2017 12:08:02 +0000 Received: from BL2FFO11OLC007.protection.gbl (2a01:111:f400:7c09::125) by CY4PR03CA0075.outlook.office365.com (2603:10b6:910:4d::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.366.8 via Frontend Transport; Thu, 28 Dec 2017 12:08:02 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; 6wind.com; dkim=none (message not signed) header.d=none;6wind.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 BL2FFO11OLC007.mail.protection.outlook.com (10.173.160.142) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.345.12 via Frontend Transport; Thu, 28 Dec 2017 12:07:41 +0000 Received: from [10.232.133.65] ([10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBSC7wd3018240; Thu, 28 Dec 2017 05:07:59 -0700 To: Olivier MATZ References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1513333483-4372-2-git-send-email-hemant.agrawal@nxp.com> <20171218085507.GA20578@jerin> <85485fb0-f602-78af-c40a-7bfb4bda561e@nxp.com> <20171222145957.tc56hzyzbxj65rg5@platinum> CC: Jerin Jacob , , From: Hemant Agrawal Message-ID: <64ba944d-a31e-a42f-1d9e-619dbeef59fe@nxp.com> Date: Thu, 28 Dec 2017 17:37:58 +0530 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20171222145957.tc56hzyzbxj65rg5@platinum> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131589364620339925; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(336005)(396003)(376002)(39860400002)(346002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(24454002)(13464003)(199004)(189003)(77096006)(67846002)(68736007)(316002)(53936002)(5660300001)(230700001)(4326008)(97736004)(229853002)(10710500007)(2420400007)(64126003)(59450400001)(31696002)(53546011)(50466002)(15650500001)(6306002)(2906002)(53376002)(105606002)(93886005)(106466001)(356003)(76176011)(498600001)(305945005)(85426001)(31686004)(561944003)(966005)(36756003)(6916009)(2950100002)(54906003)(47776003)(86362001)(65826007)(83506002)(23746002)(6246003)(65956001)(81156014)(81166006)(65806001)(7110500001)(104016004)(8676002)(58126008)(8936002); DIR:OUT; SFP:1101; SCL:1; SRVR:SN2PR03MB2366; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC007; 1:fN2CSaz+EPtQywPL8pp5ekwSrcuI5YmO3dIO3V20/BkvbVuCUubkjfeY1eRZcCyEia0WqWCZn6bngDfXFv7uWjarGjlgiFbapSIdI2clpHulnyAD5QcRy9YA/A3pmumZ X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 02362565-355d-4980-2ad5-08d54deb98e1 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:SN2PR03MB2366; X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 3:Gx9t3XVQpgeL/cTbs3hRbSeI6gBT6sUWhz83MMFB0XLAXDk4tpV+GiU9tGNX1x6flp9ugceW3FF33gyPjVZut8oesBjBdQn2T2yllJ24Gg/xCZxQyB76qKmmQLOzCD50K/BQm+wkAlDRQQqvZK0ERTx3dP3axwV/0FMHC7RMJjznYldOYBRMML3SvCI2UVMc/vN8xaVb3Ea48mpKK97P8KHICztqWIp8hC1s0MvP8rM+hPMjnIkn++gSuAIwQNWGHmYYRzlIFcWvcc8bSmnW/y+/qzn8G8+wZe0NFlBwxKSl5Xaad4bjx6QBi+HeKS2cFuntCFNFjZfHZWsrEJDtZyprF80t0XUPHsSRdRwSR+w=; 25:MNZ8dIYOCG4bluUurY7uKC/CGd6IQ0r/YHAnwdR72GSxk0uSW3PaQDJ5519Qj0XCHTuk6oUyXN/b44gNGM24GPP/DVFR3N88Finhlo4FouG0yoVma/DmWiF6pxRNaTNt9FsEPqbBvSFAj7P31bFv8rZ7yhAo3SrnzZyllGgScupeAiipHFMWG0USi12A8dMIL7JiiB6xQ2sXmZDw2/TNaOc/AlZtmCOJK4dkkRlZ0VgS8vuKQ+v8SR7RmF6gDY0idK/G9MqXCujN+1Or7gl+j+KAm5clk3TknOx8syvo5JqU9j04QdNhS6+qDBQPiryilzMt0COW67RBvkV2OJh4RQ== X-MS-TrafficTypeDiagnostic: SN2PR03MB2366: X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 31:TqAaGcUrnfTDzgxAzFRVmO/5q465pV/P0wFw38jiz+4BMJXMUrz7iynvOjRZcZguioJ5jRrNCmmRaUQypk8ZrTpxqMijtogU4oOWFzUZyw2v6fPaE/drRd0Y6wr5ctHmCyrHkpEoTxeUb/AqvJbac1InXprXGxeNNMKuzVxNLBvTLsLGLaHecnRqxPYFGUMdxJcEPEACRbr85RXe2NBm6v0fkNuxDU5rtCZ9BZuD+bs=; 4:NPQ1myB/nrblu6m3usx6cLWenRyPJZbawdOHxlFbGyQI1X7gPIz1QJTeiQpmHcHJN8jZ8M4WvIv1XMWTXAg/FMHs04fUkdIWgAvapr7VrKEqYuthD1GBHqNDV9aOka1w0HsQ/tmpG5kSx7ulXsie/1HQjopN6mgvHrDe6/b2OdDBnk5jNJ27eyejL5dF2Sgf1rrc74iT9ithl74foDzo+kTnsGe2XBFem9XP2YhIV8Lqs55EdpWEdpShzSKz3IG32cFAhkaq++4dN7UfTDFFZsWkNwFWb+HzQGtPKV/nZngdBy/zdWBGW9bPZ5mEpu9+ X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(185117386973197); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(5005006)(8121501046)(3231023)(944510075)(944921075)(946801075)(946901075)(93006095)(93001095)(10201501046)(3002001)(6055026)(6096035)(20161123556025)(20161123561025)(20161123563025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123559100)(20161123565025)(201708071742011); SRVR:SN2PR03MB2366; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:SN2PR03MB2366; X-Forefront-PRVS: 05352A48BE X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; SN2PR03MB2366; 23:lGV1l7jLxipLBBm6Yq8KeZxlbChmv1OdALro/?= =?Windows-1252?Q?Cjy3uKzSeb6a8eUokWdg7NQT+u+Ta2Hb4KDeJAt7AMbrCimOxPtUy47b?= =?Windows-1252?Q?uW3Hf7um+qO/MeMOOjmfcaTDMgiXmd58FYQ0tEOIjKDJ1C05CyH3jRYK?= =?Windows-1252?Q?mOW7Ku/fp/aniujTuuagf+/ydIBnuPSTIWEdIBueOcZSASWcnoKhJjiC?= =?Windows-1252?Q?AMHXjqwM9g59/FECtUzrWV3tjLz56kPg9H6a2W2f+9lRG+3TJSuDSbOm?= =?Windows-1252?Q?LrXedgXjtovUmT0sB84kAxzTc4lIFaaP/CiahuN/IrHOSO0k4EuVZzyK?= =?Windows-1252?Q?rBdnRcOZK5vZpvzUvlodvrU253Bwbe+AXPJZtM3Icl4FbNFaSzkn7oN/?= =?Windows-1252?Q?dahtiVJUMtMY2ARyTiPs5EGDDrAKGoRNkC1AQ783CbFOM+XbyqnNwnDL?= =?Windows-1252?Q?puGV+zo4EXvoZ97hChSMy26wx6EIGeIFfgGXvwSf6+N33Dd6sJFkIPxN?= =?Windows-1252?Q?5BZs/FavMTCRkQkTYh7+0dLlm/DuV/NJjm450rSKztujAjwd39hSJjQy?= =?Windows-1252?Q?iy7hZlVUwRpdDQF32KQ4Y2G++kDqGe+Gy3EcZXV3jDdpVWe+j20/TqOa?= =?Windows-1252?Q?MHYxNYgFydcLBrN16zTfZwntJ0bVOhv3Qqqy0JdMmw0pv16xfyQx6ouz?= =?Windows-1252?Q?8G6CmkQmEsr+gXFHIA4Fax2ovQbIw2GB2H8+rSqscZs4rb6WwHPfMV7U?= =?Windows-1252?Q?gz2i0aVza3/9EfXx16ESV7r3n3vbdrQP+iaGpMj7BSeIe9jGC9a4xZbC?= =?Windows-1252?Q?LknoSv7zWmM9dIscPZHRexHgLeEBVOy3w116VTAU+xDGEc7tWh954Nuq?= =?Windows-1252?Q?LzKcqy8PVwVT1PnUR/Ca81UBKqOQUBCMqQjfmDukJZXg5qbw+qZEKsbY?= =?Windows-1252?Q?acpmEDID1FuMlNWZGWo+W7p1HYtItcyBJSUz7BwyWObT1McKyuAVPjag?= =?Windows-1252?Q?FRcxFUWRJ9sZsU18nXIBouMn6+NGNkD9iy5heEIuPC1HE596IcPO2c1x?= =?Windows-1252?Q?yXM7K9h5AcKijd0uap4HXGcifBNnL3aCoig/ucVhN4E9E537QI6xhhE8?= =?Windows-1252?Q?tjYbbM/BX6SHzg11CCSDALhU/HuuoggBk0unKAQGJm4rhFd/c5Q00ABd?= =?Windows-1252?Q?aUkWTUHNDOFj59MYcleXEJ6Nbj49CySvnnkb4li2xtxxoEwbtBI8d/7r?= =?Windows-1252?Q?2ljpW0TDBiC+nicZcG6OoInV3t7KVpLhDRG/KsXQtB3hOuajp0Wrnzmi?= =?Windows-1252?Q?42VxrufeEPCAte9M6hLvpW5g27M/yODUVWoO+EdyoGTW0zLQIO0SsXt2?= =?Windows-1252?Q?5QTBO68kGAMN84dur/S6tMTSqH6t1YyyzEdJqumQf/uYXJT11W6aPqN8?= =?Windows-1252?Q?FroEI7zhT7xlSL2Lz8ixZDEAf6diN39wVpwmqlFCUmm9vgI/8d2TU4JQ?= =?Windows-1252?Q?R1OEA/o4mI5NcD4S5aXzmvDmkZkp6KSV10/kpXTba4hIKVI4ePy755+5?= =?Windows-1252?Q?Nu5z/CMFUKbS5RSEKg7I39wDrcWLDSgOniHKnXbVfuc8xMKeA20qIjxr?= =?Windows-1252?Q?Ntu+zhBm6kjYGKf6qirteXkvW0IsugFBU3Ah5WBl5hk?= X-Microsoft-Exchange-Diagnostics: 1; SN2PR03MB2366; 6:K/Z9IZEKLOxPwsXMWHK2gjsNsNdfL3Ci4eFKNWsv9r63De34WiEG06J6MRCkSUyZRV9qrRqvufUSyu44IJ2+i6E7BbMsYV8who6xNX3gBo2zneYBGdwtS+lUWWRKHB2smxZWTgHzNx4MCqzrRnwhzR7ZZ+rpONlvpCWukHpzMjPSeT6iXMH1h9xNOfr8BdVebLLWWHap1bbkFL9tYQqAHB4HEuNvsOuuzMm73a5EjzGo8ub5JILLDeOSzdl/MnUtWnBf+Nu8EJY2t1HC2rHon3N8nL7Su+HhB4NqxN9N6jY0YAbd0QKL8p5MrXkFHEFlFw2MnJp7H/0+symRkZGG9z9ajEvrk1MnxWfsUVazMTU=; 5:Xl4v3j7ljrHfVnanpNcl0YuryNIt2UXMbTrAhDIOZGm3V9GNdIzAoMRlXDEFZS2spopEUE6xVf/YqJTx9Tzq6XtYEjocP+533iCk6lG6eqWmHPBi12l+4t6U/QfbQsvpgXVx/cz0m+xWvcfbxJnTBbbIIjJHUsmwi2lopq7+lAw=; 24:eVtzSX5TgDEMkSJkshVxWP8K16AzhK6MoC8nX0j/YrnDrLMWCCsxClctjf/3BFtfC2S7+Vvq0mVaWD7UvtDpfXf+NQ5fZz1JTqZo3G4j0kc=; 7:UbuLIw/eFCSPA0RuBLK2FSD3cdK/gM9zK7xI5gLvDSungRJA/gmDLqTfpKsOp/LZaC00lhjZVz35/VajM7sqCPS8/3RgSuW/fWO7kibR2WOHl+m3pPVm/XwlcsaR/gxZL/+5j8NKRuB9Vb144ynMwNFHITYVxpII+wc3noKcIRlma7vEKFOzw3LeWWWOKBe2W+HBMTdfYgKE3Mq91eettiEp4/7Kjv1sGCag9mc9BvMfFldN0PtvnEJXtUNikfm9 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 28 Dec 2017 12:07:41.8311 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 02362565-355d-4980-2ad5-08d54deb98e1 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: SN2PR03MB2366 Subject: Re: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW active pool 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: Thu, 28 Dec 2017 12:08:04 -0000 Hi Olivier, On 12/22/2017 8:29 PM, Olivier MATZ wrote: > On Mon, Dec 18, 2017 at 03:06:21PM +0530, Hemant Agrawal wrote: >> On 12/18/2017 2:25 PM, Jerin Jacob wrote: >>> -----Original Message----- >>>> Date: Fri, 15 Dec 2017 15:54:42 +0530 >>>> From: Hemant Agrawal >>>> To: olivier.matz@6wind.com, santosh.shukla@caviumnetworks.com >>>> CC: dev@dpdk.org >>>> Subject: [dpdk-dev] [PATCH 1/2] mbuf: update default Mempool ops with HW >>>> active pool >>>> X-Mailer: git-send-email 2.7.4 >>>> >>>> With this patch the specific HW mempool are no longer required to be >>>> specified in the config file at compile. A default active hw mempool >>>> can be detected dynamically and published to default mempools ops >>>> config at run time. Only one type of HW mempool can be active default. >>> >>> For me, it looks very reasonable approach as it caters the basic use >>> case without any change in the application nor the additional(--mbuf-pool-ops-name) >>> EAL command line scheme to select different mempool ops. >>> Though, this option will not enough cater all the use case. I think, we can have >>> three options and the following order of precedence to select the mempool ops >>> >>> 1) This patch(update active mempool based on the device probe()) >>> 2) Selection of mempool ops though --mbuf-pool-ops-name= EAL commandline argument. >>> Which can overridden the scheme(1) >>> 3) More sophisticated mempool section based on >>> a) The ethdev PMD capability exposed through existing rte_eth_dev_pool_ops_supported() >>> b) Add mempool ops option in rte_pktmbuf_pool_create() >>> http://dpdk.org/ml/archives/dev/2017-December/083985.html >>> c) Use (a) and (b) to select the update the mempool ops with >>> some "weight" based algorithm like >>> http://dpdk.org/dev/patchwork/patch/32245/ >>> >> >> Yes! We need more options to fine tune control over the mempool uses, >> specially when dealing with HW mempools. >> >> Once the above mentioned mechanisms will be in place, it will be much easier >> and flexible. > > I'm inline with this description. It would be great if the same binary can work > on different platforms without configuration. > > I just feel it's a bit messy to have: > > - rte_eal_mbuf_default_mempool_ops() in eal API > return user-selected ops if any, or compile-time default > > - rte_pktmbuf_active_mempool_ops() in mbuf API > return platform ops except if a selected user ops != compile default > > Thomas suggested somewhere (but I don't remember in which thread) to have > rte_eal_mbuf_default_mempool_ops() in mbuf code, and I think he was right. > The idea is good. It will break ABI, but we can move around in systematic way. > I think the whole mbuf pool ops selection mechanism should be at the > same place. I could be in a specific file of librte_mbuf. > > The API could be: > - get compile time default ops We can get them from "RTE_MBUF_DEFAULT_MEMPOOL_OPS" or " const char *rte_get_mbuf_config_mempool_ops(void) > - get/set platform ops (NULL if none) const char *rte_get_mbuf_platform_mempool_ops(void); int rte_set_mbuf_platform_mempool_ops(const char *ops_name); > - get/set user ops (NULL if none) internal_config will only store the command line argument or NULL. rename : rte_eal_mbuf_default_mempool_ops(void) to const char *rte_get_mbuf_user_mempool_ops(void) > - get preferred ops from currently configured PMD > The following proposal is updating the mempool_ops name in internal_config, I thing that is not the best solution. We shall not update the internal config. eal: add API to set default mbuf mempool ops http://dpdk.org/ml/archives/dev/2017-December/083849.html rte_eth_dev_get_preferred_pool_name() > - get best ops: return user, or pmd-prefered, or platform, or default. > pktmbuf_pool_create is currently calling, *rte_eal_mbuf_default_mempool_ops* This should be changed to call *rte_get_mbuf_best_mempool_ops* in the following order 1. rte_get_mbuf_user_mempool_ops 2. rte_eth_dev_get_preferred_pool_name (whenever this API comes) 3. rte_get_mbuf_platform_mempool_ops 4. rte_get_mbuf_config_mempool_ops > rte_pktmbuf_pool_create() will use "get best ops" if no ops (NULL) is > passed as argument. > However, we shall still provide a additional API, *rte_pktmbuf_pool_create_specific* if user still wants fine control or don't want to use the default best logic.