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 D799143C60; Wed, 6 Mar 2024 21:51:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C596442E6F; Wed, 6 Mar 2024 21:51:16 +0100 (CET) Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.16]) by mails.dpdk.org (Postfix) with ESMTP id 8FA2D42DC3 for ; Wed, 6 Mar 2024 21:51:14 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1709758275; x=1741294275; h=message-id:date:subject:to:cc:references:from: in-reply-to:content-transfer-encoding:mime-version; bh=CiKWzX22/G2ZiH7zg50G8A9yXdflntoQ2wWxUb/JPiM=; b=QFoquUJ8PkEBUqwd1DecikgaoT4/pfsAuBRvKck41EzoyUtj/LyVZbW5 hwBkC0eND2J3f6sxa52woJQdelJIwjGHoSrP9XP4gnuiy4/yKlY4rQB3n QADoa6Q8iZ8vHWvTkKB8r99oTd8tEvrn4KsWNxYrovX90ol5OPqpJdArN 1XI6zLAip6z1N4dxrMbMYFTaqooLB19BdM4LH/YtBmH1VF53YCFWrVaCj N5d2JwwCyveLKhiE7nNy9wMaihlxvgPQmsxFdP1z1EQXP4RQ1gxI1nyzF eXw7xwW7p1Y01BWlLeC0+0my/2ijJvsB2g+cuFUUYipu8bulzGWQiojP1 w==; X-IronPort-AV: E=McAfee;i="6600,9927,11005"; a="4974215" X-IronPort-AV: E=Sophos;i="6.06,209,1705392000"; d="scan'208";a="4974215" Received: from orviesa003.jf.intel.com ([10.64.159.143]) by fmvoesa110.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Mar 2024 12:51:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.06,209,1705392000"; d="scan'208";a="14530236" Received: from orsmsx602.amr.corp.intel.com ([10.22.229.15]) by orviesa003.jf.intel.com with ESMTP/TLS/AES256-GCM-SHA384; 06 Mar 2024 12:51:14 -0800 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX602.amr.corp.intel.com (10.22.229.15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35; Wed, 6 Mar 2024 12:51:12 -0800 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2507.35 via Frontend Transport; Wed, 6 Mar 2024 12:51:12 -0800 Received: from NAM10-BN7-obe.outbound.protection.outlook.com (104.47.70.100) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.35; Wed, 6 Mar 2024 12:51:12 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ll1H97zTjQPXCDf5jsbDiYit0TFkHC0QfH6lEdAzJ/NRe1ECy6b5nYN/BX5i9T0c8YT2efgb7Jr2nOeZjenAtvQgtc2q6xmb2Hs31RfgUe/H6nFHHB63WV+uRhs0lb8VXSTIsP0uR5QBNQ3BnSadHLWamSJtbNVDI/s+6Z0UCxGgECRQmFDlzS0eep9zelYArWynN+DXwvozFSj7JqJokgEdarn1ERk2rSLF++ZXydrH4lT3g5dWHosRoBHJnmUE1wOaHMPMiDjmSWsUpphvc1qHPvOcoWyNymKhEF9R/hC2ZwwfhZS87vaXROXJNkuWpa6MRqcrtBE4Eeg6jW8MXg== 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=mpZYeF25lxetFkKmrEAv13RdZPxmyvG7n9juUKcUQa0=; b=XIvYodlstazxXl8AWZVagEFC3inaQFSUgUXdPngOD5ykiby60T5cfydO4MD0XOckWFqEr9kC+ai6CUpPTakpN7X0CP7WAMmIs0niXEHddZtqhLKukSaj1ZsHrucvm7wnFOnF4TpQTKTscExC9SNpL2JoTcgZQVDidnzHAN0ztSilBSxCmfgk8Q45Qdx1RwmHWFLcJJ32VEJi/MHxvdzPvZdFVWKMy6pujZdeUo6u6QGmmjGdH/G0oPcytq2rdp7EFIXMHLbZND3ORzH0TEA+uAP3btKackT2GwYXNytVLLbX5XzJYDZ0B/bkIGcd0q52dr7wQYp2ttYnixSuIJ+jNg== 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 SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) by MN0PR11MB6278.namprd11.prod.outlook.com (2603:10b6:208:3c2::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7362.24; Wed, 6 Mar 2024 20:51:05 +0000 Received: from SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::efb3:f2f6:caf5:9edc]) by SJ0PR11MB5772.namprd11.prod.outlook.com ([fe80::efb3:f2f6:caf5:9edc%4]) with mapi id 15.20.7362.019; Wed, 6 Mar 2024 20:51:04 +0000 Message-ID: <8d6e9048-e4d0-4626-a439-bd11ebb6de50@intel.com> Date: Wed, 6 Mar 2024 20:51:01 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v2 2/3] lpm: use rte macro instead of GCC attribute Content-Language: en-US To: Tyler Retzlaff , CC: Bruce Richardson , Honnappa Nagarahalli , References: <1709075273-6885-1-git-send-email-roretzla@linux.microsoft.com> <1709146076-22254-1-git-send-email-roretzla@linux.microsoft.com> <1709146076-22254-3-git-send-email-roretzla@linux.microsoft.com> From: "Medvedkin, Vladimir" In-Reply-To: <1709146076-22254-3-git-send-email-roretzla@linux.microsoft.com> Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 8bit X-ClientProxiedBy: DU2PR04CA0053.eurprd04.prod.outlook.com (2603:10a6:10:234::28) To SJ0PR11MB5772.namprd11.prod.outlook.com (2603:10b6:a03:422::8) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: SJ0PR11MB5772:EE_|MN0PR11MB6278:EE_ X-MS-Office365-Filtering-Correlation-Id: af49a39d-c677-46b7-e8ca-08dc3e1f23c3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kSf4GRIsij6YCoyJfF+qSHXfpaTor+rqJw0kXU18N6T8K3BjAnAlFnCvtg9LdTx8ieKNiUNETXu6LyiFCmdQhiARLC16f2gjekbqkj1ZCCFhSnb/0F7NOeZDUKTwYSxmPilffqsOuH/m6iWhzjiYwL9lodlA3wBsyG3cafNFTlNJ064/n2jhztHweceYV8m6rqepktQ5ZaHB+mOLwP6BOmy5GZNg58ONNCe/8+/nQoaM4bhF1RFBVLvnyeDscBi1XYIjmV9iGcoF5hFA+suSmrr8mpqn2BW0ZnXMyHRiqyttDFWt5EqahGNzmue+Fyq6C/yj0ToGwFgCUi6HwuWIIbaIs/lBQV2nZ0Yn7mzv6VyiCl7dUbEox9eKZu/XNpT7ij1dwUiqYg5RrACENd9Fo6VfpjxLI9bqjYjB7M+/s6ltkBvb6zlcbjz8dt8qkL2bpY5QV3HU8/m8plseyg3uVKNAC24qOD9I+jZuYrAp0jAhqdj8oxJ6j891XLF00aDT9Klp9P0tAFUD1gkdOc2ssSMrRloaLZ/WAlxb7HSgDj8b0+Aczoq9J8YyZzhqKDEXEO1Zna5B0AIaNUpus47NSsIBecBqBU/a8tzZHxkYcwas/j1GGYzjiyL3m3EuiBmvyok9nHIiQYk4mGsdhalsguAhNqUP50xmtdiixOQWAc0= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:SJ0PR11MB5772.namprd11.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(376005); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NzhNQnkrbU5CVjJaRFFqY1VUTUdaamN4QnVtWllsSi96NEw1Q0xFRkd3aG9z?= =?utf-8?B?c3dLMkpEazMvZWpzKzgxMXFnZ20yK3NpRzZ5d0RmQ3E3aGw3eXNXYytXdWFw?= =?utf-8?B?RnpiVXg3VGRPeTRjTFh5djNIMmdTVnVkVmEyc1Y1Mi9iV0FNcEF4bUU0TXRk?= =?utf-8?B?eDVsam9FN3ZvWklWWmU2eS9jYnpJQzNmV0pBMS85VVZ1Q28yMm1sbGRndGQ0?= =?utf-8?B?SnJQc0RudEFGcHFMSjVpbHlQVVJMQVVicitSTDQ3WGxIN3RCMTBoa0FLTkow?= =?utf-8?B?WExKek9iWExDalRNYmRnME5VNnQ1SzloekprWHQzNTc3cHVOWVZrT1NjN0tk?= =?utf-8?B?MTJVTjEyMTBDbmpYTlpWQ0xZR3M4ME9TdUFTT1llUVhyRk1QbE5VeW5jd1ZG?= =?utf-8?B?RUpIQXdTRVE4VmVremZwZGoxeEJVVkNXZzJVbC9DSkFBelM3WDhaQjhZOUhH?= =?utf-8?B?bEU3YWtUc016dzB4VG4zKzg1L0l0ZFhseDlQZE85dnlqcFFwYkc4Rk12aXVv?= =?utf-8?B?MmdRUi9rVlY2SmEzUnoycXZsRFQrSUVBeDZMaXJ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0RnlIVWVkOG45T3dzZnNQUzJJN0VOLzMz?= =?utf-8?B?Wm1EMEYyZUlyYWFWaXhtWk81ekJtRElxUm40NzdIdStHNDdkY214VTBSdit1?= =?utf-8?B?VXN0dmNWVVRNYXlYVm5va2ZYNlliWnVSb05zV0pCS3hvK0l0OC9CSzE3SDk0?= =?utf-8?B?eUVzY3J2M3VVWDRxOEJzMW5sWjVncU9lWTIrdVdwbHVDNUxIVTVDVVF6Nllw?= =?utf-8?B?SGFYZFBJeHphdml3UXY4NHY2TzR0dTVaTjV3R2ZvUWVEdEp0REx3eTVmT0FK?= =?utf-8?B?NEpacjlpcjFGWlFlQU1kamlURWZvYnJoTlVvMko5ZXZib05Ed0dWeDhDaENE?= =?utf-8?B?Vm1DSGhteVRsNmR2OWJXYlpXUWVLMUhLV1NvT0tXYUVDQnNzQ1h0Vk9YMFVD?= =?utf-8?B?OG1JblgxOHQxenA2dGxoUkcrSVBuaVgxTExNODlqTFgzSjF2ZS84ZE5ZUndB?= =?utf-8?B?c211ai8yWUFUUDh5NzZGRWV3cGJIak94dzRuYTliSmdpd0w1d3hjVU1WWjB6?= =?utf-8?B?OEdCcVZaVVQ4YytFSWNrOTJ4OXkzWFV6QTFZVEkrT3ZhMXMvakJUdFg2cEJI?= =?utf-8?B?MHhERlhuZW9OSVJnRWEzdllmcVhCMVd4SGJENDgvNXVBQ0VnVDBFbFlRcFU5?= =?utf-8?B?VW5OcklZNExXSWN5RTNlQUdRbzdpWFQ1cFN1a2pTNE43M0hkNlZNd1Rta1Ro?= =?utf-8?B?T3c9PQ==?= X-MS-Exchange-CrossTenant-Network-Message-Id: af49a39d-c677-46b7-e8ca-08dc3e1f23c3 X-MS-Exchange-CrossTenant-AuthSource: SJ0PR11MB5772.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 06 Mar 2024 20:51:04.7211 (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: 8ebhK7kNe/k4CC01+dwhcQ4LM2BjlNftOqLCz6fGFVyU35WgwhrWBEc72Rxy1/CcbZpVO5yUYFgu00eqW0OEc5rV95OmbPR/lwD6VKnmKk0= X-MS-Exchange-Transport-CrossTenantHeadersStamped: MN0PR11MB6278 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 Acked-by: Vladimir Medvedkin On 28/02/2024 18:47, Tyler Retzlaff wrote: > Use newly added __rte_pure macro from rte_common.h instead of directly > using __attribute__((pure)). > > Signed-off-by: Tyler Retzlaff > Reviewed-by: Morten Brørup > --- > lib/lpm/rte_lpm.c | 4 ++-- > lib/lpm/rte_lpm6.c | 2 +- > 2 files changed, 3 insertions(+), 3 deletions(-) > > diff --git a/lib/lpm/rte_lpm.c b/lib/lpm/rte_lpm.c > index 9633d63..a5c9e7c 100644 > --- a/lib/lpm/rte_lpm.c > +++ b/lib/lpm/rte_lpm.c > @@ -85,7 +85,7 @@ struct __rte_lpm { > * depth (IN) : range = 1 - 32 > * mask (OUT) : 32bit mask > */ > -static uint32_t __attribute__((pure)) > +static uint32_t __rte_pure > depth_to_mask(uint8_t depth) > { > VERIFY_DEPTH(depth); > @@ -99,7 +99,7 @@ static uint32_t __attribute__((pure)) > /* > * Converts given depth value to its corresponding range value. > */ > -static uint32_t __attribute__((pure)) > +static uint32_t __rte_pure > depth_to_range(uint8_t depth) > { > VERIFY_DEPTH(depth); > diff --git a/lib/lpm/rte_lpm6.c b/lib/lpm/rte_lpm6.c > index 271bc48..2bdd540 100644 > --- a/lib/lpm/rte_lpm6.c > +++ b/lib/lpm/rte_lpm6.c > @@ -1127,7 +1127,7 @@ struct rte_lpm6 * > * Convert a depth to a one byte long mask > * Example: 4 will be converted to 0xF0 > */ > -static uint8_t __attribute__((pure)) > +static uint8_t __rte_pure > depth_to_mask_1b(uint8_t depth) > { > /* To calculate a mask start with a 1 on the left hand side and right -- Regards, Vladimir