> -----Original Message-----
> From: Thomas Monjalon [mailto:[email protected]]
> Sent: Tuesday, March 20, 2018 5:28 PM
> To: Richardson, Bruce <[email protected]>
> Cc: Pavan Nikhilesh <[email protected]>;
> [email protected];
> [email protected]; Burakov, Anatoly
> <[email protected]>;
> [email protected]; Trahe, Fiona <[email protected]>;
> [email protected];
> [email protected]; [email protected]
> Subject: Re: [dpdk-dev] [PATCH v2 1/2] drivers: add common folder
>
> 20/03/2018 18:01, Bruce Richardson:
> > On Tue, Mar 20, 2018 at 09:36:25PM +0530, Pavan Nikhilesh wrote:
> > > Hi Thomas,
> > >
> > > On Tue, Mar 20, 2018 at 04:45:47PM +0100, Thomas Monjalon wrote:
> > > > 20/03/2018 15:40, Pavan Nikhilesh:
> > > > > Add driver/common folder and skeleton makefile for adding commonly
> > > > > used functions across mempool, event and net devices.
> > > >
> > > > I am not sure there is a real benefit of introducing such new
> > > > directory. Is it only solving the choice of where you add files used
> > > > by several drivers? Is drivers/bus/X/ the directory of choice for
> > > > platform shared files?
> > >
> > > drivers/bus doesn't seem to be a appropriate abstraction common API's
> > > used across multiple PMD's.
> > >
> > > This change is in regards with the discussion on ml:
> > > http://dpdk.org/ml/archives/dev/2018-March/092822.html
> > >
> > > drivers/common seems to be a popular opinion but maybe we could use
> > > something like drivers/SoC or if you have something in mind please
> > > suggest.
> > >
> > I think drivers/common is a better solution as it's not just platform buses
> > or SoC's that this occurs with. Even PCI devices can export multiple
> > functions, such as in the QAT case, which leads to the case where you have
> > shared code between different driver classes. I don't think the PCI bus
> > driver is a good place to put QAT shared code. :-)
>
> If drivers X and Y share some code, it is possible to link files from
> X directory in Y library.
>
> If we want a more explicit and separate directory for shared code,
> what would be the name of the sub-directories?
> drivers/common/qat?
> drivers/common/octeontx?
> drivers/common/marvell?
> drivers/common/mellanox?
>
[Fiona] Yes. We plan to add drivers/common/qat.