From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-CY1-obe.outbound.protection.outlook.com (mail-cys01nam02on0059.outbound.protection.outlook.com [104.47.37.59]) by dpdk.org (Postfix) with ESMTP id BE77A1B03C; Thu, 1 Feb 2018 10:30:19 +0100 (CET) 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=sOGhMkgOg0weZmOdNfMsu0e0hL41s92NJEpzxicIP8Q=; b=I/c//6ljPhFGQZDVhl+H9OY4+xMbI2AAvPLXwrEU9fVDnHlA/9C0mpv1SQm7idA5xESwuz2V6lb7IiogQlUMA8m7WiT+dz3yeeufNrjvAzvAQwWgoWviZzKBkexNcg44M4fa/Y/KqOgLMLuLyH1zTpf4nOSA9Z/w0XgKmm3530s= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.105] (103.76.56.167) by BY1PR0701MB1894.namprd07.prod.outlook.com (2a01:111:e400:51ab::23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.444.14; Thu, 1 Feb 2018 09:30:15 +0000 To: Andrew Rybchenko , Olivier Matz Cc: dev@dpdk.org, stable@dpdk.org, jerin.jacob@caviumnetworks.com References: <1511539591-20966-1-git-send-email-arybchenko@solarflare.com> <1516713372-10572-1-git-send-email-arybchenko@solarflare.com> <1516713372-10572-2-git-send-email-arybchenko@solarflare.com> <20180131164504.cnfgfwo2x3ftxnaj@platinum> <90005aad-1508-44bc-92a4-7c5d5f7b0246@caviumnetworks.com> From: santosh Message-ID: <53796b3f-b2c2-dcfc-a10b-71ce1a68d3d2@caviumnetworks.com> Date: Thu, 1 Feb 2018 15:00:00 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: BMXPR01CA0020.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:d::30) To BY1PR0701MB1894.namprd07.prod.outlook.com (2a01:111:e400:51ab::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: e0f9011b-5680-4fb6-120b-08d569566803 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:BY1PR0701MB1894; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1894; 3:B0o0i1b+5/BV4d228+eTbII1Umq1heYkHDaV6SAzFa8jZ9csu2Wr4lhBHm7dCIZx575QLtLm+BLb1H6rFv49NI64VcxPev6XopJG9LwKYEs9GQ0YQrl75U/m5QssxR8J7XYEgBGiPFTG5FbVd54Lpcop91xWDYuPWPgq9lDAdfOZ2AyW6/kME9VSbuKKKOdMN/PIh5/oG+2cllxlJZbwTG37pO678U8fkOSemRjcNldKoDgbEMEgT9ZPN37oNL6J; 25:zqy2oomo8ObHbalkkl60bVum1vCwlc+/X2rjIZjvdGxxbopOorj2ptIQpb4UtVZGMhF8WQMTqSN8Jd4GSk7leFXg1rEOH5a7adRMxQU5/rdNrB2E36M+gHKe2zIEqOyoOxkDSg1VZtsOyX73k0vTGJKdPdC7vE9TIJGdd8/1B+X5DkZfAAdhXno5G2TAm0ZWB/xqztm2tnhjb08YosWORRtaLMgniYh0MmeFSyD8FPHYgJ6q2prsUGN88yO59/EabcMUp8oKnWN8Pntwir1c66MfMfvcdk32lTAuWPHkLCYuXegth0MxCBf9YA2PZG2HMdi7Xn5Z4/RJA1dqUR0zVw==; 31:WRxOeIo0DqpVA//a9Dmy/gjkKEA+xY9WqTDTxAevLQ+2FYz41hoSNgDQ7gRS6SPELbYi5NQ/glnprxdur0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227LG56ovF6hicUGFXyQ62mPqX072qWlFdrbM5sBQjeA== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(6040501)(2401047)(8121501046)(5005006)(93006095)(3231101)(2400082)(944501161)(3002001)(10201501046)(6041288)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123564045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BY1PR0701MB1894; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1894; X-Forefront-PRVS: 0570F1F193 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(366004)(396003)(39860400002)(376002)(39380400002)(346002)(189003)(199004)(229853002)(86152003)(77096007)(106356001)(8936002)(8676002)(50466002)(2950100002)(65826007)(42882006)(6486002)(81156014)(81166006)(31696002)(47776003)(107886003)(66066001)(65806001)(65956001)(72206003)(5660300001)(16526019)(117156002)(64126003)(93886005)(6666003)(31686004)(25786009)(97736004)(83506002)(110136005)(316002)(2870700001)(53546011)(36756003)(386003)(52146003)(68736007)(76176011)(2486003)(23676004)(52116002)(59450400001)(58126008)(26005)(3846002)(53936002)(6116002)(2906002)(105586002)(6246003)(4326008)(16576012)(7736002)(305945005)(478600001); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1894; H:[192.168.0.105]; FPR:; SPF:None; PTR:InfoNoRecords; MX:1; A:1; LANG:en; Received-SPF: None (protection.outlook.com: cavium.com does not designate permitted sender hosts) X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtCWTFQUjA3MDFNQjE4OTQ7MjM6czl6Y2kvSWJQSmFvUThvamNwQ21kTXh2?= =?utf-8?B?NmxFQ3ZvbmR1bFRYdExIcGduSnlIdjRad0dnS3Bsb2FpZFAxMm14Y0FtZkRa?= =?utf-8?B?Vk1IZzJzSU9lYWVFMDgyM3NQWHp0WXdXc1BOenF6eEN0NUpQTn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nosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2018 09:30:15.4522 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: e0f9011b-5680-4fb6-120b-08d569566803 X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: BY1PR0701MB1894 Subject: Re: [dpdk-stable] [dpdk-dev] [RFC v2 01/17] mempool: fix phys contig check if populate default skipped X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Feb 2018 09:30:20 -0000 On Thursday 01 February 2018 02:48 PM, Andrew Rybchenko wrote: > On 02/01/2018 12:09 PM, santosh wrote: >> On Thursday 01 February 2018 12:24 PM, Andrew Rybchenko wrote: >>> On 02/01/2018 08:05 AM, santosh wrote: >>>> On Wednesday 31 January 2018 10:15 PM, Olivier Matz wrote: >>>>> On Tue, Jan 23, 2018 at 01:15:56PM +0000, Andrew Rybchenko wrote: >>>>>> There is not specified dependency between rte_mempool_populate_default() >>>>>> and rte_mempool_populate_iova(). So, the second should not rely on the >>>>>> fact that the first adds capability flags to the mempool flags. >>>>>> >>>>>> Fixes: 65cf769f5e6a ("mempool: detect physical contiguous objects") >>>>>> Cc: stable@dpdk.org >>>>>> >>>>>> Signed-off-by: Andrew Rybchenko >>>>> Looks good to me. I agree it's strange that the mp->flags are >>>>> updated with capabilities only in rte_mempool_populate_default(). >>>>> I see that this behavior is removed later in the patchset since the >>>>> get_capa() is removed! >>>>> >>>>> However maybe this single patch could go in 18.02. >>>>> +Santosh +Jerin since it's mostly about Octeon. >>>> rte_mempool_xmem_size should return correct size if MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS flag >>>> is set in 'mp->flags'. Thats why _ops_get_capabilities() called in _populate_default() but not >>>> at _populate_iova(). >>>> I think, this 'alone' patch may break octeontx mempool. >>> The patch does not touch rte_mempool_populate_default(). >>> _ops_get_capabilities() is still called there before >>> rte_mempool_xmem_size(). The theoretical problem which >>> the patch tries to fix is the case when >>> rte_mempool_populate_default() is not called at all. I.e. application >>> calls _ops_get_capabilities() to get flags, then, together with >>> mp->flags, calls rte_mempool_xmem_size() directly, allocates >>> calculated amount of memory and calls _populate_iova(). >>> >> In that case, Application does like below: >> >>     /* Get mempool capabilities */ >>     mp_flags = 0; >>     ret = rte_mempool_ops_get_capabilities(mp, &mp_flags); >>     if ((ret < 0) && (ret != -ENOTSUP)) >>         return ret; >> >>     /* update mempool capabilities */ >>     mp->flags |= mp_flags; > > Above line is not mandatory. "mp->flags | mp_flags" could be simply > passed to  rte_mempool_xmem_size() below. > That depends and again upto application requirement, if app further down wants to refer mp->flags for _align/_contig then better update to mp->flags. But that wasn't the point of discussion, I'm trying to understand that w/o this patch, whats could be the application level problem?