From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0072.outbound.protection.outlook.com [104.47.41.72]) by dpdk.org (Postfix) with ESMTP id 106761D7 for ; Fri, 22 Dec 2017 17:19:23 +0100 (CET) Received: from MWHPR03CA0014.namprd03.prod.outlook.com (10.175.133.152) by CY4PR03MB2695.namprd03.prod.outlook.com (10.173.43.138) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.323.15; Fri, 22 Dec 2017 16:19:22 +0000 Received: from BL2FFO11FD044.protection.gbl (2a01:111:f400:7c09::100) by MWHPR03CA0014.outlook.office365.com (2603:10b6:300:117::24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.345.14 via Frontend Transport; Fri, 22 Dec 2017 16:19:22 +0000 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 BL2FFO11FD044.mail.protection.outlook.com (10.173.161.140) with Microsoft SMTP Server (version=TLS1_0, cipher=TLS_RSA_WITH_AES_256_CBC_SHA) id 15.20.302.6 via Frontend Transport; Fri, 22 Dec 2017 16:19:06 +0000 Received: from [10.214.249.127] ([10.214.249.127]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id vBMGI7gL020876; Fri, 22 Dec 2017 09:18:29 -0700 To: Olivier MATZ References: <1512563473-19969-1-git-send-email-hemant.agrawal@nxp.com> <20171219102456.ghipiyb2ig43d4nk@glumotte.dev.6wind.com> <830d3e36-921b-ef7a-51a4-6d135b15e973@nxp.com> <20171219110204.uqxw4xy66o65pnjz@glumotte.dev.6wind.com> <9adf0fc2-b233-26c6-b866-236d6277a4ed@nxp.com> <42572f99-99bd-ee70-e631-b817d1d679ac@nxp.com> <20171222135929.ei35n7gs55u3jqvr@platinum> CC: From: Hemant Agrawal Message-ID: Date: Fri, 22 Dec 2017 21:48: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: <20171222135929.ei35n7gs55u3jqvr@platinum> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131584331472269144; (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)(336005)(39380400002)(39860400002)(396003)(376002)(346002)(2980300002)(1109001)(1110001)(339900001)(189003)(199004)(24454002)(81166006)(356003)(65826007)(8936002)(68736007)(316002)(81156014)(5660300001)(58126008)(2906002)(31686004)(64126003)(50466002)(8676002)(305945005)(105606002)(67846002)(104016004)(93886005)(77096006)(83506002)(229853002)(498600001)(47776003)(76176011)(97736004)(65956001)(106466001)(6246003)(65806001)(36756003)(6916009)(53546011)(2950100002)(23746002)(230700001)(31696002)(6666003)(53936002)(4326008)(86362001)(969003)(989001)(999001)(1009001)(1019001); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR03MB2695; H:tx30smr01.am.freescale.net; FPR:; SPF:Fail; PTR:InfoDomainNonexistent; MX:1; A:1; LANG:en; X-Microsoft-Exchange-Diagnostics: 1; BL2FFO11FD044; 1:wK58JYLyJZknamh1kU6yimSLhVFG/bnLGKG6Pz7Ai6JP1cC+D+jW09YaDUBjmPWOf3rUqj9kqznS4hfgZcFHqle0dWW3xkkJKvS9dASNsUjsqOLOTTi5fQcG9HHqyBCe X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 98deb995-644c-4b15-6f58-08d54957b9e0 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(4534020)(4628075)(201703131517081)(5600026)(4604075)(2017052603307); SRVR:CY4PR03MB2695; X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 3:RUTrLkHGXmlsNUNL2p5LX+qJeeJVZSfIKFUk5HMF1xkWpUe/zAdsc7Pvyn4aaM6NOtPKmH9xrx+OO4RTLaWf1S1m9ChSc6kt6Gnr5VjgkYIl0tlNw7X+YoMcKnJzT/qS8k5h5mpspy71OkYn+84EY0L4tf117cVrsoqHum676kjWqBr51HDaf61oPPQVbDYK+OvAm/pProt2a+b06Dtiq4jrsIUL7NE0zb6b/AqFoqwYSxmVBvIECdZG5MJHCXSK2WB07JpiDsNxwcn+0hfFiYNU8NH7wRLc/n/PKzZE4G5jJdGVBoWvQNg6aINfaYzzxYrkl0YMXOBTaD7FFvCrGpZjfGpMh8hYEQ287Ib5jMU=; 25:XCbdZdaHNpxbh5djpy58l6EJiFSGm7YzTwcWlG4IGze4hGPDKCksirFq+1CbSl/16yQHiiLYF7dQIuW1lwm3LUjnbA/qqbcrd+EyhAOw8M3LYGBKyIHTn/OCiadQQnrpDC1IXNMK7N530s+iupYELOdi7mBsvsz594Sr3PelMdR67aAWzOb3JaBSMm8Fhjwq15rnxorMf3wDpH2bk3rDc+HLuH6ga2UueTQmBaDgCE10iRS2VgRA/q5s3yJY0ajsnV0VyNPGxCD7ODBbb+YJH7hjGmp1/DBtBjdfKrgc/Vkb6koDNdINxzmXYO+DILSsXy1UDWD4yXe+hCuGF+nwgw== X-MS-TrafficTypeDiagnostic: CY4PR03MB2695: X-Microsoft-Exchange-Diagnostics: 1; CY4PR03MB2695; 31:icR+hzGxcNINB69q5JqeCqp+zVMZWLgN0LidC7LWdDxTAV6q3x5K9nz3sESSXT9xU+vOLBticUZqYOtm3hXriTqvSeGDsCfKMtb+NyfCRet6TLsBk4VsoQeM5vIxTYRhI+IhcMSnDbHeqRRuG15be3Pd2JcWNuIdXfbkFu9lrSXOlCiuz4T65pKKD4eG3ay/qhQbp/qi+RGzY3QUKa4EMnPBVvCU22q7d+ocWl6KqwE=; 4:QI7f+U0AqAQSCAfed8hkWnDhBoSJBUaoNEsID2Ejxr/VVw7DktvKWTkSScxjW+bGeVTA1GugBKw/mkDwBVB4j302DvzLyjmRIHRxzVPCXdQ93bn+wV2Xc7UOWTUR7ZgyXGYchfVXy3wBjchfNdJc6uubfdEEsd0074u24S/AK+l021C08ACaB4KNKfT7Qpw5WuA95qRilVbWOSc4J5Sdu8cRcHhWpQYPDPY4CwHuKvr85jH+UUuqtZBDoZZJzh1OQsaNPcSUiT1ZS7Z60V8pnYxyj27+mdgtIgH+xutXA6ieTS3spsGCkNhCuH5GYfZe X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(131327999870524); X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6095135)(2401047)(8121501046)(5005006)(3231023)(944510045)(944921045)(946801045)(946901045)(3002001)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123559100)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123565025)(20161123556025)(20161123563025)(20161123561025)(201708071742011); SRVR:CY4PR03MB2695; BCL:0; PCL:0; RULEID:(100000803101)(100110400095)(400006); SRVR:CY4PR03MB2695; X-Forefront-PRVS: 05299D545B X-Microsoft-Exchange-Diagnostics: =?Windows-1252?Q?1; CY4PR03MB2695; 23:v9TVqcRmKIzerlTbNv0Fy4mPnpVdWX00Qbgwm?= =?Windows-1252?Q?YU1I045fPdGTeApJnl+xIEg5jxVQzKvo8V+HRy2n9qEJi5XrqsXiNQnx?= =?Windows-1252?Q?R8oK5XBstTsozF/CJZ1TtCCLhOwOIvm1CokwphtHzVVLQtfOeVVIUhm6?= =?Windows-1252?Q?Mnu8a1gMt/KHGwM0DQHYBNo5tKP7ccek/WHvwMqT5kOKO5cUYSVFZoN9?= =?Windows-1252?Q?TIZMtelV0Nn68BiEonm/AzZVK1Xidz+Az1BZux7JNSb6K/BYCqpAX6Pv?= =?Windows-1252?Q?p9DI3tQKm0ZWm55Ir0Hgeb0hZyE1ctnSF2G3VgoQ660CLAU1eLdbjrs8?= =?Windows-1252?Q?BP4c0NASfZH5N+bg9XGn7BHGUFmtcYoFYmNJzxjjsSwEw7CklSHNCPXp?= =?Windows-1252?Q?F8oBH4dffOHNc4D69nBRcCT6JylWxCTHk+ewvBHSHccsrd8A8M2GSzeW?= =?Windows-1252?Q?6Iz4yB3PRFKKmPyELPqj3rB4ItUN7bJVI8+irabUnvQBbPgt2xRQVw8h?= =?Windows-1252?Q?G3XwhnP194uTxOodhqWYK8NsvxI01OUkhFN0j1lQXjHcl84/9ciHE2+h?= =?Windows-1252?Q?R0Ttw099DJkRbshzIg64VxmszAoW1hgwL1os0rX1K1GXZYaKsztF9Loo?= =?Windows-1252?Q?NSuxl4ibNdWBu87vBjHiF7av+NeNb5wZT/KHdC3J7kHa6PbARTJbFFnF?= =?Windows-1252?Q?BUjqXPefN7mu1GoM8izuJ/uK9/aIYXww/uilRrooTHFpwTCf0LCB9jZy?= =?Windows-1252?Q?egXPpkkEEx6IhhBmAyVdCRI+tpG1KEdxE5xi7KZhsQjAs5bhb3fQAdV9?= =?Windows-1252?Q?qpIiGQ9pWmPBc4adJpzWTcgPt9wW7JZM538joJmy0b1fAjJNub25IqBr?= =?Windows-1252?Q?SLV5Lnwe2TncxyI2ANy/B7g0ajs6WlSQAOGoafU11S/a5aT6NpRXMj6f?= =?Windows-1252?Q?TGUd/Xxy+fyxbGUkrcdl0LlWOwoxs1Geaz9bfO6TOGYbsw0P5/PUBMKM?= =?Windows-1252?Q?ZqtmbJ1/d99VibVRsWIJRSgoUBU/7jgpA/FC4ANW5KzKBZcTDYSAncsq?= =?Windows-1252?Q?nB9zAxYSKVJFF+XNXmJrWGSfS9PifCzCqWO/McNO5sEMJ/B46hJpCcFI?= =?Windows-1252?Q?jpXIWgHlEH39LXgIbBcA3/OAzA1P91V4KvMKS0nNNUAoiU/VuqTUzI3w?= =?Windows-1252?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bObjxjE+39OhhjoKgGvXhQ6j8iQ9SwOvEQWMgrVBbP+wAke2G9Wgc7et7YP6CQ2s8Km7o3FKRLcVCgH7vKr88ec58s4lHDSYRbMOYT5OJOuX2Mhb4RivCFbxnThCpC6y6OiRCUZ4wWwOW3GeNKlGMArYJEz0GJj3eXB1M+SHFEFFJSs46GGWHEKqeFRWEP1t+m67suOj8OKz4V2NDqrHuAmFA98IgBJjb SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Dec 2017 16:19:06.8057 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 98deb995-644c-4b15-6f58-08d54957b9e0 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: CY4PR03MB2695 Subject: Re: [dpdk-dev] [PATCH 1/2] mempool: indicate the usages of multi memzones 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: Fri, 22 Dec 2017 16:19:24 -0000 On 12/22/2017 7:29 PM, Olivier MATZ wrote: > On Wed, Dec 20, 2017 at 05:29:59PM +0530, Hemant Agrawal wrote: >> On 12/19/2017 6:38 PM, Hemant Agrawal wrote: >>> >>>> That's true, I commented too fast :) >>>> And what about using mp->nb_mem_chunks instead? Would it do the job >>>> in your use-case? >>> >>> It should work. Let me check it out. >> >> There is a slight problem with nb_mem_chunks. >> >> It is getting incremented in the end of "rte_mempool_populate_phys", >> while the elements are getting populated before it in the call of >> mempool_add_elem. >> >> I can use nb_mem_chunks are '0' check. However it can break in future if >> mempool_populate_phys changes. > > Sorry, I'm not sure I'm getting what you say. > > My question was about using mp->nb_mem_chunks instead of a new flag in the > dppa driver. Am I missing something? > mp->nb_mem_chunks gets finalized when the mempool is fully created. It's value is transient before that i.e. it will keep on changing on the every call to rte_mempool_populate_phys. However, we need this information on the very first element allocation. So, nb_mem_chunks will not work.