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 9781F425D5; Mon, 18 Sep 2023 13:01:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 2911240263; Mon, 18 Sep 2023 13:01:58 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2041.outbound.protection.outlook.com [40.107.93.41]) by mails.dpdk.org (Postfix) with ESMTP id 865274021F for ; Mon, 18 Sep 2023 13:01:56 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=HKWzRXTfu/nigiWJFB408HeD6ycnR8uZQ+oJQMd+sQCP8t1ywokBsOU5jfXGfGepCb62mAXbMqoVS1gwOdXcNMiq2qNcNyK2Cf60Q+lU7qLyD53wqsTLFmJvmnHasqssCAnqVjih5kSadbEXqX6PdFJZ4+q6t9Oz0t0tJEAAXIBcUBWy3zo2D5ns661UXk4iKoHW403xGHF2Lb/d+jC5E1YSc83cDQU/k8trG24Wn9zRaDl84yG11Wnj3C6e5B8rZOPrQV6Ol3eizrvkcnBtha6oY32fe/ngC12tvEBlJ8hISiP6nF035lWB2IIczmpUyZBrIlZwir6403Qh8kUn+g== 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=VW41KiDqvGteHvu/idZf1ifkk6zxYazs+yE//Ox+nbk=; b=GzjHqmpbu8Jq6yrsXEfwsPsTmGC01SYueYipLtdvnlw0ncdtf/fqpz9jQ7oocf0tvbLD4pXz4vAepgJIPnJTJ18xZkdTe7mE1QgbumkD5bNSHKUvs9Pw0vk+oVHYrfbNDdCSBf88alXsZ+R3BXAYQnwK4NUJq2P41SK72m1yBB+gR15zA7LZc6kXIxZ7jLIiRkfudP0nB2ZIblmVDkrcwMBbJjvP2jRY+7/jmEHMQItEx1doAv1SrbAA1XXLNmlFft0cw7Oxx9XriN27raOLtyxdYX0mIIWNQOy7RM3i58oC3hd5K+qa8P7cUbpDoTpxQpvwH+Psi9VXdyMThj4WXg== 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=VW41KiDqvGteHvu/idZf1ifkk6zxYazs+yE//Ox+nbk=; b=29mW+1xz/KUDp2tYBnZIKiXuwpv3U9NiXJS5sqVV/WEd22uLmIciZEynGKdNdxla26hd+x5xDdzkZUvFj5gjSUEaX0guZ0JRlvgn9rKOgk+tRynBzuONDjub+0Zf/ldw+Y30ZKw3myMYcFu0VnN/Uc3XjW8lYFeUl4Tj6KCB2eo= 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 IA1PR12MB8539.namprd12.prod.outlook.com (2603:10b6:208:446::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6792.27; Mon, 18 Sep 2023 11:01:52 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::102f:c69b:d3e5:7fe8%4]) with mapi id 15.20.6792.026; Mon, 18 Sep 2023 11:01:51 +0000 Message-ID: <1bc8e05a-6531-4743-8a81-d8df09ea2b4b@amd.com> Date: Mon, 18 Sep 2023 12:01:45 +0100 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v3 12/27] net/nfp: refact the hwinfo module Content-Language: en-US To: Chaoyong He , "dev@dpdk.org" Cc: oss-drivers References: <20230830021457.2064750-1-chaoyong.he@corigine.com> <20230915091551.1459606-1-chaoyong.he@corigine.com> <20230915091551.1459606-13-chaoyong.he@corigine.com> <3d0bf9ad-2564-4e96-bb6c-f735241b425d@amd.com> 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 aXQgPGZlcnJ1aC55aWdpdEBhbWQuY29tPsLBlwQTAQgAQQIbAwULCQgHAgYVCgkICwIEFg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bItv3qWTq29dihLYpzd6dqB708k7 4RBz9051oLaFVGkguFw/tXmA17nx+c2uR5jx8wb4j68umG2X++0dSta5eHAVhmtXvrqPW6Ku 3FQ= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P123CA0505.GBRP123.PROD.OUTLOOK.COM (2603:10a6:600:272::15) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|IA1PR12MB8539:EE_ X-MS-Office365-Filtering-Correlation-Id: 1c4aa0a3-4dd6-4db0-54a4-08dbb836a958 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: SCJGH7eP3132LBwnKk0fTngnSQdGhW1h7wNnwtC3hDB1GUDth175Nr31x4cDYu6tt3dWhbUMrZxaJKTFd+JUkC6acZipHdrePMpuDiiR7USnkDycDtMACAxN8mk5ktM3emWDWfD+PanG+3ltSAzUAKmGthw92xA9O8DqIGDQSY5BGXkz9f9cnULuOeNxuF3c0rL+3F9wPas2zhEJKNEyaSKT82sEmFSyD+MEbivFXIuqVA0b81yM9vhYdE+aR//pCZzNebYVFvFRaPDUXASDqE8n5UvXur43phd2Kqf7TdPGXKJZp21UQ6w4PamBhnCUz4iY6HiXQia2xth6ybLk4v1WgGA3D8eif/zTqjT9wArcOAhdbvyT/4pIcUFw5U/LBS/9l9508hsEiKgl3GaJONmC6ZPcDfDUalcAyWUm5JOPekkFKpcLoLBcNl8qg8tu+ywd3fViAJFiXGb/sZzEZ9SIuB+Bl5JtYHTMDFypIXMYsGXOqF4Z3CDB/x8cJfi/tKEaWVSn3yzeH/gKcttMI+EzMWyxzu8NAhegGhKQKMIdC8hxcd1nSdLDmrO+7TaZQ+wXIuT7FbUz5qPCvSQ7vg7DjuZZka6HQB4ux/Jo0/L37pgEueQbA/3XjDhiS6U8J/7kbqfqFvEdJwLtsKckVg== 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)(376002)(396003)(346002)(39860400002)(136003)(366004)(1800799009)(186009)(451199024)(41300700001)(2906002)(478600001)(83380400001)(2616005)(66946007)(66556008)(66476007)(86362001)(53546011)(6506007)(6486002)(36756003)(6512007)(6666004)(31696002)(110136005)(26005)(316002)(8676002)(8936002)(4326008)(31686004)(44832011)(5660300002)(38100700002)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MUxJRFdWYnNxdDZ3cjVuMTh2Tm5zWmt1V1FJeDk4Q0wrS1lKZU1wa3ZjVGc1?= =?utf-8?B?a2FFT3BQSVNaYlo2c3l0Z2hKaVgrMDd2aDU2bWVZTkV5VjFJTTYwTE92Nzhj?= =?utf-8?B?RHovcXh2TkRIcnhpaHdtdTIwa3ZiMXBMQWZsK3pVRHBTUFhEOW55WklBUC92?= =?utf-8?B?VFVjWUJmVlFTVXVhZmVJQ2JjSXdqbVNHeUIvdW1COEVFY3NuRFZIVFoyc0pF?= =?utf-8?B?a0x0N3kzTGNKbDdqWGh0TG1xY09mOWNFdDFCTDJXcFlHdWVJT2sveWdoV01T?= =?utf-8?B?TXllMzBTVkdFc2wyYytpclF3OG9ybnhqeUlrcXF5Qlp4WVQ3WHd2K056dENo?= =?utf-8?B?emdOYmZtRVBRS0VLdjZRa2xoK1NFdWkwVVgwVVpjWGdZQ0VHMU0xRDI0Mlo4?= =?utf-8?B?dWxIdzkxdFk1bjdUa0ROUU5pb0xCS2hhUml1a3ZoOS8yVjl2L0cwMWR0K1JI?= =?utf-8?B?TzA5QUVRbzF1d1JGdURqMTVBMXpyME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GRON0ZOZ2NMa2lmak9JWHA0dkdUS1BXd3dBdHRQa2JwaW50?= =?utf-8?B?VlJxZXQzSmV1bWdEU3VEZzJ1QU5hZ0w5Y2wwUzhWUWhtZ3gxUjVvZTY0TEFo?= =?utf-8?B?MFNiWkxCL3pJRUdKOUZwVjZML0ZaZmE3WWJmRHExS0dSckFGbWRBZGZJVXpu?= =?utf-8?B?eCtTL0FreUJEdXc3NTZ3N2xuMXovWHdrSW9ZcHh4M0tFMlc3bi85RDNqSXVC?= =?utf-8?B?WmZISDc1Y1FGNTdPVzFYZHJVSjg2SXI4OElFNlVzWEY0UjR0SVRZWG00K1lr?= =?utf-8?B?bDRLNXkyQjVkSSs5c3UzdlZVWjRUZGRkaVNSSFc5amxwUGdFKzNBR0FyVFU1?= =?utf-8?B?NTZPUE5mbXB0RERKa3JMSmEwZ2dKYjBqWHFhWVNDT0wwYStzT3RCazA5b2ll?= =?utf-8?B?LzlXNzh2aFp6em1xVXQ4NDVSZGlaaUF0MU1WUFFZTStRTEZBZ1YrQk14d29U?= =?utf-8?B?Q2t2VHl6Nmd0UHB4VXlrNjNwYU5ER1RJQXJKQjhkOElGNy9GR3p5TUkxcGZH?= =?utf-8?B?SUV1VHFCMUJxY3NadjB4U2Vrb0lMU0JSMjNUMGE0UURGbXBWQXVmZmRDTWR1?= =?utf-8?B?bzRYUEsrNjFQWHo3RkFWME5OUmxXTlZFeVlUSnBYc2cxTy9xY3dhNVVKeUhB?= =?utf-8?B?VjQ2SmJFZ203eG9RSit2aUptVi9zM0tGSHFVYkxHNmthME5aQVlXOUtkWnkx?= =?utf-8?Q?LEUPDL3leP6PmYtKY3PmeI/Wg?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1c4aa0a3-4dd6-4db0-54a4-08dbb836a958 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 Sep 2023 11:01:51.3501 (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: 4GVCkWvQ+/8ii8OifIkOTLHf12U3BjVeoKDikVJVXrgnnJjvVYjG7vtJw/cbGyQ6 X-MS-Exchange-Transport-CrossTenantHeadersStamped: IA1PR12MB8539 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/18/2023 2:39 AM, Chaoyong He wrote: > > >> -----Original Message----- >> From: Ferruh Yigit >> Sent: Friday, September 15, 2023 9:46 PM >> To: Chaoyong He ; dev@dpdk.org >> Cc: oss-drivers ; Niklas Soderlund >> >> Subject: Re: [PATCH v3 12/27] net/nfp: refact the hwinfo module >> >> On 9/15/2023 10:15 AM, Chaoyong He wrote: >>> Move the definition of data structure and macro into the implement file. >>> >> >> What is the motivation for this move, I can see same is done in multiple other >> patches? >> Header file is still included by .c file, what is the benefit of moving from header >> to .c file? > > We try to make the interface between modules as small as possible. > > We meet some problem when we add new features, too much content in the header files make it difficult to form a identify dependencies among modules. > When we try to add a new data field in a structure or add a new data type in one header file, we had to modify many unrelated files just because it includes this header file, it's not good. > > This is the direct motivation for this move, this will make the development easier.> If you can move a struct or data type to .c file, it means it is not shared so updating it should not cause change anyway. I am not against it, but I didn't get your reasoning. When there are 'nfp_hwinfo.c' and 'nfp_hwinfo.h' files, I think that is reasonable to have "nfp_hwinfo*" macros and structs in the .h file, it looks like you want to separate data structures that are shared and ones that are only used by 'nfp_hwinfo.c' but I am not sure how it helps. Anyway if you know what you are doing, it is OK, I just want to double check if this is done on purpose.