From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BA6B344104; Wed, 29 May 2024 18:18:33 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AD6FB40273; Wed, 29 May 2024 18:18:33 +0200 (CEST) Received: from EUR02-AM0-obe.outbound.protection.outlook.com (mail-am0eur02on2077.outbound.protection.outlook.com [40.107.247.77]) by mails.dpdk.org (Postfix) with ESMTP id C6BDA4026F for ; Wed, 29 May 2024 18:18:32 +0200 (CEST) ARC-Seal: i=2; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=pass; b=i1xnxSMxBaOD+xFGDLlvPbq7/A0Cuq422yTTm8oafNITY78ulpIuwIZ2Yt1E7uONcgGPZMyYc76EZRyM+/+SaGgUeDxAC6B6uOpqWt5FrFFtkmxFrPoKAmm+KaAW+EaTD25NFM1Mq0qD/jbQt1M8kwJaBObV0X6aaQoFo6iEcd5gggOuzCdGceQ8793XPoSNUHg0+zjauilFgZPF8uJ/bYs2d4wGR+VvpA4mDaC338OH+w4Yb1xrr8Y/EQf4pkc5RhMkZYILlES/mgNcs9/PJlJ27tde3Csj5W/hUTtSGddP1N0ympOWm/fAqv7Q5SZZI99yYDclp5nNvwF1ghL+TQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wc/mpl/NkR42RjdeqHTqF/4lgT72PNAawy9PKoNbmCY=; b=Rl4+wFFzqiI4U9Rx8N1LfhI2MrQsqszl8ynMUd0dRV9APweFMFJOUq+OOwuyoadKaRrDHsJkfiv00M1e7BFvjveDSviGi25QPcsNg/df2m1PmRQ6AgJQSjVSSpqegVQmbVHMtBhVzudhu6y0aW5hJ1qQS1wMMeeVKw1cnsm6dN+PxjMdJVEWGTxPMnzI5UJH4fgFJAIugJCvD9J3WLafp7fEwcMOd2gDYA03gkMOxxkqzsgTmIhjpkP1uTuomXrIv57BWj6yh/uPL2afkV8XMpQWiI8nPy3a3kxzf1T2J4SXm3qv6XNGVX2MF3RL9btXZHblIswV5RigVgNYx/nivw== ARC-Authentication-Results: i=2; mx.microsoft.com 1; spf=pass (sender ip is 63.35.35.123) smtp.rcpttodomain=dpdk.org smtp.mailfrom=arm.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=arm.com; dkim=pass (signature was verified) header.d=arm.com; arc=pass (0 oda=1 ltdi=1 spf=[1,1,smtp.mailfrom=arm.com] dkim=[1,1,header.d=arm.com] dmarc=[1,1,header.from=arm.com]) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wc/mpl/NkR42RjdeqHTqF/4lgT72PNAawy9PKoNbmCY=; b=FX1w36fB6AacrPBJF33wAqDvgHWMatxvSQ1LZ4JrLNrfy9C6Lb7DOwp3++eNLNineMNOhQ6kJ5uOS1S6iGpbEAiWYeZd8aNgb0xecaSpdLgggVsihKZjGlJBrK5c/feXIMETBaHYn7AaCaWk1uQjgcHBmN7OeJmrdeq2I5o0n6A= Received: from AM0PR03CA0068.eurprd03.prod.outlook.com (2603:10a6:208::45) by GV1PR08MB10371.eurprd08.prod.outlook.com (2603:10a6:150:8a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.27; Wed, 29 May 2024 16:18:29 +0000 Received: from AM3PEPF0000A797.eurprd04.prod.outlook.com (2603:10a6:208:0:cafe::6b) by AM0PR03CA0068.outlook.office365.com (2603:10a6:208::45) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.30 via Frontend Transport; Wed, 29 May 2024 16:18:27 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 63.35.35.123) smtp.mailfrom=arm.com; dkim=pass (signature was verified) header.d=arm.com;dmarc=pass action=none header.from=arm.com; Received-SPF: Pass (protection.outlook.com: domain of arm.com designates 63.35.35.123 as permitted sender) receiver=protection.outlook.com; client-ip=63.35.35.123; helo=64aa7808-outbound-1.mta.getcheckrecipient.com; pr=C Received: from 64aa7808-outbound-1.mta.getcheckrecipient.com (63.35.35.123) by AM3PEPF0000A797.mail.protection.outlook.com (10.167.16.102) with Microsoft SMTP Server (version=TLS1_3, cipher=TLS_AES_256_GCM_SHA384) id 15.20.7633.15 via Frontend Transport; Wed, 29 May 2024 16:18:27 +0000 Received: ("Tessian outbound b0296153e0a5:v327"); Wed, 29 May 2024 16:18:27 +0000 X-CheckRecipientChecked: true X-CR-MTA-CID: 0e68fa7bfe86d49e X-CR-MTA-TID: 64aa7808 Received: from ceae017f67dc.1 by 64aa7808-outbound-1.mta.getcheckrecipient.com id 7C7162DF-7F22-4D00-9FE8-A73FCF6FF7DC.1; Wed, 29 May 2024 16:18:20 +0000 Received: from EUR05-DB8-obe.outbound.protection.outlook.com by 64aa7808-outbound-1.mta.getcheckrecipient.com with ESMTPS id ceae017f67dc.1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384); Wed, 29 May 2024 16:18:19 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XmejFXFDWrAO+d/p4UrJGa/hUDFTHIaUJHzCNK9dKvQ+HGqR4/GD4/cvyWorJ1vqZIrytpfiUDt59iFPGi78Ts6f8nw0ZQhjoWv2aWzSP/IVcwnBCCksAHy97d4dazfsxaSfIhWE+VuUjtFifK8c7tRgNLxq/IoY97wLGGihAp50McD7SQ9lT8xgIQdxSE2mHSJyuEjJ38yz31Srj6qD/fM7QgGTC/zVkh9ZDRRXdT9jEIK18b3trPpHMbUSovzX/w25iETSa8z2nK6A4Ioa76C5DEkj2Xw9I76O2FmhCx3y2GpTw1C2+90XCjBjGC7Zdcz3u+ta9+HCqE8tQPLQ9w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=wc/mpl/NkR42RjdeqHTqF/4lgT72PNAawy9PKoNbmCY=; b=QrepJ0UIN29EaWFyBtdzAOPgT/cmgG9pBTKwpZF3ehfrlFIORcUFshW2aZMFI4KCThQRfmMpmVAaeXeE7y7HIfqfTV7v0E8LonN8SMVkoTzmLmP20vuzQvfxJMbD6mQ5OfS/OHnNncOKRsrDwWwPSf1I1CvsifS9epnlcIgOj3Z4FNGIlsSkDDTNDVZXXmTgS4BpWIdmOLnCbQdJkkGBdlPwPkaqQZkSOkUWf/OhLczPr0fc6NG3OqazuPX/W+84IszvFnh2YcQhuzBwhBa8HtuzLLGBg5RvT5ZP42maaGvS72p5N5u3CI1WFVd1UANqzsC2LP5BsNovQha6YaB1BA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=arm.com; dmarc=pass action=none header.from=arm.com; dkim=pass header.d=arm.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arm.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=wc/mpl/NkR42RjdeqHTqF/4lgT72PNAawy9PKoNbmCY=; b=FX1w36fB6AacrPBJF33wAqDvgHWMatxvSQ1LZ4JrLNrfy9C6Lb7DOwp3++eNLNineMNOhQ6kJ5uOS1S6iGpbEAiWYeZd8aNgb0xecaSpdLgggVsihKZjGlJBrK5c/feXIMETBaHYn7AaCaWk1uQjgcHBmN7OeJmrdeq2I5o0n6A= Authentication-Results-Original: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; Received: from DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) by AS4PR08MB7805.eurprd08.prod.outlook.com (2603:10a6:20b:518::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7611.22; Wed, 29 May 2024 16:18:18 +0000 Received: from DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::2dd2:fd4d:8ff5:3733]) by DB4PR08MB8151.eurprd08.prod.outlook.com ([fe80::2dd2:fd4d:8ff5:3733%6]) with mapi id 15.20.7633.018; Wed, 29 May 2024 16:18:18 +0000 Message-ID: <9e668808-f76e-4ea0-8147-8df1efb102f2@arm.com> Date: Wed, 29 May 2024 17:18:14 +0100 User-Agent: Mozilla Thunderbird Cc: nd@arm.com, Ferruh Yigit , Andrew Rybchenko , "Burakov, Anatoly" , "Loftus, Ciara" Subject: Re: [PATCH v12 2/6] mempool: add functions to get extra mempool info Content-Language: en-US To: =?UTF-8?Q?Morten_Br=C3=B8rup?= , dev@dpdk.org, Frank Du References: <20230927150854.3670391-2-paul.szczepanek@arm.com> <20240529102242.1137076-1-paul.szczepanek@arm.com> <20240529102242.1137076-3-paul.szczepanek@arm.com> <98CBD80474FA8B44BF855DF32C47DC35E9F4CA@smartserver.smartshare.dk> From: Paul Szczepanek In-Reply-To: <98CBD80474FA8B44BF855DF32C47DC35E9F4CA@smartserver.smartshare.dk> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0016.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2ad::10) To DB4PR08MB8151.eurprd08.prod.outlook.com (2603:10a6:10:381::16) MIME-Version: 1.0 X-MS-TrafficTypeDiagnostic: DB4PR08MB8151:EE_|AS4PR08MB7805:EE_|AM3PEPF0000A797:EE_|GV1PR08MB10371:EE_ X-MS-Office365-Filtering-Correlation-Id: 9b3660f8-3e5f-43f4-4a78-08dc7ffaf8fa x-checkrecipientrouted: true NoDisclaimer: true X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam-Untrusted: BCL:0;ARA:13230031|1800799015|366007|376005; X-Microsoft-Antispam-Message-Info-Original: =?utf-8?B?L2s4amt1Vk1oQWdGOGdUODVDM0d1M2ozTjI5d0Nad0xkcHhiV1pXUkV0RlBl?= =?utf-8?B?cHZyaHpERHJsVmpiU1BSSXpML1UrZndOU3lpb2Fid0o0NmdEQW1VcFNoOCtY?= =?utf-8?B?NWtvRjVYU2hmcG51TGxTNTR1QUl5ZU5GaStONTF0emMybVV5bHhoVHc0aHJ2?= =?utf-8?B?Nms5QlZjczZmS1NwWkhmeVdsYmQvNjJWUTVDRGZmRmpIb2hKL2lSQ0l4UFUx?= =?utf-8?B?VE1qbjF5c3dhQmZmelNacFp1MnRQY0xDUFZiTkU5V0RKayttSHRWeEIvWVNF?= =?utf-8?B?dzlxb1o3M1B4ck9wWE9vb055STlUWEd4UFRaVmluSS9HSVVHZ3RGaHB6ZWEz?= =?utf-8?B?NnUrK0RIMStoMzlYS1pTZFZtQytYVDhLUnV2RitSYkVpWWVOeWhGNFpoakhQ?= =?utf-8?B?eUczZG5DaWVvZWUzSXU0d254aXQxaW1JZkxhR2wyT2ZERlBmNzFxRXVia0Qx?= =?utf-8?B?eXhwYUhLb1NoTXBaT0pMbGp2eGNDTGhObGxLdFJVdnpwYXl4WnFIUVozYXVN?= =?utf-8?B?a2hZNldCMWxvN25rYURWTVAvK3loSkh3TlJ1T0hmMU5aQ3JqR0R0QnFmT1FK?= =?utf-8?B?RllhRzg5M1F6Z1VHNCtTZ2E4M3BydHpWQ3YyMjdsalVOVTZ6dENLbFAvN0pS?= =?utf-8?B?WTJESVFKeG1DTUdkbGRaeHp0cGd3N0cvM3dGUC9NalhJaTZaelVSMUhXV2Nh?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FcUhCWDNJ?= =?utf-8?Q?ZpI4/LahEfLaZ46xXPhd0XY2eCShlRhx3BF75dNEFsa8=3D?= X-Forefront-Antispam-Report-Untrusted: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DB4PR08MB8151.eurprd08.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(1800799015)(366007)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR08MB7805 Original-Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arm.com; X-EOPAttributedMessage: 0 X-MS-Exchange-Transport-CrossTenantHeadersStripped: AM3PEPF0000A797.eurprd04.prod.outlook.com X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id-Prvs: b17e0285-0441-43cd-afa1-08dc7ffaf34c X-Microsoft-Antispam: BCL:0; ARA:13230031|35042699013|376005|36860700004|1800799015|82310400017; X-Microsoft-Antispam-Message-Info: =?utf-8?B?YldyNmpjc1BIYzk1YStlS2IvWFhsK0VyZ05ObDQycHExYUw3Wi9ZTEJXZ29v?= =?utf-8?B?S3gzL0ZrQ0RRdVluamZxcTNVSGNSdW94YklwZGdjczE5L1pqcExldnc1SFBs?= =?utf-8?B?SklWdWZUcllsUTJwT2FoU3k4cUtkSVdRcGRlSmpMMnNVd2Vid1RkemorcE0v?= =?utf-8?B?WTIwOU5aQ0wzYUVvWEJJYmMvdnVYY056bEZlRHV5aDB3bUhNVGVZd3dNblg3?= =?utf-8?B?WklBeVBkS09UWFRpRU5OV2llenV3bkhWUkJiTnRQMjVIaUVMSEpha0pPSVBK?= =?utf-8?B?Mm0rK08vNDl4cG9paWJWOUJzTnRYcDlCWVRqekMrZHRSMCsyVVN4ZHFJQ2xD?= =?utf-8?B?NjZIMi9uYktxQnM2ckxBbmdqRElXS1RlNzhtOUpDcFlseEQ1TWlZTnJ6WTZu?= =?utf-8?B?RlFkZ2hBWHgzUFk2VW9NS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XdUcDM3UU1KWkViSGNUNlpuSC9jY1RzNlBPTjVJSzRyMy9XK1VwU0V6?= =?utf-8?B?bUVuY1Mwb3Z0bndwaUYyQTZPYnJVL1ZMUmxIZEFDMXpiYnkvYnI5dldjQVhS?= =?utf-8?B?R1F3OVpROTd3WlkrYWpTeFJkNm02cit4RU0vU1lRSHFnaGtxYW5WZjQyVUxJ?= =?utf-8?B?YnRNc1hiOGUrU2k3VWNDN1dUcFBqdzVvM200QkRBYUkxTTRkOFpnKzVRa3No?= =?utf-8?B?eGYvTHJleDF5N3U4elZwaVVVOHBUR2ZLQmJNSVdpRFNoTlpHR0toelNrUHJW?= =?utf-8?B?VnJza3Y4WjlkYlROWmE0T3kwSXBKVHZkQkxpUlowK0Z4RHZKR0lEcUFwYkJn?= =?utf-8?B?OVl0Y2hqN3REa1BVTVJHUDNaUFNjMk1TWHVCOWRyNGMzSmFUSkJpY0RwelU0?= =?utf-8?Q?qzkblyMaTaSBVtLXoT9Kf6C/NmSP4esEbogVS8J?= X-Forefront-Antispam-Report: CIP:63.35.35.123; CTRY:IE; LANG:en; SCL:1; SRV:; IPV:CAL; SFV:NSPM; H:64aa7808-outbound-1.mta.getcheckrecipient.com; PTR:ec2-63-35-35-123.eu-west-1.compute.amazonaws.com; CAT:NONE; SFS:(13230031)(35042699013)(376005)(36860700004)(1800799015)(82310400017); DIR:OUT; SFP:1101; X-OriginatorOrg: arm.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 May 2024 16:18:27.5003 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9b3660f8-3e5f-43f4-4a78-08dc7ffaf8fa X-MS-Exchange-CrossTenant-Id: f34e5979-57d9-4aaa-ad4d-b122a662184d X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=f34e5979-57d9-4aaa-ad4d-b122a662184d; Ip=[63.35.35.123]; Helo=[64aa7808-outbound-1.mta.getcheckrecipient.com] X-MS-Exchange-CrossTenant-AuthSource: AM3PEPF0000A797.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: GV1PR08MB10371 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 29/05/2024 14:56, Morten Brørup wrote: >> From: Paul Szczepanek [mailto:paul.szczepanek@arm.com] >> Sent: Wednesday, 29 May 2024 12.23 >> >> Add two functions: >> - rte_mempool_get_mem_range - get virtual memory range >> of the objects in the mempool, >> - rte_mempool_get_obj_alignment - get alignment of >> objects in the mempool. >> >> Add two tests that test these new functions. >> >> Signed-off-by: Paul Szczepanek >> Reviewed-by: Jack Bond-Preston >> Reviewed-by: Nathan Brown >> --- >> >> +/** >> + * @warning >> + * @b EXPERIMENTAL: this API may change without prior notice. >> + * >> + * Get information about the memory range used by the mempool. >> + * >> + * @param[in] mp >> + * Pointer to an initialized mempool. >> + * @param[out] mem_range_start >> + * Returns lowest address in mempool. >> + * @param[out] mem_range_length >> + * Returns the length of the memory range containing all the addresses >> + * in the memory pool. >> + * @return >> + * 0 on success, -EINVAL if arguments are not valid. >> + * >> + **/ >> +__rte_experimental >> +int rte_mempool_get_mem_range(struct rte_mempool *mp, >> + void **mem_range_start, size_t *mem_range_length); > > Paul, > > Could you please add one more output parameter "bool *mem_range_contiguous" to this function, returning true if the memory chunks are contiguous. > > It will be useful instead of implementing get_memhdr_info() locally in this other patch series: > https://inbox.dpdk.org/dev/MW4PR11MB58724AC82A34A3EEFEF78E898EF22@MW4PR11MB5872.namprd11.prod.outlook.com/ > > Please coordinate this change directly with Frank Du . > > -Morten > Does this work for you? int rte_mempool_get_mem_range(struct rte_mempool *mp, void **mem_range_start, size_t *mem_range_length, bool *contiguous) { if (mp == NULL) return -EINVAL; void *address_low = (void *)UINTPTR_MAX; void *address_high = 0; size_t address_diff = 0; size_t mem_total_size = 0; struct rte_mempool_memhdr *hdr; /* go through memory chunks and find the lowest and highest addresses */ STAILQ_FOREACH(hdr, &mp->mem_list, next) { if (address_low > hdr->addr) address_low = hdr->addr; if (address_high < RTE_PTR_ADD(hdr->addr, hdr->len)) address_high = RTE_PTR_ADD(hdr->addr, hdr->len); mem_total_size += hdr->len; } /* check if mempool was not populated yet (no memory chunks) */ if (address_low == (void *)UINTPTR_MAX) return -EINVAL; address_diff = (size_t)RTE_PTR_DIFF(address_high, address_low); if (mem_range_start != NULL) *mem_range_start = address_low; if (mem_range_length != NULL) *mem_range_length = address_diff; if (contiguous != NULL) *contiguous = (mem_total_size == address_diff) ? true : false; return 0; }