[PATCH v3 12/27] net/nfp: refact the hwinfo module

Chaoyong He chaoyong.he at corigine.com
Mon Sep 18 03:39:30 CEST 2023



> -----Original Message-----
> From: Ferruh Yigit <ferruh.yigit at amd.com>
> Sent: Friday, September 15, 2023 9:46 PM
> To: Chaoyong He <chaoyong.he at corigine.com>; dev at dpdk.org
> Cc: oss-drivers <oss-drivers at corigine.com>; Niklas Soderlund
> <niklas.soderlund at corigine.com>
> 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.


More information about the dev mailing list