From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0078.outbound.protection.outlook.com [104.47.37.78]) by dpdk.org (Postfix) with ESMTP id 29F7A1B2B4 for ; Tue, 10 Oct 2017 16:21:08 +0200 (CEST) Received: from BN3PR03CA0059.namprd03.prod.outlook.com (10.167.1.147) by CO2PR03MB2359.namprd03.prod.outlook.com (10.166.93.19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Tue, 10 Oct 2017 14:21:06 +0000 Received: from BL2FFO11OLC003.protection.gbl (2a01:111:f400:7c09::124) by BN3PR03CA0059.outlook.office365.com (2a01:111:e400:7a4d::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.13.10 via Frontend Transport; Tue, 10 Oct 2017 14:21:06 +0000 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; monjalon.net; dkim=none (message not signed) header.d=none;monjalon.net; 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 BL2FFO11OLC003.mail.protection.outlook.com (10.173.161.187) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.77.10 via Frontend Transport; Tue, 10 Oct 2017 14:21:06 +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 v9AEL2Bt019874; Tue, 10 Oct 2017 07:21:03 -0700 To: Thomas Monjalon , Olivier MATZ References: <1499170968-23016-1-git-send-email-hemant.agrawal@nxp.com> <08774e28-430e-4680-587a-909a5f44c5d6@nxp.com> <20170925102439.jpk4qynni6hmonif@platinum> <2060170.kPZRRlM5QW@xps> CC: , , From: Hemant Agrawal Message-ID: Date: Tue, 10 Oct 2017 19:51:01 +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: <2060170.kPZRRlM5QW@xps> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131521188665835998; (91ab9b29-cfa4-454e-5278-08d120cd25b8); () X-Forefront-Antispam-Report: CIP:192.88.168.50; IPV:NLI; CTRY:US; EFV:NLI; SFV:NSPM; SFS:(10009020)(979002)(6009001)(336005)(39380400002)(346002)(39860400002)(376002)(2980300002)(1109001)(1110001)(339900001)(24454002)(199003)(377454003)(189002)(36756003)(305945005)(8676002)(230700001)(81156014)(81166006)(8936002)(64126003)(68736007)(50466002)(104016004)(53936002)(1720100001)(6306002)(47776003)(86362001)(31696002)(2950100002)(85426001)(77096006)(83506001)(356003)(53546010)(2906002)(23746002)(316002)(65956001)(189998001)(6246003)(498600001)(53376002)(58126008)(966005)(65806001)(54356999)(50986999)(4326008)(229853002)(76176999)(93886005)(106466001)(105606002)(33646002)(54906003)(97736004)(5660300001)(31686004)(65826007)(110136005)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CO2PR03MB2359; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; A:1; MX:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11OLC003; 1:k55ZFYaEE+syp1BRJ0LvBqwIIeeJRYm76QdPsJATzJMln8wqM9i9uxQL8Q1xQ7uh5ZP1HhfyFdwWodlteHydVHFWMuv3DbR8hxJ+dYXy3ziMiVFr4wdj6B+TGUdXFrS6 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 312a7777-1b07-43be-e07f-08d50fea2551 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017052603199)(201703131430075)(201703131517081); SRVR:CO2PR03MB2359; X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 3:NETclLMCT7sdmy7rlA5ceqkqeFUqq7uxoQKbp2xLpCBRyFVc62EZg8Qx/KepQB8a8LNaJ4B2SrUBFBmIwyh6LvPraruKak9FDyXpQyjqdUuMVmBswmaukdDa1/xQgDAc5g1DeXWLpdzPAslrqHfsWWhHOpZgClN1tAP6mkuE6Aq3/rnbY6sy+vsYaVqIul1rLGugGzEu7TDigmh7DgLNgkYSkMyCAG8OUsAbJiHoxd3K6SJZRr2pFhNEO60j7z9yU/VEYrM/2i2HmbsMtx+zybYimihW/WcvbDfZAuEvzWP8yGerEfTxtTT5mfZaOy6YLbZchGXorsxUE053hS58AAiJelWy+xmKRCAR/sH4J20=; 25:pZYiYB7ptBRa0MTx1GOWkNJtcdi1JpRaYQYn9W0pbQS/PPNhOGOSH/DWdFTOWRXnhHM9vEAzC2RkL3d66rvAkFiAwy2l0XFNPv4EgOo3MRqyS8T/+3of4UvRfArrssRzlcLj+QCtzMwHBp/a4iSAL3n2xhdjbcDSV87RYEY4qJycY2qpxPzFcnVQvo2G5OcT0NDmU9RfIfSKBT+WlVRuiqLVZSxdLZKRiKAwGM/wv6BiTrgXaPfz/4NWsSpr9AvgqLYjnj+QfWY/ZEaupZPWiLmZ0UJTjoCgYxK1EMq4ogMWyy/95WbUq/pnhj4VC0F7IEygwiu4E0fXmKw+6lY5Cg== X-MS-TrafficTypeDiagnostic: CO2PR03MB2359: X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 31:T+kmCYKHxPMM2MPQjWOMqArTsqAQYD87M55peJ7ogOsHGCoH368pb0H7FbHl8c2aXAAFxjDWyCQwykykOSEZmphjbaoUoxckOrTYskqcwLcEdnIi3AXaanCsnruWKFQQulWSo+xSjVnxXtD9OpMm8sECqpc/mQTyN9rxBJ1bguYk17yaxHWU0owCL9aYbqEr2wfWF8Un2e0DsYVKPp/R5owAe27zfZX6tXbHAei86vY=; 4:PEss2Quzy0ool9w1yv2+puhrThdwoCuaYdYEgml09PeAtwE9wVGEKIc4NkFlvwSpZ9X8fCr0x2N+HOPiomyChUvv5eAMhQD33sXiubNnjbn75pvZ1Y/FryuPFImp22tzubWHEkOMQY+HIiaQk3e7JrHWwFjrSce6g8h04pYY5EKx3zDwQptvmdvnLDs0b4aCvAt4cHJYdjGUk+KF3BZ13crjQ8n2IJgIPTdYzXE7qdCh3Gqsuv0XwWl1GKjAqDMA7onsUVvCiYqQ0yZgGbwE6hOGNwwBFxAsNvdAie+bxjsi14p24Xns0WJElIOsd5s5HQAhvziY50OrjKmxZ/78Xw== X-Exchange-Antispam-Report-Test: UriScan:(278428928389397)(17755550239193); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(2401047)(5005006)(8121501046)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(3002001)(6055026)(6096035)(20161123556025)(20161123565025)(20161123559100)(201703131430075)(201703131448075)(201703131433075)(201703161259150)(201703151042153)(20161123563025)(20161123561025)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CO2PR03MB2359; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CO2PR03MB2359; X-Forefront-PRVS: 04569283F9 X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CO2PR03MB2359; 23:Mv2EN+feMjwKj1y/PXMCX1WYCz2rIc5C1lDXI?= =?Windows-1252?Q?Ib1PUsDqttMlOVbefo2xxND3wi1WddxVF/G7EK06Pkgo9XXgxrbGc8to?= =?Windows-1252?Q?loTya+MSSJSAb7bV/+uoaIZIepseroprhAfw5dgZxAE/+v5YfnTRAO93?= =?Windows-1252?Q?Jg9PHQfnnW8BZMiBdsHISzOmD+daGBEHCdOETE3XuMF8282kieDoKs/S?= =?Windows-1252?Q?G8QqsNHnamQHxur/CQ2r5ZApTrOiAOR+GuYvjrBokyTI7buwl//eo9d8?= =?Windows-1252?Q?bmXtSv8Z+mVF66VrXIyN/J9juN7LL2sfHprHr2T4/h/xbKkI9rSrmRQB?= =?Windows-1252?Q?eEZnKe4q0tqtCItjd62HYm6Wt/z8LcjFmx5FYHUxsqQSNm6IDGnChdch?= =?Windows-1252?Q?jUKo4KCm3ba8L7lnH7Wmd9GyWQDQJe60akZ/6OpYZltYQj8tzqy8XA1G?= =?Windows-1252?Q?7jdusxmdm3Tlp3HDq2D8Gci6DdknHLm7kfj+Y+B2kH4JF2VyaUliHeLi?= =?Windows-1252?Q?RVohgfOn59dqeyzRqpGK1dc8xZi7o4YQiZsjOvxHPYA02rqWjcpVK0BT?= =?Windows-1252?Q?Obnx9qvlhnn2tZaKMY7ncvPTgV6PGQ5k4hfLiLGFswTUZH6mwa098wRj?= =?Windows-1252?Q?rpapgmkGKRwd3RzJoVlMFnnUrLoepAkIaNUT9ySgSF5115K/0Uxitlay?= =?Windows-1252?Q?XfISV3tHVbDpHRTBFQ11OhukL+JWAnP7qC2mtWYuOuKulJ6zeJ4dZIpZ?= =?Windows-1252?Q?vz5qp6d8F3kFbp1R4gNKKomVEQj1wgKwW3HpnN7xx9NqWfhgoRhxQVYn?= =?Windows-1252?Q?djHm2+misqYfSFXxlIAuTX/nuJrYIMcubouS9A6usM/G3pZsBaSF3u7m?= =?Windows-1252?Q?MkAanRz47HO4+7Jr4/Ocwp2mXZgv+DW3TWXupO+hi50rSU2JGIfNo+bB?= =?Windows-1252?Q?MMXI7yYC48VLuI0NlOAYuSUb9ECRMEIDz5ah5eKrmNZcIHkGrxMz50Cr?= =?Windows-1252?Q?aGrp/Gooxt2ZhkS3JINYSob3AS0/ahNIhjmA+htihjIKaPoARVUzsSwp?= =?Windows-1252?Q?ecXENWpuy69WK3TS/uLXgpj4ZW88EhPuk4hSju7DwKMMizMVy7W/PGCy?= =?Windows-1252?Q?h1kH26S+D2YgTbpP2mkS3ZqbzzVVWlGSnOhmauFEA0ldQA/oh4vkF88t?= =?Windows-1252?Q?vN6lzVFMqi8XjGZ7Lq7gtwmJWNDI8w+70tebkUyvnytcAq7XuEQMjrb4?= =?Windows-1252?Q?uVtIpfSAg/67Cphktgd4S4A1ADBb6mlfN3sJZuHhibTd7jVFbCXxOY+C?= =?Windows-1252?Q?dVi4JBbkxQCi7D3qXsAt0YRKupfQemEZ1ppjdTDhryr739ZgGW1+q30r?= =?Windows-1252?Q?/VywipyicDpTdn/ZrBzFcDcK9EB9e1gI+XYKOzs0HJZcVE0F1OKhEgc4?= =?Windows-1252?Q?J8QHNpcwe19E6AZQMo6L8PP+YZLZNuyZZTtCHzCp4tNgea5pI8j+zIWy?= =?Windows-1252?Q?RBcsl3DhtZZr91vpvckZHVD3NjOwO7fPKZ44w8Oty1YO+lXYD8ufo8MH?= =?Windows-1252?Q?V/dZHq5LxwpvMn/B9SZyhCAD7m6FVB/DtU6JrfQjey06JilqsHdm7yXn?= =?Windows-1252?Q?ZshKhgnyUM6UY9jmOo/8AS1JizEgMA28sY0Io/bq+Oj+pzXMAgMJxLS6?= =?Windows-1252?Q?LHTr6u+8w=3D=3D?= X-Microsoft-Exchange-Diagnostics: 1; CO2PR03MB2359; 6:pfaFFGMx8DZ8GkEnSFoLeMYAD496xyTCyzB+59pwGMdGX2SIxy6xi3NH+FEsa1f8ubWfkfY5SRca69o5ZZn12Owyn5z+TMQJTRMVk4T7ZJws5oXuK0QJ02y0w2zGD39njkQlJVmYUDF2J8KWGn1V49XYR8WQnAiP9hsJ102Nm9LYi+j6ea7bOC7joMQe9gpxKsb7ZlIzZCuRTzK0L1KwqSTpFd29huVX9Q5nq7QbmAv89iQjoV9Cpochb/ggc46DD5DtcDOMkxhgufOAi0f1Xa5H4UAd/seyRJ9u062yvPFHDNMRA6FT0xxWVcsv7EmP6YjIAqKmAgAv86peaIY9Ow==; 5:8PZFy5vNtKeU8Xfdcnb4i4oLaydBweKgf6+Oeb7r+WgOmnz3frmyVpEyfkitXisyZ0HD2hacmN034y0XXnCuI8ri00uJi7RvVNqYjEJ4E5YIXHIWuk65247Wo3G4dpxAhJHuLeySIrkOp083/FIFVQ==; 24:CejodODZJddFkqATvbw/6vtYfNxjUGW9/Z41A/mUG95Fqnlld9wdcrUvPm/ltgcjuxZ6EDWRs4olQSu8uBq7q0oMif6QBQ5J94boY9sy6Go=; 7:6qYkawFJ9z7YTRVkUKxxVbT83Dp1YOHjVbdtWDNfp44kMav/tKt8TLf3R3MCCiVR1CfDgicEmCYmeqPPooTSN+QSpM0Ku/q1LKZuAe/GxFeuy89vACGnekchI6mIpC6OJ6jWJYJlSUpNl8WdhQbzqOONVL6jJLR+S66UJsAj/we2hrzSi2a2VCbeUDLkYa54dvcCOF1NVd6j25azwFG/wtJdQFIfv/UgCrSTM8Rw6GM= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 10 Oct 2017 14:21:06.4120 (UTC) 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: CO2PR03MB2359 Subject: Re: [dpdk-dev] [PATCH 0/2] Multiple Pktmbuf mempool 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: Tue, 10 Oct 2017 14:21:08 -0000 On 10/10/2017 7:45 PM, Thomas Monjalon wrote: > 25/09/2017 12:24, Olivier MATZ: >> Hi Hemant, >> >> On Fri, Sep 22, 2017 at 12:43:36PM +0530, Hemant Agrawal wrote: >>> On 7/4/2017 5:52 PM, Hemant Agrawal wrote: >>>> This patch is in addition to the patch series[1] submitted by >>>> Santosh to allow application to set mempool handle. >>>> >>>> The existing pktmbuf pool create api only support the internal use >>>> of "CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS", which assumes that the HW >>>> can only support one type of mempool for packet mbuf. >>>> >>>> There are multiple additional requirements. >>>> >>>> 1. The platform independent image detects the underlying bus, >>>> based on the bus and resource detected, it will dynamically select >>>> the default mempool. This need not to have the application knowlege. >>>> e.g. DPAA2 and DPAA are two different NXP platforms, based on the >>>> underlying platform the default ops for mbuf can be dpaa or dpaa2. >>>> Application should work seemlessly whether it is running on dpaa or dpaa2. >>>> >>>> 2.Platform support more than one type of mempool for pktmbuf, >>>> depend on the availability of resource, the driver can decide one >>>> of the mempool for the current packet mbuf request. >>>> >>>> 3. In case of where application is providing the mempool, as proposed >>>> in [1], the check preference logic will be bypassed and application >>>> config will take priority. >>>> >>>> [1]Allow application set mempool handle >>>> http://dpdk.org/ml/archives/dev/2017-June/067022.html >>>> >>>> Hemant Agrawal (2): >>>> mempool: check the support for the given mempool >>>> mbuf: add support for preferred mempool list >>>> >>>> config/common_base | 2 ++ >>>> lib/librte_mbuf/rte_mbuf.c | 28 +++++++++++++++++++++++----- >>>> lib/librte_mempool/rte_mempool.h | 24 ++++++++++++++++++++++++ >>>> lib/librte_mempool/rte_mempool_ops.c | 32 ++++++++++++++++++++++++++++++++ >>>> 4 files changed, 81 insertions(+), 5 deletions(-) >>>> >>> >>> Hi Olivier, >>> Any opinion on this patchset? >> >> Sorry for the lack of feedback, for some reason I missed the initial >> mails. >> >> I don't quite like the idea of having hardcoded config: >> CONFIG_RTE_MBUF_BACKUP_MEMPOOL_OPS_1="" >> CONFIG_RTE_MBUF_BACKUP_MEMPOOL_OPS_2="" >> >> Also, I'm a bit reserved about rte_mempool_ops_check_support(): it can >> return "supported" but the creation of the pool can still fail later due >> to the creation parameters (element count/size, mempool flags, ...). >> >> The ordering preference of these mempool ops may also depend on the >> configuration (enabled ports for instance) or user choices. >> >> Let me propose you another approach to (I hope) solve your issue, based >> on Santosh's patches [1]. >> >> We can introduce a new helper that could be used by applications to >> dynamically select the best mempool ops. It could be something similar >> to the pseudo-code I've written in [3]. >> >> // return an array pool ops name, ordered by preference >> pool_ops = get_ordered_pool_ops_list() >> >> Then try to create the first pool, if it fails, try the next, until >> it is succesful. >> >> That said, it is difficult to take the good decision inside >> rte_pktmbuf_pool_create() because we don't have all the information. >> Sergio and Jerin suggested to introduce a new argument ops_name to >> rte_pktmbuf_pool_create() [2]. From what I remember, this is also >> something you were in favor of, right? >> >> In that case, we can move the difficult task of choosing the >> right mempool inside the application. >> >> Comments? > > I guess this discussion is obsolete since Santosh commit? > http://dpdk.org/commit/a103a97e > > Not yet. On the basis of our discussion with Olivier and Santosh commit, we are working out a way, which solves our issue. We will close on it in next few days.