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 A95C945A7A; Tue, 1 Oct 2024 14:21:21 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 819434027E; Tue, 1 Oct 2024 14:21:21 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.14]) by mails.dpdk.org (Postfix) with ESMTP id ACFBE4027C for ; Tue, 1 Oct 2024 14:21:19 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727785280; x=1759321280; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=EgVDfi2qz6XCfERzZ/Pt1Wro2ux2AEQgash3r8Agn1s=; b=T6di9D/L7BnBJkBJNtYEXZmqWbucXJuWf+mbq1RNmDarPrGAaqg0SQqm 65DMsEqnPvbTA8sE3kCLgwX1uTTpaNd++DCCHzAzh3gdMfuVAKZXEis/W 1xb8zdmACuEX6mOJSHnQILq0/cX6g+J4z0SVTPUs9nbQabyMG77F6EdR7 qn0T8DwoR6Bv7LOZ1PFS06kkBm8WRefL6sx7L1Jr0dEsm3pIR7vDW9E7X cy1lULtl1diCH73jI9eB+eTaz0cJzaZDeeTy3VzwIdgCyqqXhmSC5cuCH SweJLimSrLAfRY4JnR8N+zvktEu9YolvZHlX4nrAzkHcrFsCxRT6sbmwJ w==; X-CSE-ConnectionGUID: DfxSvF+wRRux5mp9Z37dQw== X-CSE-MsgGUID: y7o0PddZRNanR3wcrbnHAw== X-IronPort-AV: E=McAfee;i="6700,10204,11212"; a="30709722" X-IronPort-AV: E=Sophos;i="6.11,167,1725346800"; d="scan'208";a="30709722" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by orvoesa106.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 01 Oct 2024 05:21:19 -0700 X-CSE-ConnectionGUID: uluTTRceTrmWVFjU4dYi9A== X-CSE-MsgGUID: Xi10pjnlTlm9vm7+L0HMKw== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,167,1725346800"; d="scan'208";a="104480740" Received: from fmsmsx602.amr.corp.intel.com ([10.18.126.82]) by orviesa002.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 01 Oct 2024 05:21:14 -0700 Received: from fmsmsx601.amr.corp.intel.com (10.18.126.81) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 1 Oct 2024 05:21:12 -0700 Received: from fmsmsx612.amr.corp.intel.com (10.18.126.92) by fmsmsx601.amr.corp.intel.com (10.18.126.81) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Tue, 1 Oct 2024 05:21:12 -0700 Received: from fmsedg601.ED.cps.intel.com (10.1.192.135) by fmsmsx612.amr.corp.intel.com (10.18.126.92) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Tue, 1 Oct 2024 05:21:12 -0700 Received: from NAM12-DM6-obe.outbound.protection.outlook.com (104.47.59.173) by edgegateway.intel.com (192.55.55.70) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Tue, 1 Oct 2024 05:21:12 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=AddbCpqgLAx9PDn64wRdhEOWMRIbfoon0IzBIfskhg10mh4lY+nf/IlLU+s7IGfF6BjU+oU4ubt+OTfhassOS69jHSWX5WoEn3GW3l7UeZOImfP8WK8D8CowbMby6ZxInq0JFzKksnJuP3xZIPyGWF3RL0UtnszgjZOnaxy+lVL80gAAgs3Jb7fyWUPRGn4Gaj28bHNWOquopmNVhchrF4pdAS1o1dIkTOka/jvKsxNAWNb3t7FCiTm/wsnURDtFgVcgp2U/OD3TwKa0G9MwoRJTf8PX1r6CTJofff/+BfeqA/bRyy0IU1dMHb+eaMEt7wzParNY4E/5bjVLqcWmmQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=CV7nhOcLKh0TY98/8GHLLccHadFjcJ+TaFszOZe80HI=; b=yQzev5SqVbjvR2sMG3qMrwHY6GfBBKAFqYw39e88iovA0M7XyTdA450hWwSZlibS0YNmIbv2cmw9eT+s80qIluPHzFqPHMHIqAclJI4wpkHQAza6H0UfMq8eXL7wUd1G7GpfWuhxAZ6yDulpYv5R9pdgGJh7aFYPP4zHBjKVrym7Xcq+F645qHPJ6sv/G1KUTiI0ElJG3JnDiTSrpc9ZqCFdHG0sVJsFXweZ50CTKW3gPjG5hgFOI+vpUi7eTZ7Huh7FQAXDwf8Mj9g+XCYa9omqZEyMZO7MjwRkZtfRSYoYstaJCBxESCSBtwbJETNVeHi+ZxwLoVK7B4473H0J8Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; Received: from DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) by SA1PR11MB8524.namprd11.prod.outlook.com (2603:10b6:806:3a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.15; Tue, 1 Oct 2024 12:21:09 +0000 Received: from DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a]) by DM4PR11MB6502.namprd11.prod.outlook.com ([fe80::21e4:2d98:c498:2d7a%4]) with mapi id 15.20.8005.026; Tue, 1 Oct 2024 12:21:09 +0000 Message-ID: <74a4fea2-5218-43a5-8f58-1d6afbd933ca@intel.com> Date: Tue, 1 Oct 2024 14:21:02 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 17/17] eal: add function attributes for allocation functions To: Stephen Hemminger , CC: Chengwen Feng , Tyler Retzlaff References: <20240927204742.546164-1-stephen@networkplumber.org> <20240930184600.7092-1-stephen@networkplumber.org> <20240930184600.7092-18-stephen@networkplumber.org> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: <20240930184600.7092-18-stephen@networkplumber.org> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-ClientProxiedBy: DB7PR02CA0018.eurprd02.prod.outlook.com (2603:10a6:10:52::31) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|SA1PR11MB8524:EE_ X-MS-Office365-Filtering-Correlation-Id: 11592a7e-42fa-4f09-093d-08dce2138813 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|366016|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?B?TlhkMDZob0tsQVZRa2wrMDNXUjRxRkJ2YjNxQlRUeTBBTVliL2VFNEFET1Vp?= =?utf-8?B?VHlQOHc2MEo0aEo1UDBaZ0RrR0lCNWRlZXpES25QRGJnbEx6RmpnMlBmNzVG?= =?utf-8?B?R3ZUcEtkZEMxeW13bHBiR28vbXVHUXNwYjlPWWsxcjErVlgzaFlXZHg2Y3B1?= =?utf-8?B?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2djF5UTd4RnZucnRQQVk2SmUwenBtUmR4bDU1cXdWbThJ?= =?utf-8?B?YXo2aURhM0VTTjlZZDJHNzVhT1ozaEE5elE4VUhwS3BTaGx6WGNyTnA5UlBE?= =?utf-8?B?Q1RtV3pPM3J2QTN1SGdLcU9HeFdHbWtQRjBXc01PNEN1RkI1M1hqdEdyYVBo?= =?utf-8?B?UExwRDR2V2E1SjZtN3VJcy9XajlKMEE1V0FTU1RPYTFoVERicEF0dmFhTXRT?= =?utf-8?B?Si8rWEJGbVlVNnM1Z1dqV0gvNXhUK3RjSnBoL2pVQi9aRWVKL25DSElJdUU4?= =?utf-8?B?SlA0bDlCcUI0b3o1c0FDa1UrbkwyTmZFSVIrSE1ZOWtXaFB4c0VhRXhTay9k?= =?utf-8?B?N0h5TGlUVDliQ2M4TEdUaDRFMjcxVEo5emxsN09LSmFaOFYrcTdET1Vselh0?= =?utf-8?B?RWhXeXRWZ2lPVGVkQUxxQnRsOXZMQmcwWk5qOEFyVGNzK3FSVk9mdXdyVEMx?= =?utf-8?B?NUE9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: 11592a7e-42fa-4f09-093d-08dce2138813 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 01 Oct 2024 12:21:09.5866 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: HkmVhZnp81GekL3pAn3tx87xOL0iGfFknmijhf5f3MFF7blIl1J6vQbmQraMfx88MNzWwJBErkH+hbXR8Nep4ufgzt8x5bcRFAFVSrFaMAw= X-MS-Exchange-Transport-CrossTenantHeadersStamped: SA1PR11MB8524 X-OriginatorOrg: intel.com 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 9/30/2024 8:44 PM, Stephen Hemminger wrote: > The allocation functions take a alignment argument that > can be useful to hint the compiler optimizer. > > This is supported by Gcc and Clang but only useful with > Gcc because Clang gives warning if alignment is 0. > > Recent versions of GCC have a malloc attribute that can > be used to find mismatches between allocation and free; > the typical problem caught is a pointer allocated with > rte_malloc() that is then incorrectly freed using free(). > > Signed-off-by: Stephen Hemminger > Acked-by: Chengwen Feng > --- > > + > +/** > + * Frees the memory space pointed to by the provided pointer. > + * > + * This pointer must have been returned by a previous call to > + * rte_malloc(), rte_zmalloc(), rte_calloc() or rte_realloc(). The behaviour of > + * rte_free() is undefined if the pointer does not match this requirement. > + * > + * If the pointer is NULL, the function does nothing. > + * > + * @param ptr > + * The pointer to memory to be freed. > + */ > +void > +rte_free(void *ptr); > + Is there any particular reason why rte_free was moved? Otherwise, Acked-by: Anatoly Burakov -- Thanks, Anatoly