DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Sharing Common libs between PMDs
@ 2018-03-14  9:34 Liron Himi
  2018-03-14 14:55 ` Jerin Jacob
  0 siblings, 1 reply; 8+ messages in thread
From: Liron Himi @ 2018-03-14  9:34 UTC (permalink / raw)
  To: dev; +Cc: Liron Himi

Hi,

We have several PMDs in DPDK that are using the same underlying common libraries.
In addition, we have plans to add some new common service into DPDK that already introduces too much complexity with the way that the code is written now.
Therefore, we would like to move all our common functions calls into one shared/common folder in DPDK and we need to find proper place for this purpose.

Can you suggest on such a place?

Regards,
Liron

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14  9:34 [dpdk-dev] Sharing Common libs between PMDs Liron Himi
@ 2018-03-14 14:55 ` Jerin Jacob
  2018-03-14 15:04   ` Bruce Richardson
  0 siblings, 1 reply; 8+ messages in thread
From: Jerin Jacob @ 2018-03-14 14:55 UTC (permalink / raw)
  To: Liron Himi; +Cc: dev

-----Original Message-----
> Date: Wed, 14 Mar 2018 09:34:40 +0000
> From: Liron Himi <lironh@marvell.com>
> To: "dev@dpdk.org" <dev@dpdk.org>
> CC: Liron Himi <lironh@marvell.com>
> Subject: [dpdk-dev] Sharing Common libs between PMDs
> 
> Hi,
> 
> We have several PMDs in DPDK that are using the same underlying common libraries.
> In addition, we have plans to add some new common service into DPDK that already introduces too much complexity with the way that the code is written now.
> Therefore, we would like to move all our common functions calls into one shared/common folder in DPDK and we need to find proper place for this purpose.
> 
> Can you suggest on such a place?

There was an attempt to create "driver/common" but latter the common code
for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
something called "driver/soc", I think, "driver/soc" may be more appropriate.

Currently DPDK's driver build dependency is in the following order
(bus, mempool, net, crypto, event).
Other than driver/common or driver/soc, one option could be to
- Move the common code to bus or mempool
and
- Across the drivers, include the header files through CFLAGS if the common code
  is in header file
http://dpdk.org/browse/dpdk/tree/drivers/event/octeontx/Makefile#n13

> 
> Regards,
> Liron
> 
> 
> 

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 14:55 ` Jerin Jacob
@ 2018-03-14 15:04   ` Bruce Richardson
  2018-03-14 16:11     ` Trahe, Fiona
  0 siblings, 1 reply; 8+ messages in thread
From: Bruce Richardson @ 2018-03-14 15:04 UTC (permalink / raw)
  To: Jerin Jacob; +Cc: Liron Himi, dev

On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> -----Original Message-----
> > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > From: Liron Himi <lironh@marvell.com>
> > To: "dev@dpdk.org" <dev@dpdk.org>
> > CC: Liron Himi <lironh@marvell.com>
> > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > 
> > Hi,
> > 
> > We have several PMDs in DPDK that are using the same underlying common libraries.
> > In addition, we have plans to add some new common service into DPDK that already introduces too much complexity with the way that the code is written now.
> > Therefore, we would like to move all our common functions calls into one shared/common folder in DPDK and we need to find proper place for this purpose.
> > 
> > Can you suggest on such a place?
> 
> There was an attempt to create "driver/common" but latter the common code
> for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
> something called "driver/soc", I think, "driver/soc" may be more appropriate.
> 
> Currently DPDK's driver build dependency is in the following order
> (bus, mempool, net, crypto, event).
> Other than driver/common or driver/soc, one option could be to
> - Move the common code to bus or mempool
> and
> - Across the drivers, include the header files through CFLAGS if the common code
>   is in header file
> http://dpdk.org/browse/dpdk/tree/drivers/event/octeontx/Makefile#n13
> 
Given that this seems to be a recurring problem, I think having a
drivers/common folder may not be a bad thing.

/Bruce

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 15:04   ` Bruce Richardson
@ 2018-03-14 16:11     ` Trahe, Fiona
  2018-03-14 17:38       ` Shreyansh Jain
  0 siblings, 1 reply; 8+ messages in thread
From: Trahe, Fiona @ 2018-03-14 16:11 UTC (permalink / raw)
  To: Richardson, Bruce, Jerin Jacob
  Cc: Liron Himi, dev, Trahe, Fiona, Jozwiak, TomaszX



> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Wednesday, March 14, 2018 3:05 PM
> To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> 
> On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > -----Original Message-----
> > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > From: Liron Himi <lironh@marvell.com>
> > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > CC: Liron Himi <lironh@marvell.com>
> > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > >
> > > Hi,
> > >
> > > We have several PMDs in DPDK that are using the same underlying common libraries.
> > > In addition, we have plans to add some new common service into DPDK that already introduces too
> much complexity with the way that the code is written now.
> > > Therefore, we would like to move all our common functions calls into one shared/common folder in
> DPDK and we need to find proper place for this purpose.
> > >
> > > Can you suggest on such a place?
> >
> > There was an attempt to create "driver/common" but latter the common code
> > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
> > something called "driver/soc", I think, "driver/soc" may be more appropriate.
> >
> > Currently DPDK's driver build dependency is in the following order
> > (bus, mempool, net, crypto, event).
> > Other than driver/common or driver/soc, one option could be to
> > - Move the common code to bus or mempool
> > and
> > - Across the drivers, include the header files through CFLAGS if the common code
> >   is in header file
> > http://dpdk.org/browse/dpdk/tree/drivers/event/octeontx/Makefile#n13
> >
> Given that this seems to be a recurring problem, I think having a
> drivers/common folder may not be a bad thing.
> 
> /Bruce
We've been grappling with the same problem for QAT driver.
A variant we were about to propose was to rename drivers/bus to drivers/lib.
And possibly move drivers/mempool to drivers/lib
As the rest of the drivers/xxx are actually PMDs, while mempool and bus are libs
on which other drivers depend.
I'm ok with adding a drivers/common instead, but the above seems cleaner.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 16:11     ` Trahe, Fiona
@ 2018-03-14 17:38       ` Shreyansh Jain
  2018-03-14 17:50         ` Jerin Jacob
  0 siblings, 1 reply; 8+ messages in thread
From: Shreyansh Jain @ 2018-03-14 17:38 UTC (permalink / raw)
  To: Trahe, Fiona, Richardson, Bruce, Jerin Jacob
  Cc: Liron Himi, dev, Jozwiak,  TomaszX

> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Trahe, Fiona
> Sent: Wednesday, March 14, 2018 9:41 PM
> To: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob
> <jerin.jacob@caviumnetworks.com>
> Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org; Trahe, Fiona
> <fiona.trahe@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> 
> 
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> > Sent: Wednesday, March 14, 2018 3:05 PM
> > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> >
> > On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > > -----Original Message-----
> > > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > > From: Liron Himi <lironh@marvell.com>
> > > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > > CC: Liron Himi <lironh@marvell.com>
> > > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > > >
> > > > Hi,
> > > >
> > > > We have several PMDs in DPDK that are using the same underlying
> common libraries.
> > > > In addition, we have plans to add some new common service into
> DPDK that already introduces too
> > much complexity with the way that the code is written now.
> > > > Therefore, we would like to move all our common functions calls
> into one shared/common folder in
> > DPDK and we need to find proper place for this purpose.
> > > >
> > > > Can you suggest on such a place?
> > >
> > > There was an attempt to create "driver/common" but latter the
> common code
> > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
> > > something called "driver/soc", I think, "driver/soc" may be more
> appropriate.
> > >
> > > Currently DPDK's driver build dependency is in the following order
> > > (bus, mempool, net, crypto, event).
> > > Other than driver/common or driver/soc, one option could be to
> > > - Move the common code to bus or mempool
> > > and
> > > - Across the drivers, include the header files through CFLAGS if
> the common code
> > >   is in header file
> > >
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.
> org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile%23n1
> 3&data=02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008d589c
> 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636566406955506340&s
> data=MkxFJUuHPuBFIqAgjmUzUcgRms9WTsxkkMQah4kGAlM%3D&reserved=0
> > >
> > Given that this seems to be a recurring problem, I think having a
> > drivers/common folder may not be a bad thing.
> >
> > /Bruce
> We've been grappling with the same problem for QAT driver.
> A variant we were about to propose was to rename drivers/bus to
> drivers/lib.
> And possibly move drivers/mempool to drivers/lib
> As the rest of the drivers/xxx are actually PMDs, while mempool and bus
> are libs
> on which other drivers depend.
> I'm ok with adding a drivers/common instead, but the above seems
> cleaner.

In my opinion, I think we should add a common/ without modifying the bus/mempool structure. I agree that bus/mempool are not standalone PMDs themselves, but they are not libraries either in true sense - they /plug/ into the eal framework and *may* provide service to drivers. 

As for common/ - that gets a +1 from me.

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 17:38       ` Shreyansh Jain
@ 2018-03-14 17:50         ` Jerin Jacob
  2018-03-14 18:13           ` Trahe, Fiona
  0 siblings, 1 reply; 8+ messages in thread
From: Jerin Jacob @ 2018-03-14 17:50 UTC (permalink / raw)
  To: Shreyansh Jain
  Cc: Trahe, Fiona, Richardson, Bruce, Liron Himi, dev, Jozwiak, TomaszX

-----Original Message-----
> Date: Wed, 14 Mar 2018 17:38:14 +0000
> From: Shreyansh Jain <shreyansh.jain@nxp.com>
> To: "Trahe, Fiona" <fiona.trahe@intel.com>, "Richardson, Bruce"
>  <bruce.richardson@intel.com>, Jerin Jacob <jerin.jacob@caviumnetworks.com>
> CC: Liron Himi <lironh@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
>  "Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>
> Subject: RE: [dpdk-dev] Sharing Common libs between PMDs
> 
> > -----Original Message-----
> > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Trahe, Fiona
> > Sent: Wednesday, March 14, 2018 9:41 PM
> > To: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob
> > <jerin.jacob@caviumnetworks.com>
> > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org; Trahe, Fiona
> > <fiona.trahe@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > 
> > 
> > 
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> > > Sent: Wednesday, March 14, 2018 3:05 PM
> > > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > >
> > > On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > > > -----Original Message-----
> > > > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > > > From: Liron Himi <lironh@marvell.com>
> > > > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > > > CC: Liron Himi <lironh@marvell.com>
> > > > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > > > >
> > > > > Hi,
> > > > >
> > > > > We have several PMDs in DPDK that are using the same underlying
> > common libraries.
> > > > > In addition, we have plans to add some new common service into
> > DPDK that already introduces too
> > > much complexity with the way that the code is written now.
> > > > > Therefore, we would like to move all our common functions calls
> > into one shared/common folder in
> > > DPDK and we need to find proper place for this purpose.
> > > > >
> > > > > Can you suggest on such a place?
> > > >
> > > > There was an attempt to create "driver/common" but latter the
> > common code
> > > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
> > > > something called "driver/soc", I think, "driver/soc" may be more
> > appropriate.
> > > >
> > > > Currently DPDK's driver build dependency is in the following order
> > > > (bus, mempool, net, crypto, event).
> > > > Other than driver/common or driver/soc, one option could be to
> > > > - Move the common code to bus or mempool
> > > > and
> > > > - Across the drivers, include the header files through CFLAGS if
> > the common code
> > > >   is in header file
> > > >
> > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.
> > org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile%23n1
> > 3&data=02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008d589c
> > 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636566406955506340&s
> > data=MkxFJUuHPuBFIqAgjmUzUcgRms9WTsxkkMQah4kGAlM%3D&reserved=0
> > > >
> > > Given that this seems to be a recurring problem, I think having a
> > > drivers/common folder may not be a bad thing.
> > >
> > > /Bruce
> > We've been grappling with the same problem for QAT driver.
> > A variant we were about to propose was to rename drivers/bus to
> > drivers/lib.
> > And possibly move drivers/mempool to drivers/lib
> > As the rest of the drivers/xxx are actually PMDs, while mempool and bus
> > are libs
> > on which other drivers depend.
> > I'm ok with adding a drivers/common instead, but the above seems
> > cleaner.
> 
> In my opinion, I think we should add a common/ without modifying the bus/mempool structure. I agree that bus/mempool are not standalone PMDs themselves, but they are not libraries either in true sense - they /plug/ into the eal framework and *may* provide service to drivers. 
> 
> As for common/ - that gets a +1 from me.

+1 for drivers/common

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 17:50         ` Jerin Jacob
@ 2018-03-14 18:13           ` Trahe, Fiona
  2018-03-15  6:58             ` Hemant Agrawal
  0 siblings, 1 reply; 8+ messages in thread
From: Trahe, Fiona @ 2018-03-14 18:13 UTC (permalink / raw)
  To: Jerin Jacob, Shreyansh Jain
  Cc: Richardson, Bruce, Liron Himi, dev, Jozwiak, TomaszX



> -----Original Message-----
> From: Jerin Jacob [mailto:jerin.jacob@caviumnetworks.com]
> Sent: Wednesday, March 14, 2018 5:50 PM
> To: Shreyansh Jain <shreyansh.jain@nxp.com>
> Cc: Trahe, Fiona <fiona.trahe@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>; Liron Himi
> <lironh@marvell.com>; dev@dpdk.org; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> 
> -----Original Message-----
> > Date: Wed, 14 Mar 2018 17:38:14 +0000
> > From: Shreyansh Jain <shreyansh.jain@nxp.com>
> > To: "Trahe, Fiona" <fiona.trahe@intel.com>, "Richardson, Bruce"
> >  <bruce.richardson@intel.com>, Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > CC: Liron Himi <lironh@marvell.com>, "dev@dpdk.org" <dev@dpdk.org>,
> >  "Jozwiak, TomaszX" <tomaszx.jozwiak@intel.com>
> > Subject: RE: [dpdk-dev] Sharing Common libs between PMDs
> >
> > > -----Original Message-----
> > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Trahe, Fiona
> > > Sent: Wednesday, March 14, 2018 9:41 PM
> > > To: Richardson, Bruce <bruce.richardson@intel.com>; Jerin Jacob
> > > <jerin.jacob@caviumnetworks.com>
> > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org; Trahe, Fiona
> > > <fiona.trahe@intel.com>; Jozwiak, TomaszX <tomaszx.jozwiak@intel.com>
> > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > >
> > >
> > >
> > > > -----Original Message-----
> > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> > > > Sent: Wednesday, March 14, 2018 3:05 PM
> > > > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> > > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > > >
> > > > On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > > > > -----Original Message-----
> > > > > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > > > > From: Liron Himi <lironh@marvell.com>
> > > > > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > > > > CC: Liron Himi <lironh@marvell.com>
> > > > > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > We have several PMDs in DPDK that are using the same underlying
> > > common libraries.
> > > > > > In addition, we have plans to add some new common service into
> > > DPDK that already introduces too
> > > > much complexity with the way that the code is written now.
> > > > > > Therefore, we would like to move all our common functions calls
> > > into one shared/common folder in
> > > > DPDK and we need to find proper place for this purpose.
> > > > > >
> > > > > > Can you suggest on such a place?
> > > > >
> > > > > There was an attempt to create "driver/common" but latter the
> > > common code
> > > > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel has
> > > > > something called "driver/soc", I think, "driver/soc" may be more
> > > appropriate.
> > > > >
> > > > > Currently DPDK's driver build dependency is in the following order
> > > > > (bus, mempool, net, crypto, event).
> > > > > Other than driver/common or driver/soc, one option could be to
> > > > > - Move the common code to bus or mempool
> > > > > and
> > > > > - Across the drivers, include the header files through CFLAGS if
> > > the common code
> > > > >   is in header file
> > > > >
> > > https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.
> > > org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile%23n1
> > > 3&data=02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008d589c
> > > 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C636566406955506340&s
> > > data=MkxFJUuHPuBFIqAgjmUzUcgRms9WTsxkkMQah4kGAlM%3D&reserved=0
> > > > >
> > > > Given that this seems to be a recurring problem, I think having a
> > > > drivers/common folder may not be a bad thing.
> > > >
> > > > /Bruce
> > > We've been grappling with the same problem for QAT driver.
> > > A variant we were about to propose was to rename drivers/bus to
> > > drivers/lib.
> > > And possibly move drivers/mempool to drivers/lib
> > > As the rest of the drivers/xxx are actually PMDs, while mempool and bus
> > > are libs
> > > on which other drivers depend.
> > > I'm ok with adding a drivers/common instead, but the above seems
> > > cleaner.
> >
> > In my opinion, I think we should add a common/ without modifying the bus/mempool structure. I agree
> that bus/mempool are not standalone PMDs themselves, but they are not libraries either in true sense -
> they /plug/ into the eal framework and *may* provide service to drivers.
> >
> > As for common/ - that gets a +1 from me.
> 
> +1 for drivers/common
Ok. 
+1 for drivers/common

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [dpdk-dev] Sharing Common libs between PMDs
  2018-03-14 18:13           ` Trahe, Fiona
@ 2018-03-15  6:58             ` Hemant Agrawal
  0 siblings, 0 replies; 8+ messages in thread
From: Hemant Agrawal @ 2018-03-15  6:58 UTC (permalink / raw)
  To: Trahe, Fiona, Jerin Jacob, Shreyansh Jain
  Cc: Richardson, Bruce, Liron Himi, dev, Jozwiak, TomaszX


> > > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > > > > -----Original Message-----
> > > > > From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce
> > > > > Richardson
> > > > > Sent: Wednesday, March 14, 2018 3:05 PM
> > > > > To: Jerin Jacob <jerin.jacob@caviumnetworks.com>
> > > > > Cc: Liron Himi <lironh@marvell.com>; dev@dpdk.org
> > > > > Subject: Re: [dpdk-dev] Sharing Common libs between PMDs
> > > > >
> > > > > On Wed, Mar 14, 2018 at 08:25:45PM +0530, Jerin Jacob wrote:
> > > > > > -----Original Message-----
> > > > > > > Date: Wed, 14 Mar 2018 09:34:40 +0000
> > > > > > > From: Liron Himi <lironh@marvell.com>
> > > > > > > To: "dev@dpdk.org" <dev@dpdk.org>
> > > > > > > CC: Liron Himi <lironh@marvell.com>
> > > > > > > Subject: [dpdk-dev] Sharing Common libs between PMDs
> > > > > > >
> > > > > > > Hi,
> > > > > > >
> > > > > > > We have several PMDs in DPDK that are using the same
> > > > > > > underlying
> > > > common libraries.
> > > > > > > In addition, we have plans to add some new common service
> > > > > > > into
> > > > DPDK that already introduces too
> > > > > much complexity with the way that the code is written now.
> > > > > > > Therefore, we would like to move all our common functions
> > > > > > > calls
> > > > into one shared/common folder in
> > > > > DPDK and we need to find proper place for this purpose.
> > > > > > >
> > > > > > > Can you suggest on such a place?
> > > > > >
> > > > > > There was an attempt to create "driver/common" but latter the
> > > > common code
> > > > > > for NXP HW device got moved to drivers/bus/dpaa/. Linux kernel
> > > > > > has something called "driver/soc", I think, "driver/soc" may
> > > > > > be more
> > > > appropriate.
> > > > > >
> > > > > > Currently DPDK's driver build dependency is in the following
> > > > > > order (bus, mempool, net, crypto, event).
> > > > > > Other than driver/common or driver/soc, one option could be to
> > > > > > - Move the common code to bus or mempool and
> > > > > > - Across the drivers, include the header files through CFLAGS
> > > > > > if
> > > > the common code
> > > > > >   is in header file
> > > > > >
> > > >
> https://emea01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fdpdk.
> > > >
> org%2Fbrowse%2Fdpdk%2Ftree%2Fdrivers%2Fevent%2Focteontx%2FMakefile
> > > > %23n1
> > > >
> 3&data=02%7C01%7Cshreyansh.jain%40nxp.com%7Cfa7ba7a1dfd94b9336c008
> > > > d589c
> > > >
> 63dd7%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C6365664069555
> 06
> > > > 340&s
> > > >
> data=MkxFJUuHPuBFIqAgjmUzUcgRms9WTsxkkMQah4kGAlM%3D&reserved=0
> > > > > >
> > > > > Given that this seems to be a recurring problem, I think having
> > > > > a drivers/common folder may not be a bad thing.
> > > > >
> > > > > /Bruce
> > > > We've been grappling with the same problem for QAT driver.
> > > > A variant we were about to propose was to rename drivers/bus to
> > > > drivers/lib.
> > > > And possibly move drivers/mempool to drivers/lib As the rest of
> > > > the drivers/xxx are actually PMDs, while mempool and bus are libs
> > > > on which other drivers depend.
> > > > I'm ok with adding a drivers/common instead, but the above seems
> > > > cleaner.
> > >
> > > In my opinion, I think we should add a common/ without modifying the
> > > bus/mempool structure. I agree
> > that bus/mempool are not standalone PMDs themselves, but they are not
> > libraries either in true sense - they /plug/ into the eal framework and *may*
> provide service to drivers.
> > >
> > > As for common/ - that gets a +1 from me.
> >
> > +1 for drivers/common
> Ok.
> +1 for drivers/common

+1 for drivers/common

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2018-03-15  6:58 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-14  9:34 [dpdk-dev] Sharing Common libs between PMDs Liron Himi
2018-03-14 14:55 ` Jerin Jacob
2018-03-14 15:04   ` Bruce Richardson
2018-03-14 16:11     ` Trahe, Fiona
2018-03-14 17:38       ` Shreyansh Jain
2018-03-14 17:50         ` Jerin Jacob
2018-03-14 18:13           ` Trahe, Fiona
2018-03-15  6:58             ` Hemant Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).