From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 BB1851B298 for ; Thu, 18 Jan 2018 12:47:24 +0100 (CET) Received: from MWHPR03CA0050.namprd03.prod.outlook.com (10.174.173.167) by BN3PR03MB2355.namprd03.prod.outlook.com (10.166.74.150) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.407.7; Thu, 18 Jan 2018 11:47:23 +0000 Received: from BN1BFFO11FD040.protection.gbl (2a01:111:f400:7c10::1:180) by MWHPR03CA0050.outlook.office365.com (2603:10b6:301:3b::39) 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 11:47:23 +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 BN1BFFO11FD040.mail.protection.outlook.com (10.58.144.103) 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 11:47:21 +0000 Received: from [10.232.133.65] (B10814-12.ap.freescale.net [10.232.133.65]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id w0IBlHVf005074; Thu, 18 Jan 2018 04:47:18 -0700 To: Olivier Matz References: <1513333483-4372-1-git-send-email-hemant.agrawal@nxp.com> <1515996674-26338-1-git-send-email-hemant.agrawal@nxp.com> <20180116150134.o3wgrsh4nhh7ptwq@platinum> CC: , , From: Hemant Agrawal Message-ID: <7181c81d-869b-32d8-e767-2ac5012ce1a1@nxp.com> Date: Thu, 18 Jan 2018 17:17:17 +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: <20180116150134.o3wgrsh4nhh7ptwq@platinum> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131607496428544689; (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)(346002)(39860400002)(376002)(39380400002)(2980300002)(1109001)(1110001)(339900001)(199004)(189003)(53376002)(65956001)(31696002)(65806001)(104016004)(67846002)(230700001)(97736004)(229853002)(47776003)(54906003)(59450400001)(26005)(305945005)(58126008)(85426001)(86362001)(53546011)(356003)(23746002)(65826007)(53936002)(4326008)(2950100002)(8676002)(83506002)(2906002)(31686004)(36756003)(76176011)(966005)(6246003)(68736007)(5660300001)(316002)(50466002)(81156014)(64126003)(6916009)(106466001)(8936002)(105606002)(81166006)(77096007)(6306002)(498600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BN3PR03MB2355; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BN1BFFO11FD040; 1:WpJq0YLC+4kHSOgWHsSazYzxnyYORbTItX9Y9xMOJNDMTHreYV3elSjFINg4QjkFw7gpDP7wT5hYBu/StiVQDjuJi6egJNOyODfjN8/U31s20VKhsm7Ilny/a7pmGDgc X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed18bdea-d867-4e1e-e2b1-08d55e693cdd X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(5600026)(4604075)(2017052603307); SRVR:BN3PR03MB2355; X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 3:g9rRYsL5m1BPAoIctuQdEXfVE/T2QS60p7epJQWnTqs65vh28GolDgJHX0/i5Sbax9lpDLCPyjWlozw6S2IDH1pXfDj1U7Ejy98mcZ5KWSU6asbAdX25eEd6eNo6+Tka9ju1CM3da/eAXioTlW6c00s321ybMU14E1jR6coDpyV7WtEcy3CtHsSFXIqGOL+uv2tPd6ChqYmf+YP+1VBFN2Oqb5UYMtg/cTl7roUL0kRf+oUT7TflnITz0JdFfmjQ4gssaygtY4gvXqteD0m9Ci0VkGiUSzNQHH7lgG3kTZPbu78UygAXBfjxk4LZq1x9cc41+PF0aZNR4+LGB6Li/Kc/SfDM6KCO6jzeChQsR34=; 25:cZbT2+HpTGMkhOn5BhlwiFq/SoY3myonMHPTd1e4t6t+aL4JW231ZhxkvS6iDkR8u0ZkHWNl1ufzHp818otVQ+wN2mDP4Jw5NstuUhp10RtdLY0ExZq2u0rbq0zsu8bpg4J0LJIOC3ZPUHuda5NxIUJOS3FHzI+EdLQMIyiiRvtii58ByvF6DnbjxY3FF9Cpe5QYMzZeozNB6BdUvom1tsVou4AQ/FDqGOOMGgfcqr+2WzmduPVaTFY/Od5VJ83O4DTHmBvkm6LtZjU5v2TJJM7A5YEDJe6NyxkkNiNEJylEmSVKa/T5r0qfKKRS9lcua6/rm3ClMNVG4FWM4huIIQ== X-MS-TrafficTypeDiagnostic: BN3PR03MB2355: X-Microsoft-Exchange-Diagnostics: 1; BN3PR03MB2355; 31:oFHL3xxjLplcEPZ1tFhKCyBxRxkBa9GHO5bLrtEy30c8eo0xEPaR6Z3rtSSomjdhkpZAxAWzfu5y7qn7+IUrPnhJqwFROz5/t4Gm3okIBtCwtCFfWfyUQLrTdYG8KHCzczpeJWDcwapuqBWdY3yqlO0hgegsOYUvKEYw8nAEjHgJ2pfSfG0CHSsq7+8zBCtaMZxbf8glaRTDtIWYy6SO372cYDRUecgvVtOfn1k7QiA=; 4:cnISHRVX5lbmzdenTA359okKyeCXlRFFKTAFGczm0LsmwZ+Xe+4dJKljW6uSRNtKRNRM3VxrJYul3gIV43yEDPJcZb44k37RoErdYq0GnYv9+ilNRlWjb+QqG35xof/fXoegqGeFEZUu4PRCCGFmG8/Dp5OfwyFMA9WwY1fdUBq3u/hCkfm7EPO1I2I/NvjDhflmlUzKOd62WLEkHtcQ0bbWxat9xWzo3I4Hp4LjHEONzKZez4M5PYCY8VV4PhlJRoNI8P/Wn22UMsuvtnfOCaeD0eFX39E3w29UmwLsrXj22mMD5UHJmLdjVZtWu29Y X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(10201501046)(3231023)(2400061)(944501161)(3002001)(93006095)(93001095)(6055026)(6096035)(201703131430075)(201703131448075)(201703131433075)(201703151042153)(20161123561025)(20161123559100)(20161123563025)(20161123556025)(20161123565025)(201708071742011); SRVR:BN3PR03MB2355; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:BN3PR03MB2355; X-Forefront-PRVS: 05568D1FF7 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; BN3PR03MB2355; 23:FsPwV5hJuBhIttMy4yQCWJnfFmTtK5xeekCyO?= =?Windows-1252?Q?8PymEEwpkBoKjqAo1bNNhu38cbGERhT4uvW25ywl/r4FvEiXNzTbmWfl?= =?Windows-1252?Q?iuqMN9XIqrz1ajyoWbDJEm0vmNNhwj/tUbnmeUTDdPFtqIjvsyFo/yoB?= =?Windows-1252?Q?1uAkyK+UsDOekF4bTfoHX1E5zg3vHMi/XEZFQR7v/JyyBQppjJC9tQag?= =?Windows-1252?Q?wPbRj5mySES9gSwV+2J/vdprhX0tbEuKHb/Uz2G3NDsTeo7eWm+XdVGR?= =?Windows-1252?Q?gKF0zKYCF8qcxc3lHmg8c/185iNds22bL51eItBUCNroFNWaO7WN09is?= =?Windows-1252?Q?Y8p+QWssHjwNbjDViQCSjuhQom1AgSray4RlIHRxcn3Fn6AeJvdY5JX0?= =?Windows-1252?Q?YNPaowQPR/M4m3Y3azBVOrOwXYqW4R7v2EDpUBoAd9Ov7C1Tv6nNQCH2?= =?Windows-1252?Q?wqzHd2XAyRDRrmI5YEqesQpkjC/ybTnRUtYdiWs/vcsy/azZWbjZw0/o?= =?Windows-1252?Q?V2m6iqAdco39Jf1r1I5j1gIf2Rr5xzcDnOCk/kawKC1bF+3ljXh+Ucsc?= =?Windows-1252?Q?u4yEBX0ZUGZ1ulKc51ONPNrNjky+v1UOxuBrDI6fx1d8YqJC7MwS1+ee?= =?Windows-1252?Q?IE+vmGe7TRGFFVobOUixFYtuRJiY8Qy9d7EOmtHDja0v3QMMSLgGcBqr?= =?Windows-1252?Q?zVGKbS0TEtN+9Ww4R7lj0M8Yr5SemiMNExsSIbmB4v5jPgUGJ/a+quio?= =?Windows-1252?Q?ItvhT0t8XkwfDpPJcYwChI+SxLsLU6MqetK8lt1dD2+J33SKStyLlfBP?= =?Windows-1252?Q?p/mbsMULpUMq6U68BMTk3LDVZ41nGAJkL3o3Ly53MvXqi2lZKbLQ138G?= =?Windows-1252?Q?vmt8pRinGDNi9fqxFg1ZI2CyCQwLTHIztOXaXjzQ6mvA0sJG+irAfDq9?= =?Windows-1252?Q?SbZyVSp2IVRjh6M61FoLIxQ0llL2V6aR4D6iJsnUB2xIh+8yOhMD3WHR?= =?Windows-1252?Q?d6nCcXKTmA1IspziqU3whFhMTorKn7eoZf1s6utB7rRZmzqv9+9ziok6?= =?Windows-1252?Q?OSzwoj+BFz8jlFyuM1K1lzB17LQ/LClQ2IW5Y3oD5sttuDQ/TW0ODGQI?= =?Windows-1252?Q?pJ2sgGkJ2CmAVoQeIZFKzpkGKWEjMZeYTEN7+I8GHcc3AWPC9yzmajOj?= =?Windows-1252?Q?pICPxxjXrR/vUXmv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QOTGGHPYjbyLpze2bNt0ZeISCRxh01ria5mVZzx1tcncE7jrH3kn9MO+/EKLVG4ngFBRSPrVPs5fe4E3JPCVrwuj1YmxYkEf9Mqg1HZ/SEHl5e/PGUL/X2Qha3kW7H9Y2nlV5md6k4L9z3+OdwKsUA SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Jan 2018 11:47:21.2944 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: ed18bdea-d867-4e1e-e2b1-08d55e693cdd 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: BN3PR03MB2355 Subject: Re: [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: , X-List-Received-Date: Thu, 18 Jan 2018 11:47:25 -0000 On 1/16/2018 8:31 PM, Olivier Matz wrote: > On Mon, Jan 15, 2018 at 11:41:09AM +0530, Hemant Agrawal wrote: >> 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. > > Instead of storing the mempool_ops name in internal config, can't it be > stored inside librte_mbuf? The eal code can call > rte_mbuf_set_user_mempool_ops(name) while parsing the arguments. I doubt that eal can call mbuf APIs. It will be a issue in shared build? > > It has to be done carefully so that it works with secondary processes. > > >> 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 ++++++++++++++++++++++++++++++ > > I think the code to manage the user/platform mempool ops could > go in a separate file. What about rte_mbuf_pool_ops.[ch] ? > Good suggestion.