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 5A72345A91; Wed, 2 Oct 2024 10:42:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 47F704025C; Wed, 2 Oct 2024 10:42:44 +0200 (CEST) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id D8CE44025C for ; Wed, 2 Oct 2024 10:42:41 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1727858562; x=1759394562; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=xpRPx0uPbLsA2s8BUlY7xBqCYn5fOQr6h1U6CiO/VWI=; b=gEzoznFM8I0PmaelxPE7tZ2tJj/ol9L46AsKvRIIYcZ7HE6QthlrqSfw ArYaLFTNdAxC4ZPcoGc+X7DExea6gAM/YA75bQ2XXze3OY8yZyryBaHC7 y8jgqgIJyWkHXtKm6BkwpwOhBdSGmbowiyCYkf7o+wa7t6ym9Wf2rmHgw NXdWaHhBk794iT9ONjB3BwIgDnQiSqgCBbPHVVjlIuoZanJNw2pBKPnWD Yj4lu+G4c/1EPRd3HpV+5/vbem4onEUD9JmNaU/vkeOWonRPsM6YsmhKf ZTggNsHNUrPzOP8zh8faitzAad2+T+NmHOt1An/Yeq/4sAiUybzd6Lplk Q==; X-CSE-ConnectionGUID: 78HcPWjXQzSYvqfIm6JAiw== X-CSE-MsgGUID: lBzv7UQtR2qz9UT0QrwqwA== X-IronPort-AV: E=McAfee;i="6700,10204,11212"; a="14639558" X-IronPort-AV: E=Sophos;i="6.11,171,1725346800"; d="scan'208";a="14639558" Received: from orviesa001.jf.intel.com ([10.64.159.141]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 02 Oct 2024 01:42:41 -0700 X-CSE-ConnectionGUID: PzpsCJgnRweJT09CkdrJtg== X-CSE-MsgGUID: 82JJcrDhSpaxW5o04iKz8g== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.11,171,1725346800"; d="scan'208";a="111411197" Received: from fmsmsx603.amr.corp.intel.com ([10.18.126.83]) by orviesa001.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 02 Oct 2024 01:42:41 -0700 Received: from fmsmsx610.amr.corp.intel.com (10.18.126.90) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39; Wed, 2 Oct 2024 01:42:40 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx610.amr.corp.intel.com (10.18.126.90) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.39 via Frontend Transport; Wed, 2 Oct 2024 01:42:40 -0700 Received: from NAM04-BN8-obe.outbound.protection.outlook.com (104.47.74.40) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.39; Wed, 2 Oct 2024 01:42:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=ocxMRV+DoShHoBU9CQ6Fc7n8SWzxd5eeKz5kAV9WW2XWes+BMqbHf5uqOwmJRn2xmUtDxZoy4ccahYbJWkEjj85fCrQHKT92zKKmsW9D7u2mxroy2z0q8UIDEf9rCUT78vCPG/fSitVY1MXsN4380QKTps6Gi5KZXJSHpuedVBQ4siTd+PA2udlPthfI2wJ53cukC21hnYHxbSX1zSbfbHU4SGD+QEDSpQOrv7h9+okeco1L4xGQCuDMBrU+RZE8d5wYl6uBtNReAAKeafLh99ROkhQPFPverIABKGLas8Ya4V3lVEq4qO7DLh9HTihThAdF4V/+yR3eMjjtBrax/w== 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=eu7PGSXeChKZ6L3NuWTNIrd04de8eeTU98AisdbSHq0=; b=vzyY2R2sMj/HU7OxHZv4/naWoNGy/ZQn8vgUnnlCymla5JY3OQzymdKq2+HECoM+pi9U9nUzTLiFsqeIZ+akK5OVGSgtGXfVye522kIZPaw/ovTqGlL7Ky+MjMDdJTBl5TgaL1rlJ87g5o7gz3DP7FrdHHzs7ODoSv+j3dg6hXeWp+eOKRLU59UoDH47z9kDoZObHA2WiRu2NSfdQlh9Oe5OrbYQES9AekdHTUyHDzYEzOSiw2Wnf5umCZKH/Tf1me721KUH/KWYUXm/y57HkTpULHJ5zQ8VzUHAQ8Ika7nDVwbWBRBzGorsFBHKzwTZsVCXXy90fmojnTuJMz1AIg== 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 BL3PR11MB6364.namprd11.prod.outlook.com (2603:10b6:208:3b7::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8026.15; Wed, 2 Oct 2024 08:42:36 +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; Wed, 2 Oct 2024 08:42:36 +0000 Message-ID: Date: Wed, 2 Oct 2024 10:42:30 +0200 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v4 17/17] eal: add function attributes for allocation functions To: Stephen Hemminger , David Marchand CC: , Chengwen Feng , Tyler Retzlaff References: <20240927204742.546164-1-stephen@networkplumber.org> <20240930184600.7092-1-stephen@networkplumber.org> <20240930184600.7092-18-stephen@networkplumber.org> <74a4fea2-5218-43a5-8f58-1d6afbd933ca@intel.com> <20241001082532.20ddeea2@hermes.local> Content-Language: en-US From: "Burakov, Anatoly" In-Reply-To: <20241001082532.20ddeea2@hermes.local> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DB7PR03CA0076.eurprd03.prod.outlook.com (2603:10a6:10:72::17) To DM4PR11MB6502.namprd11.prod.outlook.com (2603:10b6:8:89::7) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DM4PR11MB6502:EE_|BL3PR11MB6364:EE_ X-MS-Office365-Filtering-Correlation-Id: e679cfb2-516b-4147-6052-08dce2be2a46 X-LD-Processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|376014|1800799024|366016; X-Microsoft-Antispam-Message-Info: =?utf-8?B?SG1LUlFwMkthL2J2WUpueERVd0lxcEI0dUsyRFBzVnVJQlZBTGVGSGJWa0ta?= =?utf-8?B?SVBQR201NzJxdE15cVVTN21sYlROR0RwdDJTVGp2eEllV0wwWjNJQThsNUNi?= =?utf-8?B?ZUplQ1RPdnZwMlBvaGMxSDcxTmhWRWRJNWkydmlDaHA2ZjJ1Z1JIbFFMWHlJ?= =?utf-8?B?SEhXc0Rzb25hWm1qL2ljQnJ0c3I5MGdsKzJWZ2V3ci92RktYcmd4YVBvUjA5?= =?utf-8?B?azBuYUJIYmx1dXdlaGwr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mi9WRDA3UkJwVDhNTGZoNDFTaFdrYTNzcUFITGptTG9SS09acWVlczMwN1Zp?= =?utf-8?B?OTNCK1M1TnVvUUhhbmdlbnV4WnJOMkJVa1ozMmpqMUFvSkZWT2NrdWNvOHJl?= =?utf-8?B?clN6YnJKRHFHaUtmYThYVHZvZlI4c2tTZjR6eWdhWjJQQ2lBNHAzVGRmNlU1?= =?utf-8?B?WVMvQy8xVjl6dE96SkRKK1IwWW5nQ3VLRDI1VWRzODRUSUhHRDVvOFVQZkd5?= =?utf-8?B?Y2tBclpNZHk3UlEvOHR0RmxOM0crZFBsTDdOQWNuM2F4WkYyb2lPNlJ0R1F0?= =?utf-8?B?dW5MNG5hbXhRR04vR2pWN0pvanJQcWlEQUJaaWQ1eEg5M283Z04weEY0eS9H?= =?utf-8?B?dHhHUFYzakE3TXYwd1hWZDMvQlVYTlk3Y1BwMEVia0RhUXJIVElQWnZqL0pK?= =?utf-8?B?a3RBNXVvSDRVMzZtVzQzZFpvTHoyWHI4ajNvMXB4SFFOdjc0WmdaS1hrck4v?= =?utf-8?B?MGFlTU5IOFZ2NnNVRTh1RFNPRzJRb09veXpFaGRKdkVBeTdRT0NhZXIvMDBn?= =?utf-8?B?U0VROTdUQXNXOGxadm1zWG93eVNwWmxQMVBuN1QzaDIvN21Ubzk1NTBnPT0=?= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM4PR11MB6502.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230040)(376014)(1800799024)(366016); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cyt1bGpTQ0NPVmNqM2d3ZFJ6dFNiN09wRldzc3pNSlBrRUl5L1p4M000L3Z0?= =?utf-8?B?cmZvNDlvcEQwOGZMVmlOcGZBQVdVSkFVbG5sVFNrM2VHZzdiRG92a1V2SHla?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Zb1JVd0VrT0EzQ21RUVBPSUpBcDBNeHI1T1Rq?= =?utf-8?B?YnRCVGswSGNBa3FLdmxLQUtUZ3JkNEJOYk5HMm03ZjF6R2JydFY2YXF5S0xu?= =?utf-8?B?Ris5eUx6eVNqbjdlZDU0ZWVBejU1dXhOZ3R6K04ySjd1YmtFbEd5MzJLM1Vt?= =?utf-8?B?MDJvOENJRWpPd0JURUpEVTlqTGcya25ET2thVEJsUWhvaW5DNDhTa0creDl2?= =?utf-8?B?dW9JcFF4ZlBRU2tEbDVtVzI4NCtBS3V5WWRDcUphcUtPek44c3pzMWtQeG9Z?= =?utf-8?B?a0E9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: e679cfb2-516b-4147-6052-08dce2be2a46 X-MS-Exchange-CrossTenant-AuthSource: DM4PR11MB6502.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 02 Oct 2024 08:42:36.1607 (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: aXjgA944PHwbpbH4KjlPYBegvC7Jc0PiFcfrfz5j5lQqgO69boxxgz0J3luVb4VycxOsqMtfQmcfxisIIO1t41R5KWkEurtkn44tB5JBrxU= X-MS-Exchange-Transport-CrossTenantHeadersStamped: BL3PR11MB6364 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 10/1/2024 5:25 PM, Stephen Hemminger wrote: > On Tue, 1 Oct 2024 14:25:46 +0200 > David Marchand wrote: > >> On Tue, Oct 1, 2024 at 2:21 PM Burakov, Anatoly >> wrote: >>>> + >>>> +/** >>>> + * 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 >> >> I guess this is for the added annotation which points at rte_free symbol. >> A forward declaration would be another option. > > Right, compiler now needs to know about the free function. > Moving it was the clean solution and avoids duplication. > > If rte_free prototype is not moved... > > In file included from ../lib/eal/include/rte_string_fns.h:22, > from ../lib/eal/common/eal_common_config.c:5: > ../lib/eal/include/rte_common.h:261:42: error: ‘rte_free’ undeclared here (not in a function) > 261 | #define __rte_dealloc_free __rte_dealloc(rte_free, 1) > | ^~~~~~~~ > ../lib/eal/include/rte_common.h:260:31: note: in definition of macro ‘__rte_dealloc’ > 260 | __attribute__((malloc(dealloc, argno))) > | ^~~~~~~ > ../lib/eal/include/rte_malloc.h:58:22: note: in expansion of macro ‘__rte_dealloc_free’ > 58 | __rte_malloc __rte_dealloc_free; > | ^~~~~~~~~~~~~~~~~~ > [16/3024] Compiling C object lib/librte_telemetry.a.p/telemetry_telemetry.c.o Makes sense, let's move the function then. -- Thanks, Anatoly