From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM03-DM3-obe.outbound.protection.outlook.com (mail-dm3nam03on0070.outbound.protection.outlook.com [104.47.41.70]) by dpdk.org (Postfix) with ESMTP id 044F1728E for ; Sun, 11 Mar 2018 07:32:07 +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=AV1bfATunXoh/9fUB6TKNyIP29mqfkub5ChzqsiaCgc=; b=QInRFVjI27Ut6LgmmLJrsADxEBvyAZFggV6DICzVcMdTEj+Y1/Jpqx9lBh5jdcjIB7gDDtCo90+jXr+e4fV4q+96UeKhnP6ipswPZpLfp4Hx8O78OQD8saxKxwm8+U2JdViIKmcz/05URTw4vIn41tQc6vDNpG/m+iTi8qpELmc= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.106] (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.548.13; Sun, 11 Mar 2018 06:32:03 +0000 To: Andrew Rybchenko , dev Cc: Olivier MATZ , Jerin Jacob References: <1511539591-20966-1-git-send-email-arybchenko@solarflare.com> <1516713372-10572-1-git-send-email-arybchenko@solarflare.com> <1516713372-10572-4-git-send-email-arybchenko@solarflare.com> <6f42aa65-e214-0bab-6b9d-09a5c2f4f171@solarflare.com> From: santosh Message-ID: <2d1f195e-c6d7-5bb2-8d2b-e38af989d97b@caviumnetworks.com> Date: Sun, 11 Mar 2018 12:01:48 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <6f42aa65-e214-0bab-6b9d-09a5c2f4f171@solarflare.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Content-Language: en-US X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: BM1PR0101CA0028.INDPRD01.PROD.OUTLOOK.COM (2603:1096:b00:1a::14) To BY1PR0701MB1894.namprd07.prod.outlook.com (2a01:111:e400:51ab::23) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 88144f07-065a-48d7-59a9-08d58719ce87 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603328)(7153060)(7193020); SRVR:BY1PR0701MB1894; X-Microsoft-Exchange-Diagnostics: 1; BY1PR0701MB1894; 3:BpA7rL/YU4xxOieW+J38losVaDUbrmMvDmXmZSJdSuLoDERZ+YedU8gbPfQLaWRMhR2PtRTpO08CsNEC4SI+G3LadHAaWdq2whLej3Av6OtPTKCZIk3BhYG8C2C1BqVF4z9W3uXD//UTJRUVequ1g3IBk9VMOyg9RAt6W9TsiQT9mrflsJEuNCMNLW9LxWtpufF+8gLat5xyPFERpkhgNqdZTc/zXmHsUdYvhID8uFOub3CMP+o2nsfwE8O0rQkB; 25:SnXvBb0bYRcHcfFfg7mfCqCMtT8LCuXe6GFw322uJ+yOKQ2lK/2U3zhUScG2USLYTCwXRhkDglGY1cwOZRYi1uxVPUOMmn3Oy56i98+E6hU9FA1zZKhZn25X32yh5tcXIk+DmNMnDKXjtAlnz1o8BJPe12gQXSaS0ky/5IcAflH+oic8psLBKaiZX/tEh5N+x8cKbHcsf7tYdwkS1lAzO+xAzlV7Zjys5gqgUzSKgcjsjF9kLn8lKnYYv7tjYUJx46JpIL7wnFVzC2WnGHXbv1zRjMjQSP/LwCTYb6WYkHcI1Wfe/XLo/8Z0lfHAHi1NuampJ1SEeqvfTQpUp4iQ6g==; 31:7Fnu37dGALgAzEBD1JSPrWmFNW5n9QYr4dBGXfW0JuDm6w4plkjl2MLP9e+UVXmW7922VFyMla++dTX/db3a+xUmVexTqU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GOTTtkTvay0PdyrGfBycjcFcaFN5OQB/2GMdFccM7QM+vaMrg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:; X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(8211001083)(6040522)(2401047)(8121501046)(5005006)(3002001)(93006095)(10201501046)(3231220)(944501244)(52105095)(6041310)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123560045)(20161123562045)(20161123558120)(6072148)(201708071742011); SRVR:BY1PR0701MB1894; BCL:0; PCL:0; RULEID:; SRVR:BY1PR0701MB1894; X-Forefront-PRVS: 0608DEDB67 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(376002)(39380400002)(346002)(396003)(366004)(39850400004)(189003)(199004)(81166006)(106356001)(81156014)(31686004)(105586002)(36756003)(93886005)(6116002)(3846002)(2870700001)(2906002)(68736007)(31696002)(50466002)(64126003)(7736002)(305945005)(66066001)(65956001)(65806001)(47776003)(8936002)(8676002)(76176011)(54906003)(58126008)(110136005)(386003)(53546011)(316002)(16576012)(5660300001)(65826007)(2486003)(6246003)(42882007)(107886003)(25786009)(23676004)(117156002)(229853002)(72206003)(6666003)(86152003)(6306002)(77096007)(52116002)(966005)(16526019)(53936002)(97736004)(478600001)(6486002)(4326008)(26005)(2950100002)(52146003); DIR:OUT; SFP:1101; SCL:1; SRVR:BY1PR0701MB1894; H:[192.168.0.106]; 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?MTtCWTFQUjA3MDFNQjE4OTQ7MjM6bkkzanl3aHJjRkRaNHIyMWNqV2pqWWlO?= =?utf-8?B?d3R5NVBpUzdXY1NUZ21CVG9Cck5kbS8rWkJyRkc5R0lMVE95SEZsZ2JRajYz?= =?utf-8?B?VGMrTmNyY0lnUm9PQksyR2ErUTJ4OTRn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6WwvpSC5OXKTx1A6iG3So4Os339RkvaKcBuGO1swFAb4ZKXishMheo6aLXwVmkLwpCv9vTvgU76gttE/w40Mih/X7pER2gDq3gQWNDiEFPIXaZYoCVtTewN4vm467zNBu98ONx2nQ9ytY0BfjB2YgGs9qmop/QE1TaePuZOMoQgLXmc/pCv2vx37gLzX6Jox4szNf7jvdH0UJp1ZydX8b8vUDa5aObbyDJ01 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 11 Mar 2018 06:32:03.7951 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 88144f07-065a-48d7-59a9-08d58719ce87 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-dev] [RFC v2 03/17] mempool/octeontx: add callback to calculate memory size 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: Sun, 11 Mar 2018 06:32:08 -0000 Hi Andrew, On Saturday 10 March 2018 09:19 PM, Andrew Rybchenko wrote: > Hi Santosh, > > On 02/01/2018 04:40 PM, santosh wrote: >> On Thursday 01 February 2018 03:31 PM, santosh wrote: >>> Hi Andrew, >>> >>> >>> On Thursday 01 February 2018 11:48 AM, Jacob, Jerin wrote: >>>> The driver requires one and only one physically contiguous >>>> memory chunk for all objects. >>>> >>>> Signed-off-by: Andrew Rybchenko >>>> --- >>>>    drivers/mempool/octeontx/rte_mempool_octeontx.c | 25 +++++++++++++++++++++++++ >>>>    1 file changed, 25 insertions(+) >>>> >>>> diff --git a/drivers/mempool/octeontx/rte_mempool_octeontx.c >>>> b/drivers/mempool/octeontx/rte_mempool_octeontx.c >>>> index d143d05..4ec5efe 100644 >>>> --- a/drivers/mempool/octeontx/rte_mempool_octeontx.c >>>> +++ b/drivers/mempool/octeontx/rte_mempool_octeontx.c >>>> @@ -136,6 +136,30 @@ octeontx_fpavf_get_capabilities(const struct rte_mempool *mp, >>>>            return 0; >>>>    } >>>> >>>> +static ssize_t >>>> +octeontx_fpavf_calc_mem_size(const struct rte_mempool *mp, >>>> +                            uint32_t obj_num, uint32_t pg_shift, >>>> +                            size_t *min_chunk_size, size_t *align) >>>> +{ >>>> +       ssize_t mem_size; >>>> + >>>> +       /* >>>> +        * Simply need space for one more object to be able to >>>> +        * fullfil alignment requirements. >>>> +        */ >>>> +       mem_size = rte_mempool_calc_mem_size_def(mp, obj_num + 1, pg_shift, >>>> + >>> I think, you don't need that (obj_num + 1) as because >>> rte_xmem_calc_int() will be checking flags for >>> _ALIGNED + _CAPA_PHYS_CONFIG i.e.. >>> >>>     mask = MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS | MEMPOOL_F_CAPA_PHYS_CONTIG; >>>     if ((flags & mask) == mask) >>>         /* alignment need one additional object */ >>>         elt_num += 1; >> ok, You are removing above check in v2- 06/17, so ignore above comment. >> I suggest to move this patch and keep it after 06/17. Or perhaps keep >> common mempool changes first then followed by driver specifics changes in your >> v3 series. > > Finally I've decided to include these changes into the patch which > removes get_capabilities [1]. Please, take a look at suggested version. > I think it is the most transparent solution. Otherwise it is hard > to avoid the issue found by you above. > Sure. I'll review. > I'm sorry, I've forgot to include you in CC. > NP, Thanks. > [1] https://dpdk.org/dev/patchwork/patch/35934/ > > Thanks, > Andrew.