From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from NAM01-SN1-obe.outbound.protection.outlook.com (mail-sn1nam01on0082.outbound.protection.outlook.com [104.47.32.82]) by dpdk.org (Postfix) with ESMTP id 22C161B197 for ; Mon, 2 Oct 2017 10:35:48 +0200 (CEST) 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=mSBI7+GOOR0cjPUVJlfUeixE7IWaxYDONsK8MQqg6bQ=; b=OJ1BmphIy3MyLnj4ESZjKJjjSHCAX2bsmN2zTGjBX0Xs+mVrpaT97e4YiuYvti1xJh19G62f6nxVZjcj6ThqwIUFszPfPaEOtISrWDFUI9YqoOhabgtpcm1dEobaqC9B1VEROk4bY1CiSVRCfnhsaSgxFSYcASy6P/cBFhC6j3A= Authentication-Results: spf=none (sender IP is ) smtp.mailfrom=Santosh.Shukla@cavium.com; Received: from [10.160.0.37] (111.93.218.67) by CY4PR07MB3094.namprd07.prod.outlook.com (10.172.115.8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id 15.20.77.7; Mon, 2 Oct 2017 08:35:45 +0000 To: olivier.matz@6wind.com, dev@dpdk.org References: <20170907153042.30890-1-santosh.shukla@caviumnetworks.com> <20171001092902.10842-1-santosh.shukla@caviumnetworks.com> <20171001092902.10842-8-santosh.shukla@caviumnetworks.com> Cc: thomas@monjalon.net, jerin.jacob@caviumnetworks.com, hemant.agrawal@nxp.com From: santosh Message-ID: Date: Mon, 2 Oct 2017 14:05:26 +0530 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <20171001092902.10842-8-santosh.shukla@caviumnetworks.com> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Originating-IP: [111.93.218.67] X-ClientProxiedBy: BM1PR01CA0084.INDPRD01.PROD.OUTLOOK.COM (10.174.208.152) To CY4PR07MB3094.namprd07.prod.outlook.com (10.172.115.8) X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: c3cd52f7-0d14-42cb-b9f2-08d509709489 X-Microsoft-Antispam: UriScan:; BCL:0; PCL:0; RULEID:(22001)(2017030254152)(2017052603199)(201703131423075)(201703031133081)(201702281549075); SRVR:CY4PR07MB3094; X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3094; 3:Ij3iNbCERc9kWC58KXN7CmIyvL1NA2zcEVL/Iv20RFp7Hu74AgscC6Hsj1VWdR0hCFnrJ9RR6sPo2MtBaHtq2CWqpSS6ozVX34dVJ/Hi2he5Og1XPXb4N/R8vCgUJ9yqHCCN/izmzs5/Y0U2QYRAqgKaSUBiu066WOcQsnT5dcC2gA81ZTwV2lpd/fmBV0TiXTvTdcVw4JlP+KuHTUJlszFHoSwvmlbhl9b2Or+FXiMkD5wxe+p4fDRD9M/vnxxp; 25:E9DXcHIF+IPdkt/xr6tFSb+TWEF7riB5kMJ/a4ISyAginbx9DJ7fWuBX/cTO/r+D0NMT7e3w4jp9b5d+AguCIHuBC2KFLjXuMfJZLCW7hg9xOLL6bvPxwwQZiPcUz9fjRhcmTF2O3VIF18Bp746waeHOutSFYPqvBZLLDbj0kb6MwXrNnJsvrQhOS1362i4aaIUxU0U43dTy4NeZ0sXDZGuUbxLQ1yVH494aTSmUeSTke5k0nzb3CGl24B7lm/uCbXGJpnFL+19HRjAja9nDD/MFJUppePX2NwqW7H/nqgLmgL6/ZnR+8RTSFEqnlMXuD5a7H/zMTP5dLf5e7adcnQ==; 31:f1KTw+hjl9+6shueyDlVY0SGffDh1oG9+eD4jRnMFymM3S1LfF0xXRrfbIqLgRPmPwzY3fb9BqvbR1FPcykTMW/0JIkYvy8EoR9VujzRYF17wEj8d2X2MjhhL5CW6WjL/iNWtMN87bNkw90fLS4yKuUT2Gr6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-Antispam-Report-Test: UriScan:(185117386973197); X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-CFA-Test: BCL:0; PCL:0; RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(3002001)(10201501046)(93006095)(100000703101)(100105400095)(6041248)(20161123562025)(20161123560025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123564025)(20161123555025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095); SRVR:CY4PR07MB3094; BCL:0; PCL:0; RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095); SRVR:CY4PR07MB3094; X-Forefront-PRVS: 0448A97BF2 X-Forefront-Antispam-Report: SFV:NSPM; SFS:(10009020)(6049001)(6009001)(346002)(39830400002)(376002)(199003)(24454002)(189002)(377454003)(5660300001)(47776003)(305945005)(478600001)(25786009)(230700001)(97736004)(3846002)(16526017)(101416001)(2906002)(5009440100003)(7736002)(68736007)(6116002)(64126003)(33646002)(23746002)(36756003)(53936002)(90366009)(58126008)(65826007)(42882006)(16576012)(65956001)(229853002)(77096006)(65806001)(4326008)(31686004)(66066001)(316002)(54356999)(6486002)(105586002)(31696002)(2950100002)(106356001)(6666003)(6246003)(76176999)(81166006)(8676002)(8656003)(50986999)(86152003)(189998001)(83506001)(72206003)(8936002)(50466002)(81156014); DIR:OUT; SFP:1101; SCL:1; SRVR:CY4PR07MB3094; H:[10.160.0.37]; 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: =?Windows-1252?Q?1; CY4PR07MB3094; 23:873SXSE/uC3UICfgcyUXD3bGARPfXDwQMpP5h?= =?Windows-1252?Q?loK3vz+Tx+LuuXuIf+bo/qYLZo3dl4v3XvEMvoO0bqyaZBnnJr1w7z/O?= =?Windows-1252?Q?2v+q6dLLWarC3BC6VBPLK0qAdmsRSGfvV+AJZcIBHRLAx8GAzEzgSCDt?= =?Windows-1252?Q?1RvF+QRvzdff6BYsZWS+wkY8oHol/z1L2l8MuUGxtiJV5//i7R1V4H6p?= =?Windows-1252?Q?71FF/aTusS9wzLaDd02gfew76mhbvZAQ0Smi+3nlYIz3cjC0ptw8gOf5?= =?Windows-1252?Q?1dVW1ilMKeg9awAYTTsO1SsvrI2piY6RRyFsz4Zgqu+ZQGC6s+ppWSZ9?= =?Windows-1252?Q?Vka9+xo7epB1anvGR3F1puWKmEM81rjH5Fwgq5KL+NxVucKvn2MemP7h?= =?Windows-1252?Q?zNe8SIjlALdxCOslww8SnH4KzqjEIp7udzuz8UwgHoVRvJenslgUeOlo?= =?Windows-1252?Q?gyybKbMVzSKenAcMHvT4I6Xsf7rWm4jzI260srBni+yTV+eEizlUy9ld?= =?Windows-1252?Q?qveU4JVn5efqLTPBIwkcXERAc1tYZ5suq3JSdxQrF07nmkLBcMMStFXc?= =?Windows-1252?Q?luC7UrjxEUEFHGNcqfycMCWSaT0bHZcbeIM0dE2pRPmAoqe8XzmmuD3b?= =?Windows-1252?Q?sLFI8rsuT1YRqc8xZ9KelxMy1ZEkAGfjlJRN/fbdbXPQI6/YGCqvF9F1?= =?Windows-1252?Q?kCD2yrM+HQGNFf+K01+lsTvBXj5FAmzXok1IRmX1tgUYu3jr2SYqym83?= =?Windows-1252?Q?KB65OV3WSaxS0vqudsUVuEgAl7puPQVZZv1B4SHsvmUfzDOj6cg/HqHm?= =?Windows-1252?Q?smXYQzVN/iQXudljzJDPw+ZLYUW4bUNRf0GW13LkMhAfdPkucMZFDbrE?= =?Windows-1252?Q?B5YVylrNqHTL+eSRjQG/PWy4fC92ngdFcCyaE6Agnd7SqoIXgfJWcOuW?= =?Windows-1252?Q?kfd+X58JayAJqq6pgIP1OXcMEfdA2BTCcqfOAEkwnz4X2dj/fvPcTeqg?= =?Windows-1252?Q?arFe9TiU3SumbVz95ysk5XTn9Vchb/GQUZwfRhsRLKSaDOCMOv7OBMIB?= =?Windows-1252?Q?jjvxEco03FFkZiDKM/pMtIsLQYfPQbEoxlA+DHYY+zUXYrQw3jewKs0g?= =?Windows-1252?Q?Ydq0cRlrwP66gORl+si/qZYf25AgwlF7Iv0+LL8lsTkSnoRMEJxRPseu?= =?Windows-1252?Q?iT6o6DNVGdW9Zn3GQM3s06byrYBU0OTI2bg5/qCgK+nmRG6jVcE7D/VE?= =?Windows-1252?Q?13fQl4upIJHuNlf3yGMPHi2Z+l5DfbE/NKFh+7Ur3SHwEVspbVWYdEYm?= =?Windows-1252?Q?BqNSLux2ree3k/AuMyiIRuq9AQZi8qagOkB6pdSyK6a8P2kB4XqrF++3?= =?Windows-1252?Q?BZdR4d7LmGvNFrJP9GCbcFUxAPt9UIjSqXq6ehYGs3kbupjYIDciNGuy?= =?Windows-1252?Q?1OH4pIPFQ1e/EWKU/FHdRGEnTf1ckjA2/myAfvRDL6Syxln9KiTv+KSW?= =?Windows-1252?Q?yi6L/+VUIFaHgaVkY9ywWo+7e8BXpEzqnGqH/cr49IGDbvJ/u0ML9a6G?= =?Windows-1252?Q?xOHRPleFX7vRCw=3D?= X-Microsoft-Exchange-Diagnostics: 1; CY4PR07MB3094; 6:/XUEvmbbOFwHTxZ+FdKtE6hH+KxkqZqW9Mnxxa3uFo79IOTDmSYk9tRXOb+XDfrwPk+AWrbNWII8It+AmrP7NYd7HeLvd4YBrDL7hND/spSxdIbjpg7jhRovne7+HqsJJznng9RBU9R2MxxFRT7lwChsQxiCcnQBoPadrkc5TVTCcGmmZFcaE3gxRGEWfv9I2UzK5ywLV9iE7gRGkTePdouJ8tSQvs4mbW2QEn2IGc58i39IPLkHUvrbceBVyrYiNrifbpfd2HsBRfuQIyGiu/8UJEoKOizd+GWj1yJ6pGqIj5V+9OZyckxsMCwXVmnEEKRXQRJUGm2ualnw5BOlTg==; 5:umAI9N5rqA7sNbyxOQvotEvk/Ggn2G4clkos3tQhWMJSKmwbo000T0dhS9shG0sXLqP165BQoinQst4tP7otylP/47J7jm38cpiJbk6sPCqDef+t3kj/0mU1FhsKUeCT8bROvG9aQt6DikEHTF7xuA==; 24:OTFMzERmwDTZlekAzvd4br/98Y/hE5vn8gisA7Ho65QaUsEmf44xDA4BKx3whAFX90kFJcu/dkZhBm9LWJzUE+uGfEnIvvc/ugUztlwg6i8=; 7:qH9QgSipVYV1BFBJfmg6Q+FopMTfB4e1AOItk5hWHl6da75bjyXIPR2Y7kFO9oGQmg77rbsKJFS6n85RXpZhsmPtT4zyscqhrj2zabWQeZ8HiPouUYpKudxnT/WiTHwVHMPeTLPsqxD4dUi2orll9vxiWJkNNSpraWc2YA2S7KaT6lTUYMvx4aYbu83mC5fFjqVK2ajbBPM+XNnBlCP5BZqice9n5jL5biMFgXTJCoY= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-OriginatorOrg: caviumnetworks.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2017 08:35:45.4896 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 711e4ccf-2e9b-4bcf-a551-4094005b6194 X-MS-Exchange-Transport-CrossTenantHeadersStamped: CY4PR07MB3094 Subject: Re: [dpdk-dev] [PATCH v7 7/8] mempool: introduce block size align flag 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: Mon, 02 Oct 2017 08:35:49 -0000 Hi Olivier, On Sunday 01 October 2017 02:59 PM, Santosh Shukla wrote: > Some mempool hw like octeontx/fpa block, demands block size > (/total_elem_sz) aligned object start address. > > Introducing an MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS flag. > If this flag is set: > - Align object start address(vaddr) to a multiple of total_elt_sz. > - Allocate one additional object. Additional object is needed to make > sure that requested 'n' object gets correctly populated. > > Example: > - Let's say that we get 'x' size of memory chunk from memzone. > - And application has requested 'n' object from mempool. > - Ideally, we start using objects at start address 0 to...(x-block_sz) > for n obj. > - Not necessarily first object address i.e. 0 is aligned to block_sz. > - So we derive 'offset' value for block_sz alignment purpose i.e..'off'. > - That 'off' makes sure that start address of object is blk_sz aligned. > - Calculating 'off' may end up sacrificing first block_sz area of > memzone area x. So total number of the object which can fit in the > pool area is n-1, Which is incorrect behavior. > > Therefore we request one additional object (/block_sz area) from memzone > when MEMPOOL_F_CAPA_BLK_ALIGNED_OBJECTS flag is set. > > Signed-off-by: Santosh Shukla > Signed-off-by: Jerin Jacob > Tested-by: Hemant Agrawal > --- early ping, since we needed this -rc1! Thanks.