From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM02-SN1-obe.outbound.protection.outlook.com (mail-sn1nam02on0050.outbound.protection.outlook.com [104.47.36.50]) by dpdk.org (Postfix) with ESMTP id 508A41B1B3 for ; Thu, 1 Feb 2018 14:41:02 +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=PqCjS/yHmkkneUWiXSA4dteddGnjwteYuMf3EX40+co=; b=oVzEDDpP6FjjjhEpwrh6qFKQ98JQD09GDSF0chMn+BhWQrY8MK/oUDhwDxQZZCT8Lb9KPP6fWasHolZVUlIk+fUzuS/YwIyUrRVxIEZA/GGkSioda67Kxd0Sw/LVH7cjijyfKE/w2zIzWpCMrfcvj2D+wMXjX3X0ezwnzo80BiU= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [192.168.0.105] (103.76.56.167) by CY1PR0701MB1898.namprd07.prod.outlook.com (10.163.42.28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.464.11; Thu, 1 Feb 2018 13:40:58 +0000 From: santosh 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> Message-ID: Date: Thu, 1 Feb 2018 19:10:43 +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: 7bit Content-Language: en-US X-Originating-IP: [103.76.56.167] X-ClientProxiedBy: BMXPR01CA0031.INDPRD01.PROD.OUTLOOK.COM (10.174.214.17) To CY1PR0701MB1898.namprd07.prod.outlook.com (10.163.42.28) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 996237df-9ad7-41b2-da20-08d569796e3c X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(7020095)(4652020)(5600026)(4604075)(2017052603307)(7153060)(7193020); SRVR:CY1PR0701MB1898; X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1898; 3:vUzXt1SiiQdMd4UxvjDhttat87FF1xNZ4oI+rnAnQfUKCa8JHxgdRRu4fZturOUxPkzz9x//+9l0YXhrC03veXEh5TRWLDiqKgY0kX4sCk9q4vfcDaXEQ51KNyFcCyejV8MsWLfGtMyBMWFaQMM1uJofZqCePzeSTK/LgHp23GgE98U2Nz1zJKlnveOzuqxMX2lQcBoJ5iu51qkmKcbv2PzEZFyMGjcix2hgkdzkk4HotF18RfASm8RSIu7zJgXA; 25:IrYTPuho5mgR7SNrjX9ZFs678vZWI9nV1nUWoFTmZmgHB0Y6Hfel0gEGli4d9gqctrQds+q1TlSItmgP438THuXmpi2KRP6TtTmkOHz6s3w4dvZZtWY5R6pgnWzbrEccws1mMPhIeMM8cfx/fea6HzJ7Y3gM8+Tu/VSONtfThfS8Vppr8YM0/bIoN0rYu9cNgiGtTvfZit9NHeOcydUkQutDFJXcKydR5bKoFr9N+Tb9hQJVoLbNgj/YBJEGrBQpKWiW6aoz81MKgzpm2mNEPIaSWA0jKwFLmqy4uGdGj6l36l9e/OSeR78H5IgLuln8pKJvXdudO2WzWa/LL4xojw==; 31:+/mraDFDKoW9Nlkk5VM5kVs7OLoPEyuaEqs4LEeOt2mg8T+qBeuLwUfHiGtOL3Zn/Matad1Fzz4ZC2s/OcaYq1Adx7ReUc577ww5BHg/EDWiD6dZ3V7NWs1Urfp9tQXdqQ9Zo9Z53IyBgNJqrf06IEMRnAsaSizNYduH5qDXd+F5DmXxGsLZFIB2bggCXWyWqx5dzIfQflGrzYkR6XbfPe8Cv4zfvoUJJkQlEpfrwTU= X-MS-TrafficTypeDiagnostic: CY1PR0701MB1898: X-Microsoft-Exchange-Diagnostics: 1; CY1PR0701MB1898; 20:O7YoGcdXF+zCCryKTu3ES22oaSvhIdT+4M+VfJFmISCmgQsn6xI6V4BZpWXJDqzzau8O7xHoMXx5tDtYtXMsltQjFuT/qqwH7HagmBxexchd27jUJNwzke6z1HDp8mrt5PQ5wbFmSKEWsxPlY6f3iykrpV07tgYej4A8HEIDLMaYmuDC/bhdxICzMY0exdi4C71hSgvDT9gHjQdOsjBY4BhmYMqZl8BIti+eQ3/2bAn+OyHbrDUp6LElKWn1GNUDi+oaSrwKrLtreT4kfRGjROWwvjid+dx0BPov9fylKHYsZ/AsZJfBGbIBJJv/aiOOU5+qHKncULv+nhVL4yEF1w1jh3LehggWfqH57EdXi6kIkcNyoOXrZ0qNKIWs158sR40Xoufs9pwHkGXCMtuPZ17+nsJNp9WD5N34T85ZhtI2GhRmajN4vyRNpuDwVtZaWlhxAnYYnVzEnH8EtGTfE+77Cns/4dhBYPmmHNTob6Tvzv1xJY8CzB893DO37d2stZsyxyWyApKyIFCtfE7OfH6ZuJ1ozapEd5tAsLucNULVRUHzPnDlcIp1sE0J9pbJgcPzePla2ij/ah0OsmSLdjGJ7mY+8pDJqJxx4+9t5kk=; 4:QmrGBnh6e76AytX0e9gx9E17cKEWgOa7Pox2NPi6uiWZ1tTRwIMKAYBlx4gxNqw4f54TfGWPCGzavd0yMpum09F5EVxbv3KeZ37ie6mr8NdrYCBCFW/r+vXO8fD0dcAqSx60Ryz9ukvsjiUfk2PDavKsjXks1Ahqz8oDiYTTnt7zaTJaB+DbcSfi69u0QntQp7CfVl5rgAtJv+zaLbKyHqRs9oaqMNNr01YW2nucyhx2rsG7Ii9nRkKhrPFScx50x5tNRKvDDc+WqDjaUNrXEg== 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)(10201501046)(93006095)(3231101)(2400082)(944501161)(3002001)(6041288)(20161123558120)(20161123560045)(20161123564045)(201703131423095)(201702281528075)(20161123555045)(201703061421075)(201703061406153)(20161123562045)(6072148)(201708071742011); SRVR:CY1PR0701MB1898; BCL:0; PCL:0; RULEID:; SRVR:CY1PR0701MB1898; X-Forefront-PRVS: 0570F1F193 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(396003)(366004)(346002)(39860400002)(376002)(39380400002)(199004)(189003)(97736004)(83506002)(305945005)(117156002)(6486002)(7736002)(31686004)(6246003)(106356001)(53936002)(90366009)(105586002)(72206003)(31696002)(230700001)(107886003)(229853002)(4326008)(50466002)(65826007)(110136005)(316002)(54906003)(478600001)(5660300001)(58126008)(2950100002)(16576012)(42882006)(6666003)(25786009)(64126003)(86152003)(36756003)(77096007)(26005)(16526019)(65956001)(65806001)(2906002)(66066001)(47776003)(8936002)(93886005)(68736007)(81166006)(2486003)(23676004)(52116002)(386003)(52146003)(6116002)(8676002)(3846002)(81156014)(76176011); DIR:OUT; SFP:1101; SCL:1; SRVR:CY1PR0701MB1898; H:[192.168.0.105]; 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: =?utf-8?B?MTtDWTFQUjA3MDFNQjE4OTg7MjM6aTVmdGRSbGtWU1hQUVVvckVScGdOV3JS?= =?utf-8?B?Wm83b0Q3OGNRYnhFSk5iNEV6ZGp2K0N6NytaNG5BZEthaHpOd2dUZjBoUlF0?= =?utf-8?B?QndDcUVpQlkxOWdDQkZOMTJ5by9raGpsUkNIOXVVTmFCaGZ6Wi9Mb0psOUF2?= =?utf-8?B?d0ZDcmVIL2tMbDZucTRSOURnTFN4a0tNUFNiTXdnQVBqZnpIUlFsWDJkbGdW?= =?utf-8?B?Z3ZSR1BLcld0L2FBOWZyQ2llQVRyenpSWkdmek9GV240d092c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qJvNXgTSHf3DT+osZx/m8h72wXt7gK0vhFIWNrfg9tgtzzh9P62PtIbWTWx+6e3+T2sgH5C3EzTdrMdfpqZCWoxUOAiW2iBMszsyaaAAd2RySt1TTItQHuVd2NVOASo+8qn15eb+m0GhdkZ9TQBh9ZdKkBSa3sajargQQAbc2hyHrggP8/8FCeQzAQvuWdwYW7UZmsk/iRYEOCXhXGpA+mwDL6ju7JKD23RtIBKmDyIj/vKsI9Jui4whp5z2TbxBOQpQdxHr8s6JL2nidA2+xsO1zzrfTVAmVSYWzPZzq5AsogwR5Kv+rgjrkSdBvuY8=; 5:xGrQkuCqb0hPlvo9KkTk5MMSquhXuMY4lVeyrUkbJoVzSxks9CP/kO9CmkHVCU5rZaQlccI9vRQkJp84rwITI9WJ3t5eCqXHpVkad4qLEpmNunYJXTKssjTMvn1Xk+aHx7MDgJ0jgkRcNtSjizPQHS1Wes/2S4haH/1/R5t4HVQ=; 24:WHevL1/w4fUe3nXJyXvYUzvB9T6QdNQo3cmLjzoj0lGv3DB5kf6eNWm6m05lrFD/ao7Vo4dHOGtkmAFllm/KdEvgbhVukkJnQb/ukzDy42M=; 7:FVkje5iuTmgq7sW+XeInvxZUsGPk2Egx9f+6ptbqvoycL72UOHlT+6NUWIfWBCT9ylhEzqRq1QLcf2jrIuSAFa32YHAJh8ECsfAjwNwT+Zkkd5aMVoxvxEAzQ2BdczXAPw5YTLHR+CFf4Kj5VA09r3QfuGP41pj0DSpXwCngCNdjov3hLINw69gVc8GiYyU0eWGRZbFl27/B6Z5I0N+VuWOuS7or/JEfXejKrjkX1iw8PZoKQ6dyQwEjTxWT7TW0 SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Feb 2018 13:40:58.5483 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 996237df-9ad7-41b2-da20-08d569796e3c X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY1PR0701MB1898 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: Thu, 01 Feb 2018 13:41:02 -0000 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. Thanks.