From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-BY2-obe.outbound.protection.outlook.com (mail-by2nam01on0057.outbound.protection.outlook.com [104.47.34.57]) by dpdk.org (Postfix) with ESMTP id 20C75376C for ; Mon, 4 Sep 2017 15:20:38 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=CAVIUMNETWORKS.onmicrosoft.com; s=selector1-cavium-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version; bh=myxIQp/hQ3/7SqSgxZZJ2akjh4rz7aglxsI1dqzYqgg=; b=m+eQblscdvgVSC13JGNNRsol4hBFjIyN5xlr6Z8Rtl3a2NnW2LM6eHloSexwfQgR3A4F1CRskIN7BGLC80PRNecipv+RJNoyp8oMiNRqg21Jgw/hBIdCwE1BkZRCwVkwU6I57kPoPboawjIyAKH03/Lsk8XQhWPBbW9zyBOAoUE= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.89.1.1] (14.140.2.178) by CY4PR07MB3094.namprd07.prod.outlook.com (10.172.115.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10; Mon, 4 Sep 2017 13:20:32 +0000 To: Sergio Gonzalez Monroy , olivier.matz@6wind.com, dev@dpdk.org References: <20170720070613.18211-2-santosh.shukla@caviumnetworks.com> <20170815080717.9413-1-santosh.shukla@caviumnetworks.com> <5724dc82-952a-8ca5-2f99-f463a54ec07d@intel.com> Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com From: santosh Message-ID: <5906d0ad-5edc-f01b-3ed6-5ca2f8e5b823@caviumnetworks.com> Date: Mon, 4 Sep 2017 18:50:13 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <5724dc82-952a-8ca5-2f99-f463a54ec07d@intel.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [14.140.2.178] X-ClientProxiedBy: PN1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (10.174.144.152) To CY4PR07MB3094.namprd07.prod.outlook.com (10.172.115.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ebcaac90-c609-4bc2-b4c6-08d4f397baf8 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095); SRVR:CY4PR07MB3094; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3094; 3:IrZb2mHFIglN8mKz5Tg6fFCvgWNqAL/hzSCJ6F93+RbtFXXaRJ5Jn7qVKZVT3WVJzZ6M5BrzXDIO2XMq3Ve9bMa5ERMEbIdMUyFj0Jt5fkHVSyzlIekqD4auJlc7VhA43hdCSzaM2YOz5wxeb9XDwzEvjACj1vQV/1ulq0JcgUkw24Zgbp58CRVjUWqPVWcrd1BOZ0daN2zn1dmpQdo3cqI/Z4CoMr2kDFmbYyz9P8ftR701OZEuyIpW1fuHJO1h; 25:bfqBkmR0neBHchVxR/aD3OwyAIP1yxYdgwkcw3eLkxf4cLiU8pbQrtwNM9PwKkfQIxYeUvokq+GXY0OU7HZ/K+TYKAU9UuWePNIcIYEakSJK5vQEl6yonM111wZX8hs2R+kwihzerU6cJTRUI9722YVAwvy2kNWUpoKwv8eqksA5j18KWw7fqHV/ywG3RBd72DEq4Z40r42Hq39SffAlZ90jRcGFnSk5FS+o6c0TK1gF7a7kgmPFKSnSunDA+wy9h0KllEuCMMmVAXj3btkmy4QMv/LDZ+hKNGkAAWleuijXR9CAPG31dJWGAAwKFbmsYgs8wyve8Uy9FbXsYqlifQ==; 31:kOdWpKFh5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+EIZPYsYV0Zp5YeNT6GXXEIAdrjLNeG9HJ43KnIK3g++ei1MAG7EqAbIxp/oAQeWbdOfuujC199AzSPhlmgvafDKQLI1J/X6d0Jrd X-Exchange-Antispam-Report-Test: UriScan:; X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(3002001)(10201501046)(100000703101)(100105400095)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123555025)(20161123560025)(20161123564025)(20161123558100)(20161123562025)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3094; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3094; X-Forefront-PRVS: 0420213CCD X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(76104003)(51444003)(199003)(377454003)(189002)(24454002)(4001350100001)(105586002)(106356001)(53546010)(64126003)(42186005)(54356999)(76176999)(72206003)(229853002)(8936002)(966005)(50466002)(81166006)(81156014)(47776003)(8676002)(33646002)(68736007)(50986999)(4326008)(65826007)(5660300001)(97736004)(83506001)(31696002)(6306002)(23746002)(6486002)(6246003)(86152003)(77096006)(6116002)(2950100002)(42882006)(8656003)(3846002)(90366009)(478600001)(5009440100003)(2906002)(25786009)(31686004)(66066001)(65956001)(65806001)(6666003)(110136004)(189998001)(101416001)(7736002)(305945005)(53376002)(53936002)(230700001)(36756003)(110426004); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3094; H:[10.89.1.1]; FPR:; SPF:None; PTR:InfoNoRecords; A:1; MX:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY4PR07MB3094; 23:fYjMdWPWdNVp/KApzpd7GMVY0QTBBm/qdmzBK?= =?Windows-1252?Q?KdjJ9P0YIP2g1+3j5gyuRpzOiBSQtPMvSGA2L3MG+aeW9Hp3j/LLmqiQ?= =?Windows-1252?Q?dRJ1OdMVFbcwwL1hiZlDzLw3/dO/LsjWnpVY4323CScO1XXzHVFXvC0P?= =?Windows-1252?Q?SYwAX4DGp/TdcSyUb7gowv9BhEqgH4H0Dxw8IH+pMgFnIT6AnQs/KY1W?= =?Windows-1252?Q?cV24jpt58/wGsNv44KFGeOBVbu6FPNfc5caojQZufV60oDtRQaxJhOol?= =?Windows-1252?Q?3w3cpsTzGHgFlqyy6tTDcxcy1amNUQadrEgwbRBiA1RGbnqLQl5KUt4X?= =?Windows-1252?Q?yihJYKp1pDcyrBDabmXSEYQRcMtyJ6pDeqO6xorVPt3aOqxd9XeoZV5C?= =?Windows-1252?Q?c6ZMvycotVp6hdIbcNUVcDboP6J3lT6kth+/Pgf9zs/1ZiqaZs7xv0cv?= =?Windows-1252?Q?plVxOZCjc0Kk2UEE6/8+s5MqpNgBfqmptqFbmq8RwKTrdiPTlKHSVNVZ?= =?Windows-1252?Q?1IbqPePNKzfek46i9NOEDOpP5ZCTd2FSePmZI2OZjn7EGh8NtE8SvK7O?= =?Windows-1252?Q?+yG3QsVs8Ie7mOfgdhE3pEb/QvElJp2eXMn8txjFmF18p+MJ19ZjFYsn?= =?Windows-1252?Q?rfEixngpsPQHE9SzNDrnz3Ko7egqGwctk1ko8KlqxAPobl0gFyeZrrm0?= =?Windows-1252?Q?iVO9bV+U/2euDiADN/w0w3aVcKsTrqivZ6+03N6x/oO5HNAxNzaBTHCD?= =?Windows-1252?Q?DUCFI37YJF9f+gjCJAHyxDblO1Hl/HHUXqoh4JWTsZaF3dU5+/8V8cCn?= =?Windows-1252?Q?1LoTEVo0UU4H/PiT7SLBIskdl5WpTFutTZAtvx34xxa/pCDs+KHyJRc4?= =?Windows-1252?Q?sxYJlu2MV5AFru/mc+67xAr7iPuGvVkeTXBURN8NPW1uF+KhWNyBG3Hz?= =?Windows-1252?Q?OWCI/QtOT8aDJmoIOKju84TLt9S+Kd8rbCcT6wsuhlpqnV8U+MgQCEuY?= =?Windows-1252?Q?6JIg6JlFniWeCv99gw8LD6qLbIRr7jLyzITfEtAiAOpLw/NHQ6DeHqQE?= =?Windows-1252?Q?m5VM52vNUoONl6c/R0ZO15jIXv6jKvLufUiWpz0AAtqzKVnF2vfZX/Z+?= =?Windows-1252?Q?UHfusN5Ml3LtU7KbXhUiJwNTeLzfwaxNnMY2sJZ9U4P73dEOMOeEwpDc?= =?Windows-1252?Q?pxKGOJj0if9v7IPIXDNoRZx9EGz6AsGs+dnV940vuzJf+YEeIRZNMWHn?= =?Windows-1252?Q?QzGrModnBTaUni7pYlHi51/HFJMY4VlW8aArZXG0iO9EnQ1H+m5GyjUq?= =?Windows-1252?Q?IJLyDxhGRihClh6HyEZWYIuEikVnNTIJxe6nc8dqGUOi+fLDqgBJA3ek?= =?Windows-1252?Q?BCsrj5Q8trZs6IurxcJFhNi1OfpxXpDiXpJdtW+rB1TS3pFg0V38TW70?= =?Windows-1252?Q?EKmJn/wTlkJl1tS/47L9qv9cOJBNbi1c16y3lkTVBx3KeAYAJTriyA3N?= =?Windows-1252?Q?IPnJF1x04KYaQTNB1qFTvhYCV1MDKA6ULjesWR4oaM7CTuC/2a3j6wNj?= =?Windows-1252?Q?vL4rJ/RkqfyiyD3f0LZQ7KksxIfq21DYiQs6a8YonJ9LagNnktSF0x6d?= =?Windows-1252?Q?jlSJ6wSdbMB5K3BXszuYwIU9BDebc5jc7cbjNZflXbx?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3094; 6:b5SbRcDFXBXz+pjnlRuxIM5So6snOFoLu7HXhsBYawzs7dDwUmALxx+NIrf12CWuLgyq+NA3gPg18NHOlmF8L605LuIuMYYDHjWne4t1jFUjt0OKJTLORG7CU/3lAyqP0aBTaRbYBHBN2+77ze3b6iHDQBq2amo39QAbNWwAzIYXzgSAsl66pvXBdbYlGkooEOrl6G3VD3S06VBDuMevACEVGV0bNeme2gqRPeLeO8bCR3utMLgedOtIV9FQLlpXzH/hRTdDWww0Rv+A6h55R1uJFBoiqzaYqU7X2sdkLcZfqK3nK8//HQvSRCYyLaLEm/GWDHlrdRHLK2OKh1PjGA==; 5:yjTMQ2f+35aCxWXHt1nXjk+UJjIXQOrG9dPryiZNLtf8own0nQPZQU8tTeQetFEzf3p3NP3EKHxCWNSWEk7vK8ek14D8YHseHxpWG6N5TT+dTkvj+yo5His8z8hFoHBdtssuiphaKDvtDeLCzCdblg==; 24:OStpZe5ueJJs2xFNfzi2xM7MAOvomeUfoSDxAG8V4cKnyawsa7ZIpsTWhq6hITVOwPiBg3gZNAb9OSTKtKWb1LAOLdAhrU1NV0KvTk2jGgQ=; 7:6pxIomLIODyrs6cd0JnjPww1Cm3ExwHYfKQv0W4MPkul4zI67bnQkN6wM7+0P6F7rtNtbI8PActdlkXteDM9PJRTxTJmnJDhcfsle9ICSwMwszy6hR6dzmb/FXL1Snb6NUIbHWEYik40GTY8jIFBgXy1E8gV73ktenDb7zMBq1wZea+IjpYX88mACZQyCN36RsV1G6DcdA7kiKEW65gUzLtP1JVPv+4AcLOVhQ/UQaY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 04 Sep 2017 13:20:32.1055 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3094 Subject: Re: [dpdk-dev] [PATCH v3 0/2] Dynamically configure mempool handle 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: Mon, 04 Sep 2017 13:20:39 -0000 Hi Sergio, On Monday 04 September 2017 03:11 PM, Sergio Gonzalez Monroy wrote: > On 15/08/2017 09:07, Santosh Shukla wrote: >> v3: >> - Rebased on top of v17.11-rc0 >> - Updated version.map entry to v17.11. >> >> v2: >> >> DPDK has support for hw and sw mempool. Those mempool >> can work optimal for specific PMD's. >> Example: >> sw ring based PMD for Intel NICs. >> HW mempool manager dpaa2 for dpaa2 PMD. >> HW mempool manager fpa for octeontx PMD. >> >> There could be a use-case where different vendor NIC's used >> on the same platform and User like to configure mempool in such a way that >> each of those NIC's should use their preferred mempool(For performance reasons). >> >> Current mempool infrastrucure don't support such use-case. >> >> This patchset tries to address that problem in 2 steps: >> >> 0) Allowing user to dynamically configure mempool handle by >> passing pool handle as eal arg to `--mbuf-pool-ops=`. >> >> 1) Allowing PMD's to advertise their preferred pool to an application. >> From an application point of view: >> - The application must ask PMD about their preferred pool. >> - PMD to respond back with preferred pool otherwise >> CONFIG_RTE_MEMPOOL_DEFAULT_OPS will be used for that PMD. >> >> * Application programming sequencing would be >> char pref_mempool[RTE_MEMPOOL_OPS_NAMESIZE]; >> rte_eth_dev_get_preferred_pool_ops(ethdev_port_id, pref_mempool /* out */); >> rte_mempool_create_empty(); >> rte_mempool_set_ops_byname( , pref_memppol, ); >> rte_mempool_populate_default(); > > What about introducing an API like: > rte_pktmbuf_poll_create_with_ops (..., ops_name, config_pool); > > I think that API would help for the case the application wants an mbuf pool with ie. stack handler. > Sure we can do the empty/set_ops/populate sequence, but the only thing we want to change from default pktmbuf_pool_create API is the pool handler. > > Application just needs to decide the ops handler to use, either default or one suggested by PMD? > > I think ideally we would have similar APIs: > - rte_mempool_create_with_ops (...) > - rte_memppol_xmem_create_with_ops (...) > Olivier, What do you think? No strong opion but Can we please close/agree on API? I don't want to keep rebasing and pushing new variant in every other version, This whole series and its dependent series ie..octeontx PMD/FPA PMD taregeted for -rc1-v17.11 release therefore if we close on api and get it reviewed by this week, would really appreciate. Thanks. > > Thanks, > Sergio > >> Change History: >> v2 --> v3: >> - Changed version.map from DPDK_17.08 to DPDK_17.11. >> >> v1 --> v2: >> - Renamed rte_eal_get_mempool_name to rte_eal_mbuf_default_mempool_ops(). >> (suggested by Olivier) >> - Renamed _get_preferred_pool to _get_preferred_pool_ops(). >> - Updated API description and changes return val from -EINVAL to -ENOTSUP. >> (Suggested by Olivier) >> * Specific details on v1-->v2 change summary described in each patch. >> >> Checkpatch status: >> - None. >> >> Work History: >> * Refer [1] for v1. >> >> Thanks. >> >> [1] http://dpdk.org/ml/archives/dev/2017-June/067022.html >> >> >> Santosh Shukla (2): >> eal: allow user to override default pool handle >> ethdev: allow pmd to advertise pool handle >> >> lib/librte_eal/bsdapp/eal/eal.c | 17 +++++++++++++++++ >> lib/librte_eal/bsdapp/eal/rte_eal_version.map | 7 +++++++ >> lib/librte_eal/common/eal_common_options.c | 5 +++++ >> lib/librte_eal/common/eal_internal_cfg.h | 1 + >> lib/librte_eal/common/eal_options.h | 2 ++ >> lib/librte_eal/common/include/rte_eal.h | 11 +++++++++++ >> lib/librte_eal/linuxapp/eal/eal.c | 18 ++++++++++++++++++ >> lib/librte_eal/linuxapp/eal/rte_eal_version.map | 7 +++++++ >> lib/librte_ether/rte_ethdev.c | 18 ++++++++++++++++++ >> lib/librte_ether/rte_ethdev.h | 21 +++++++++++++++++++++ >> lib/librte_ether/rte_ether_version.map | 7 +++++++ >> lib/librte_mbuf/rte_mbuf.c | 5 +++-- >> 12 files changed, 117 insertions(+), 2 deletions(-) >> >