All of lore.kernel.org
 help / color / mirror / Atom feed
* Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
@ 2014-01-14  7:02 Daniel Kan
       [not found] ` <8A452F53-AD44-4C3C-8AB0-AD3342206D46-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Daniel Kan @ 2014-01-14  7:02 UTC (permalink / raw)
  To: dev-VfR2kkLFssw

I already have existing makefiles for my current application. I would like to integrate dpdk into the application.  ’m wondering if there is any benefit to use dpdk’s makefiles instead of using your own makefile and linking against the library (e.g. libintel_dpdk.a). Thanks.

Dan

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found] ` <8A452F53-AD44-4C3C-8AB0-AD3342206D46-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
@ 2014-01-14 11:38   ` Thomas Monjalon
       [not found]     ` <201401141238.30056.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-01-14 11:38 UTC (permalink / raw)
  To: Daniel Kan; +Cc: dev-VfR2kkLFssw

Hello,

14/01/2014 08:02, Daniel Kan:
> I already have existing makefiles for my current application. I would like
> to integrate dpdk into the application.  ’m wondering if there is any
> benefit to use dpdk’s makefiles instead of using your own makefile and
> linking against the library (e.g. libintel_dpdk.a). Thanks.

DPDK makefiles have 2 benefits:
- provide a framework
- automatically set CFLAGS and LDFLAGS according to your configuration

If you don't need a framework, I think it's better to extract compilation 
flags with something like pkg-config.
	http://freedesktop.org/wiki/Software/pkg-config
A patch for a such feature would be welcome :)

-- 
Thomas

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found]     ` <201401141238.30056.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-01-14 13:22       ` Venkatesan, Venky
       [not found]         ` <1FD9B82B8BF2CF418D9A1000154491D973FC5A42-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Venkatesan, Venky @ 2014-01-14 13:22 UTC (permalink / raw)
  To: Thomas Monjalon, Daniel Kan; +Cc: dev-VfR2kkLFssw

Dan, 

One other thing to think about - as we add more functionality into DPDK (e.g. new libraries for other packet functions), we integrate them into the DPDK framework. If you extract compilation flags and setup your own makefile, you would have to do this re-integration every time you want to pick up a new release. The same applies to newer files added etc. etc. That is the downside. 

Regards, 
-Venky

-----Original Message-----
From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Thomas Monjalon
Sent: Tuesday, January 14, 2014 3:38 AM
To: Daniel Kan
Cc: dev@dpdk.org
Subject: Re: [dpdk-dev] Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library

Hello,

14/01/2014 08:02, Daniel Kan:
> I already have existing makefiles for my current application. I would 
> like to integrate dpdk into the application.  ’m wondering if there is 
> any benefit to use dpdk’s makefiles instead of using your own makefile 
> and linking against the library (e.g. libintel_dpdk.a). Thanks.

DPDK makefiles have 2 benefits:
- provide a framework
- automatically set CFLAGS and LDFLAGS according to your configuration

If you don't need a framework, I think it's better to extract compilation flags with something like pkg-config.
	http://freedesktop.org/wiki/Software/pkg-config
A patch for a such feature would be welcome :)

--
Thomas

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found]         ` <1FD9B82B8BF2CF418D9A1000154491D973FC5A42-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
@ 2014-01-14 13:55           ` Thomas Monjalon
       [not found]             ` <201401141455.57994.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2014-01-14 13:55 UTC (permalink / raw)
  To: Venkatesan, Venky; +Cc: dev-VfR2kkLFssw

Hello Venky,

14/01/2014 14:22, Venkatesan, Venky:
> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Thomas Monjalon
> > 14/01/2014 08:02, Daniel Kan:
> > > I already have existing makefiles for my current application. I would
> > > like to integrate dpdk into the application.  ’m wondering if there is
> > > any benefit to use dpdk’s makefiles instead of using your own makefile
> > > and linking against the library (e.g. libintel_dpdk.a). Thanks.
> > 
> > DPDK makefiles have 2 benefits:
> > - provide a framework
> > - automatically set CFLAGS and LDFLAGS according to your configuration
> > 
> > If you don't need a framework, I think it's better to extract compilation
> > flags with something like pkg-config.
> > http://freedesktop.org/wiki/Software/pkg-config
> > A patch for a such feature would be welcome :)
>
> One other thing to think about - as we add more functionality into DPDK
> (e.g. new libraries for other packet functions), we integrate them into
> the DPDK framework. If you extract compilation flags and setup your own
> makefile, you would have to do this re-integration every time you want to
> pick up a new release. The same applies to newer files added etc. etc.
> That is the downside.

I disagree.
If the Makefile of the application, use a DPDK script or pkg-config to read 
the flags from a generated file, the integration is done only once.
This guide explains the logic and how to implement it:
	http://people.freedesktop.org/~dbn/pkg-config-guide.html

-- 
Thomas

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found]             ` <201401141455.57994.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
@ 2014-01-14 15:06               ` Hamid Ramazani
  2014-01-14 20:40               ` Daniel Kan
  1 sibling, 0 replies; 7+ messages in thread
From: Hamid Ramazani @ 2014-01-14 15:06 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev-VfR2kkLFssw

Hi,

Considering the fact that there are many developers using c++, I
totally persuade/agree with the addition of c++ functionality, and
thanks to Thomas's guidelines it won't create any overhead in usage.

All the Best,
--Hamid

On 1/14/14, Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> wrote:
> Hello Venky,
>
> 14/01/2014 14:22, Venkatesan, Venky:
>> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Thomas Monjalon
>> > 14/01/2014 08:02, Daniel Kan:
>> > > I already have existing makefiles for my current application. I would
>> > > like to integrate dpdk into the application.  ’m wondering if there
>> > > is
>> > > any benefit to use dpdk’s makefiles instead of using your own
>> > > makefile
>> > > and linking against the library (e.g. libintel_dpdk.a). Thanks.
>> >
>> > DPDK makefiles have 2 benefits:
>> > - provide a framework
>> > - automatically set CFLAGS and LDFLAGS according to your configuration
>> >
>> > If you don't need a framework, I think it's better to extract
>> > compilation
>> > flags with something like pkg-config.
>> > http://freedesktop.org/wiki/Software/pkg-config
>> > A patch for a such feature would be welcome :)
>>
>> One other thing to think about - as we add more functionality into DPDK
>> (e.g. new libraries for other packet functions), we integrate them into
>> the DPDK framework. If you extract compilation flags and setup your own
>> makefile, you would have to do this re-integration every time you want to
>> pick up a new release. The same applies to newer files added etc. etc.
>> That is the downside.
>
> I disagree.
> If the Makefile of the application, use a DPDK script or pkg-config to read
>
> the flags from a generated file, the integration is done only once.
> This guide explains the logic and how to implement it:
> 	http://people.freedesktop.org/~dbn/pkg-config-guide.html
>
> --
> Thomas
>

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found]             ` <201401141455.57994.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
  2014-01-14 15:06               ` Hamid Ramazani
@ 2014-01-14 20:40               ` Daniel Kan
       [not found]                 ` <BF63A365-B8BD-49CD-9DCE-09D7A47DED02-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
  1 sibling, 1 reply; 7+ messages in thread
From: Daniel Kan @ 2014-01-14 20:40 UTC (permalink / raw)
  To: Thomas Monjalon; +Cc: dev-VfR2kkLFssw

I think in general, developers are pretty particular about their makefiles and build framework. This is especially true if you have an existing application; migrating it to use dpdk’s build framework is rather cumbersome and likely a non-starter for bigger complex projects. Hence, separating application build from dpdk build will be very useful in many situations. The main trick is to extract the appropriate compilation flags that can be readily consumed by the application build system. As an application developer, nothing is simper than just having some header files, a library file, and some necessary compilation flags. If tools like pkg-config or others can facilitate that process, then we could consider it. But even a simple script that can be give me flags that I can provide to my own build system would already suffice. 

On a similar note, is there any particular reason why many macros such as RTE_MACHINE_XXX are passed as flags to the compiler instead of being defined in rte_config.h? 

Thanks
Dan

On Jan 14, 2014, at 5:55 AM, Thomas Monjalon <thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org> wrote:

> Hello Venky,
> 
> 14/01/2014 14:22, Venkatesan, Venky:
>> From: dev [mailto:dev-bounces-VfR2kkLFssw@public.gmane.org] On Behalf Of Thomas Monjalon
>>> 14/01/2014 08:02, Daniel Kan:
>>>> I already have existing makefiles for my current application. I would
>>>> like to integrate dpdk into the application.  ’m wondering if there is
>>>> any benefit to use dpdk’s makefiles instead of using your own makefile
>>>> and linking against the library (e.g. libintel_dpdk.a). Thanks.
>>> 
>>> DPDK makefiles have 2 benefits:
>>> - provide a framework
>>> - automatically set CFLAGS and LDFLAGS according to your configuration
>>> 
>>> If you don't need a framework, I think it's better to extract compilation
>>> flags with something like pkg-config.
>>> http://freedesktop.org/wiki/Software/pkg-config
>>> A patch for a such feature would be welcome :)
>> 
>> One other thing to think about - as we add more functionality into DPDK
>> (e.g. new libraries for other packet functions), we integrate them into
>> the DPDK framework. If you extract compilation flags and setup your own
>> makefile, you would have to do this re-integration every time you want to
>> pick up a new release. The same applies to newer files added etc. etc.
>> That is the downside.
> 
> I disagree.
> If the Makefile of the application, use a DPDK script or pkg-config to read 
> the flags from a generated file, the integration is done only once.
> This guide explains the logic and how to implement it:
> 	http://people.freedesktop.org/~dbn/pkg-config-guide.html
> 
> -- 
> Thomas

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

* Re: Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library
       [not found]                 ` <BF63A365-B8BD-49CD-9DCE-09D7A47DED02-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
@ 2014-01-16 14:02                   ` Olivier MATZ
  0 siblings, 0 replies; 7+ messages in thread
From: Olivier MATZ @ 2014-01-16 14:02 UTC (permalink / raw)
  To: Daniel Kan; +Cc: dev-VfR2kkLFssw

Hi Dan,

On 01/14/2014 09:40 PM, Daniel Kan wrote:
> On a similar note, is there any particular reason why many macros such
> as RTE_MACHINE_XXX are passed as flags to the compiler instead of
> being defined in rte_config.h?

I guess it's because in case of local compilation (called "native"),
these flags can be generated dynamically in mk/rte.toolchain-compat.mk
from gcc or icc compiler version and from the CPUFLAGS variable
(see machine/native/rte.vars.mk).

You can also check this older thread:
http://dpdk.org/ml/archives/dev/2014-January/001053.html

Regards,
Olivier

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

end of thread, other threads:[~2014-01-16 14:02 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-14  7:02 Any benefit of using DPDK's makefiles instead of using your own and linking against DPDK library Daniel Kan
     [not found] ` <8A452F53-AD44-4C3C-8AB0-AD3342206D46-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
2014-01-14 11:38   ` Thomas Monjalon
     [not found]     ` <201401141238.30056.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-01-14 13:22       ` Venkatesan, Venky
     [not found]         ` <1FD9B82B8BF2CF418D9A1000154491D973FC5A42-P5GAC/sN6hlcIJlls4ac1rfspsVTdybXVpNB7YpNyf8@public.gmane.org>
2014-01-14 13:55           ` Thomas Monjalon
     [not found]             ` <201401141455.57994.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org>
2014-01-14 15:06               ` Hamid Ramazani
2014-01-14 20:40               ` Daniel Kan
     [not found]                 ` <BF63A365-B8BD-49CD-9DCE-09D7A47DED02-nm7580oGLDTQT0dZR+AlfA@public.gmane.org>
2014-01-16 14:02                   ` Olivier MATZ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.