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