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 21DC743B02 for ; Mon, 12 Feb 2024 16:42:33 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 16C2A4068A; Mon, 12 Feb 2024 16:42:33 +0100 (CET) Received: from NAM12-BN8-obe.outbound.protection.outlook.com (mail-bn8nam12on2073.outbound.protection.outlook.com [40.107.237.73]) by mails.dpdk.org (Postfix) with ESMTP id A436B40279; Mon, 12 Feb 2024 16:42:29 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=BspeSDTpy2KSijcrhj9BLPwbi8eFhHTXDfRD/nVJhOmEG1IeweV96KHYXVDY1u4FrCMmSvE6Wok1nSvR1iQJCccPZWnr7ybNdD71vuI1olK8D9Dd9xFJ+7Ieq4d5GbdVi7nYBQ/E1eHEwtCBsSCEtupCfRjEDTeG56G0CxqzyP/ZD/KCbJDCgMGpiIZSkwuD/dCkSiJyEKAiGyiy57AmclrO1VU3RrROITT6WR3TBSboEwSvm0d5P9TJtry42FPHKoTXF4ExkHPuMk1kYNtVB0iA3ku3CHAgqZh+6PspjgL8SkaMom5b5vxa6Mo0WXnrMT3pBWfef5iNXcK/UNmF8w== 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=O7uxw8JyK972AlEjmBfgeFyTI0vPUFnJlFaE9KUEKs0=; b=bjBVwpdBRQxuEm1XBY8PXToQ8LYj5y/SkiT857QEhApRMZUVdqkVqZx1RcwqyRFWioloIpwiYsJ5KO6CDbvtcNgj6z4+YsFoRDbsLXLCV0y1hTh4AMzr73JHUk/yp+AmP8+BcPbJzcfplbmqRSG68RvhEkTEeQcXuhgbzJaB1osXle1hpHznh3SdWXfbV5QWHxDsJWrYSqkLyMR9jGO4LzNAhK2FJVhfkc6V8YNv1KNfKWFgETLquDUPqS8Tozx769OuC1uhRUl8+XYuLHviZXdLIf1CVrdcgZmxUwYh2/aiwWuilQPbzOwgQWi5U34jTzi2JQV1DIr7Jp1sr91ijA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=O7uxw8JyK972AlEjmBfgeFyTI0vPUFnJlFaE9KUEKs0=; b=fIIxsof++fRayy8NA08GjiJtWd2v3oMiBsLMRZ+IWUyF0Dr2dew5rxZ9k+e4ur8UjfYmEf/KcHq8I37hq4k47PRu36T9ppRn+Kx1ztJ0NNz/AavLRCJ32ZNOHU2hLXqvboePxZMXy0CapCRGgz5RFxtH9k7z0NZfoeBk5DIZmLY= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by DM4PR12MB7768.namprd12.prod.outlook.com (2603:10b6:8:102::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.24; Mon, 12 Feb 2024 15:42:25 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::3ec7:6339:1c14:c529%4]) with mapi id 15.20.7292.022; Mon, 12 Feb 2024 15:42:25 +0000 Message-ID: Date: Mon, 12 Feb 2024 15:42:20 +0000 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH 1/1] eal: add C++ include guard in generic/rte_vect.h Content-Language: en-US To: Bruce Richardson , Thomas Monjalon Cc: Ashish Sadanandan , dev@dpdk.org, nelio.laranjeiro@6wind.com, stable@dpdk.org, honnappa.nagarahalli@arm.com, konstantin.v.ananyev@yandex.ru, david.marchand@redhat.com, ruifeng.wang@arm.com References: <20240202051335.776290-1-ashish.sadanandan@gmail.com> <5751086.DvuYhMxLoT@thomas> From: Ferruh Yigit Autocrypt: addr=ferruh.yigit@amd.com; keydata= xsFNBGJDD3EBEAC/M7Tk/DfQSmP1K96vyzdhfSBzlCaGtcxNXorq4fALruqVsD3oi0yfyEz9 4YN8x7py0o9EL8ZdpOX0skc0AMCDAaw033uWhCn0GLMeGRKUbfOAPvL6ecSDvGD7CJIO9j0J eZUvasBgPdM/435PEr9DmC6Ggzdzt8IuG4PoLi5jpFSfcqxZFCCxLUDEo/w0nuguk2FTuYJg B2zEZ4JTBZrw7hIHiFh8D8hr6YA6a5uTofq1tr+l048lbtdFUl8TR0aIExVzE4Z8qKZlcE+9 RQaewjK5Al1jLE4sHdmd3GN+IvgDF3D/fLsi25SKJDeGSdeHkOmaX0qGeM4WKIfU6iARRCiQ N3AmBIxZ/A7UXBKLaOyZ+/i3sE6Wb53nrO4i8+0K2Qwyh6LjTeiJAIjYKN43ppxz3DaI+QwQ vI+uyHr4Gg0Da9EPPz/YyKauSeOZCfCB5gIfICO0j6x0SCl8uQ2nLpjxcZkf0gjcwUzP3h+S 3x6NfDji9YEij0zczW/dcSpGgZ6vsFpPrtnP9ZXy6J53yp0kJtOJoOlkEFFdU2yCZnCDseum CoudmGLZVvS0/DzHDJejq+3kK3FDGktZBOxZIIpal+nFqS7lVgOZc4+huVv3jyhzoAUOEyXA XK5j6o7g8STUY+z33QNnHpdLvecMwuzmvqy0jR54yAbZ64mB9QARAQABzSNGZXJydWggWWln aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgY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VIZewdIjkzAhmmbxl+8rM/LKBH dZUMTzME5PFCXJIZ83qkZQ795MTe2YScp9dIV7fsS5tpDwIs7BZNVM1l3NAdK+DLHqNxKuyO 8Zk= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0377.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:18e::22) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|DM4PR12MB7768:EE_ X-MS-Office365-Filtering-Correlation-Id: f1ff5aa0-0d45-4c4a-ffe6-08dc2be135cd X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: IX1cn8vZdHqaU5CM3uieE7gJXEtiRHNrI1SgmhikB2edCEfeEEQ+i9OWmHDoLI0IqMueIne3mRJxOinDbPniJTO0Y2e8dIXtKO/fcJiABPPDGcvpAGTO2BDPkTGGBW2SVR8BPDT4ISqaJW5zdCPVOinDi9lX/y2Sapu97hcxKy+J0gSk0epqqShp/vX4/AIcbs962qldFqy4H8Dh6uLxbHtr723TBCtTfplnmOFavqp2sE7m3GcJnpitjMhGTtuXIY4JbVDx2pvB+TKr3pex8ggA0E9RR6UtOxaKiGR9WPlWwhzOfMI7Szo5xXdfr91zBMCaFi+K0+cv/W320WfG1jYtV4MM3VlzibNXLA/uoCyR6toABIqyFAG9Aebye1kGAw+rEfbzmkFQoDGZs3YQt7iCord/x+evxcPrpPclJsPjyXF7fy+K5YU1HumQl+dlgwmU+Mgano8jt+rWdWi6quT8B7fMJqtjPRbnsVXxX8eUF8RAnGboA9Pcgu8BVlwcEXj8IpXPaBo09lP37CeaYDvWb6BAJ+T6+9sU+KsgjN5nKOO6gsdVBXoIB+HcibEg X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230031)(136003)(39860400002)(396003)(376002)(366004)(346002)(230922051799003)(1800799012)(186009)(451199024)(64100799003)(4326008)(8676002)(8936002)(7416002)(5660300002)(2906002)(44832011)(26005)(2616005)(36756003)(38100700002)(86362001)(31696002)(110136005)(66476007)(66946007)(83380400001)(316002)(66556008)(6506007)(6666004)(6512007)(53546011)(478600001)(6486002)(31686004)(41300700001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?WThnSUZHSktESUFCeHNSVE8yWEppOGtBUWQ1VkE2Vm1JMmJDWXJiOTROZ0hB?= =?utf-8?B?VlN3Y00vcGNoUUNmT2hYNFVxRnFmYVNrekpTcHR2MDc0NUc1dkFCaGFVN1N4?= =?utf-8?B?YTdIVktreUw1MlJnbEg4N21jbUFjeHB6L3lDUlc4QUpoY3Vzc2QxNFJBa013?= =?utf-8?B?OU51UFlIM1VmMk14Qjg3RVhqYk52VW12SnloU3gwc0t2K0ZuV1NodUpsRVVR?= =?utf-8?B?dW1jYktmSXdSVUx4aW1TQjlFelZyQmxiY1l5Z1ZuZG1CdHFIL1hnT09Xb0NW?= =?utf-8?B?UDdxSThBMUpEMUo3eEFQQ0k3aVBHTjNzcVZ1bmZNUzczR0MzUENJT3pVU2Zy?= =?utf-8?B?bWMxZml1Q0kweml3VWNhMlQ2THYrbGRRdENYUTFpMzdySXhkczZNQTBKdmFp?= =?utf-8?B?U3JUZVd0b0FlT1NOQXQ2bk5OOTdoZWNDRjI0Q0wwK2R2cW9VbSthV3VpRkRV?= =?utf-8?B?NEdpcnRUNEFFVC91M0x3V25ReG9KemlKQjZKNDcrbGhocXpvSUQ1d1ZUb3B5?= =?utf-8?B?S1BVUlVHNnZpdFFKZ1ZJbHFVTGxjRlRHZi9TNDEy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2lKUXBORGZTRzBaUEFnT2twYU9aKzIyeHh5YXBB?= =?utf-8?B?S3J1UmFlaG5vREN4UFBxU2IyZE1qU1piOUloQThRVkVhTUxMajZMZ05scEVN?= =?utf-8?B?MEtuU1JnNFlNUk9WRlBQN0ljckw3MzZiNEZzN1RmZVZSaTZZWmt5emJ2MHBY?= =?utf-8?B?M014U1Q3Z1ZVODdoeU9IWEZjOUZMMi8vR2RwbXI3YzNXd2dGSmd3cEMyUGNK?= =?utf-8?B?d3lWUmhrSVJxY3Z6MWdRdjFIWm9SMEhXWFJrZ1pZSW5pOVlBakhmbk9FWVRB?= =?utf-8?B?T0xwVk84Z0VWTkFZeUQzWFQvcUhRTkY3TVRzTEM4c3pJYVJxd0t2a0EvRjRT?= =?utf-8?B?S0xlbUFRZzdLZjY1UUR5bm9mSmVvcFJ6emhrMlVQakJqZEZMb3VHUEcvc3hy?= =?utf-8?B?UVpmQmNXVkxOaDRhdGRzMXg1eHFYVTUrem9oS3ZPZzhxRDVNU0xLdVUwWUVq?= =?utf-8?B?elVnVDJWUWNUd3Y0Zm1OVTcwT3dpTVFvc3EycmcxWEhQb2YzVFVLbHphQklI?= =?utf-8?B?VG4xVnRWSjFEQUVIV0N3dTRHMnV5TFlYSisrcTRObENGMXRkKzZRTTE1ZWU0?= =?utf-8?B?TUVqOWF5SG5tZ21VeWNUeElBS0IxK1AyVUJOOGR0WENhYUZ5UlhnOTA0R3Bu?= =?utf-8?Q?+lIgqtJa0V4gMEtcZQCQt167E?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: f1ff5aa0-0d45-4c4a-ffe6-08dc2be135cd X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Feb 2024 15:42:25.3700 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: c6AbSxk7Dp7Cfsk65MiIxonNNwDMfqpRRd/L5Q+ZwOQL+WjY70LbvkHUk9n9T9Qj X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM4PR12MB7768 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org On 2/2/2024 9:40 AM, Bruce Richardson wrote: > On Fri, Feb 02, 2024 at 10:18:23AM +0100, Thomas Monjalon wrote: >> 02/02/2024 06:13, Ashish Sadanandan: >>> The header was missing the extern "C" directive which causes name >>> mangling of functions by C++ compilers, leading to linker errors >>> complaining of undefined references to these functions. >>> >>> Fixes: 86c743cf9140 ("eal: define generic vector types") >>> Cc: nelio.laranjeiro@6wind.com >>> Cc: stable@dpdk.org >>> >>> Signed-off-by: Ashish Sadanandan >> >> Thank you for improving C++ compatibility. >> >> I'm not sure what is best to fix it. >> You are adding extern "C" in a file which is not directly included >> by the user app. The same was done for rte_rwlock.h. >> The other way is to make sure this include is in an extern "C" block >> in lib/eal/*/include/rte_vect.h (instead of being before the block). >> >> I would like we use the same approach for all files. >> Opinions? >> > I think just having the extern "C" guard in all files is the safest choice, > because it's immediately obvious in each and every file that it is correct. > Taking the other option, to check any indirect include file you need to go > finding what other files include it and check there that a) they have > include guards and b) the include for the indirect header is contained > within it. > I assume you mean all header files exposed to user (ones installed by meson), in that case +1 > Adopting the policy of putting the guard in each and every header is also a > lot easier to do basic automated sanity checks on. If the file ends in .h, > we just use grep to quickly verify it's not missing the guards. [Naturally, > we can do more complete checks than that if we want, but 99% percent of > misses can be picked up by a grep for the 'extern "C"' bit] > > /Bruce