DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
@ 2020-02-17 10:01 Victor Huertas
  2020-02-17 12:33 ` Neil Horman
  2020-02-17 14:39 ` [dpdk-dev] " Bruce Richardson
  0 siblings, 2 replies; 8+ messages in thread
From: Victor Huertas @ 2020-02-17 10:01 UTC (permalink / raw)
  To: dev

Hi all,

I am using DPDK development environment to develop an application from
which I have to access C++ code.
I managed to modify some internal mk files in the dpdk-stable repository to
allow g++ compiler to be supported.

I have all the modified files well identified and I wonder if the support
team is interested to add this toolchain in future DPDK releases.

Regards

-- 
Victor

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

* Re: [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
  2020-02-17 10:01 [dpdk-dev] Proposal to add a new toolchain for dpdk: g++ Victor Huertas
@ 2020-02-17 12:33 ` Neil Horman
       [not found]   ` <CAGxG5cj1jf_JQ5df3bYOw7uObBQWb7CdwbJpR9fo8VtcreYwYA@mail.gmail.com>
  2020-02-17 14:39 ` [dpdk-dev] " Bruce Richardson
  1 sibling, 1 reply; 8+ messages in thread
From: Neil Horman @ 2020-02-17 12:33 UTC (permalink / raw)
  To: Victor Huertas; +Cc: dev

On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> Hi all,
> 
> I am using DPDK development environment to develop an application from
> which I have to access C++ code.
> I managed to modify some internal mk files in the dpdk-stable repository to
> allow g++ compiler to be supported.
> 
> I have all the modified files well identified and I wonder if the support
> team is interested to add this toolchain in future DPDK releases.
> 
> Regards
> 
> -- 
> Victor
> 
Ostensibly, if you have g++, you have gcc, and theres not much more that needs
to be done here.  You should just be able to wrap all your application includes
in an extern C {} construct, and that should be it.

Neil


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

* Re: [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
  2020-02-17 10:01 [dpdk-dev] Proposal to add a new toolchain for dpdk: g++ Victor Huertas
  2020-02-17 12:33 ` Neil Horman
@ 2020-02-17 14:39 ` Bruce Richardson
       [not found]   ` <CAGxG5cjzFb9qJRAAghCrxncdadD4_b4xBxVEYJ=R=x9t0kLfvQ@mail.gmail.com>
  2020-02-18 13:12   ` [dpdk-dev] " Neil Horman
  1 sibling, 2 replies; 8+ messages in thread
From: Bruce Richardson @ 2020-02-17 14:39 UTC (permalink / raw)
  To: Victor Huertas; +Cc: dev

On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> Hi all,
> 
> I am using DPDK development environment to develop an application from
> which I have to access C++ code.
> I managed to modify some internal mk files in the dpdk-stable repository to
> allow g++ compiler to be supported.
> 
> I have all the modified files well identified and I wonder if the support
> team is interested to add this toolchain in future DPDK releases.
> 
Rather than trying to build DPDK with g++, or to use the DPDK makefiles
with your C++ application, can I recommend instead that you treat DPDK as
any third-party library and build it independently of your application.

If you compile and install DPDK using meson and ninja - or install the
DPDK package from your linux distro - you will have a 'libdpdk.pc' file
installed for use by pkg-config. Then for building your application, put in
the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
'pkg-config --libs libdpdk', into your app makefile and work from there.

Note too, that all DPDK header files should already be safe for inclusion
in C++ code - if not, please log a bug.

Regards,
/Bruce

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

* [dpdk-dev] Fwd:  Proposal to add a new toolchain for dpdk: g++
       [not found]   ` <CAGxG5cjzFb9qJRAAghCrxncdadD4_b4xBxVEYJ=R=x9t0kLfvQ@mail.gmail.com>
@ 2020-02-17 16:10     ` Victor Huertas
  0 siblings, 0 replies; 8+ messages in thread
From: Victor Huertas @ 2020-02-17 16:10 UTC (permalink / raw)
  To: dev

Thanks Bruce for your answer,
I will try it and let you know. Although I guess that it makes no
difference if, instead of an exe file, I am compiling a static library
(libmylibrary.a), right?

BTW, I would like to insist on the second issue I was referring to in my
first reply about ip pipeline example using software rings and the latency
detected (which may reach 3-4ms per pipeline transition as long as the two
connected pipelines are configured tu run in the same logical core and the
respective f_run functions are placed in the same thread consecutively).
The thing is that I may have in my application up to 5 o 6 pipelines
interconnected and the accumulated delay detected a ping crossing all these
pipelines becomes 55 ms RTT!!. The latency problem desapeers if I assign a
different logical core to every pipeline.

Thanks a lot for your quick response. It is really appreciated.

Regards,

El lun., 17 feb. 2020 a las 15:40, Bruce Richardson (<
bruce.richardson@intel.com>) escribió:

> On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > Hi all,
> >
> > I am using DPDK development environment to develop an application from
> > which I have to access C++ code.
> > I managed to modify some internal mk files in the dpdk-stable repository
> to
> > allow g++ compiler to be supported.
> >
> > I have all the modified files well identified and I wonder if the support
> > team is interested to add this toolchain in future DPDK releases.
> >
> Rather than trying to build DPDK with g++, or to use the DPDK makefiles
> with your C++ application, can I recommend instead that you treat DPDK as
> any third-party library and build it independently of your application.
>
> If you compile and install DPDK using meson and ninja - or install the
> DPDK package from your linux distro - you will have a 'libdpdk.pc' file
> installed for use by pkg-config. Then for building your application, put in
> the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
> 'pkg-config --libs libdpdk', into your app makefile and work from there.
>
> Note too, that all DPDK header files should already be safe for inclusion
> in C++ code - if not, please log a bug.
>
> Regards,
> /Bruce
>


-- 
Victor


-- 
Victor

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

* [dpdk-dev] Fwd:  Proposal to add a new toolchain for dpdk: g++
       [not found]   ` <CAGxG5cj1jf_JQ5df3bYOw7uObBQWb7CdwbJpR9fo8VtcreYwYA@mail.gmail.com>
@ 2020-02-17 16:10     ` Victor Huertas
  0 siblings, 0 replies; 8+ messages in thread
From: Victor Huertas @ 2020-02-17 16:10 UTC (permalink / raw)
  To: dev

Hi Neil,

Well, the thing is that I wanted to keep on using g++ as compiling tool
(and reduce impact on my original develoment environment). My source code
is composed by *.cpp extension files I decided to modify the dpdk makefiles
to accept such extension as well as disable some -W flags that are not used
by g++.

As I have already done the work I just wanted to let you know if DPDK
people was open to introduce this slight modifications and add the
possibility to use g++ instead of icc (Intel's compiler).

By the way, I had published another issue (on dpdk-users) in which I was
wondering on a strange problem I have seen in the "ip pipeline" DPDK
example, related to a high latency problem when using software rings
between two pipelines running in the same core id. However I have received
no answer and this issue is something that worries me a lot as this
behavior is not acceptable at all in my application (which is based on this
ip pipieline example). Would you mind if I rewrite it in this dpdk-dev
thread to see if we can shed a light on this?

Regards and thanks for your quick answer,

El lun., 17 feb. 2020 a las 13:33, Neil Horman (<nhorman@tuxdriver.com>)
escribió:

> On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > Hi all,
> >
> > I am using DPDK development environment to develop an application from
> > which I have to access C++ code.
> > I managed to modify some internal mk files in the dpdk-stable repository
> to
> > allow g++ compiler to be supported.
> >
> > I have all the modified files well identified and I wonder if the support
> > team is interested to add this toolchain in future DPDK releases.
> >
> > Regards
> >
> > --
> > Victor
> >
> Ostensibly, if you have g++, you have gcc, and theres not much more that
> needs
> to be done here.  You should just be able to wrap all your application
> includes
> in an extern C {} construct, and that should be it.
>
> Neil
>
>

-- 
Victor


-- 
Victor

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

* Re: [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
  2020-02-17 14:39 ` [dpdk-dev] " Bruce Richardson
       [not found]   ` <CAGxG5cjzFb9qJRAAghCrxncdadD4_b4xBxVEYJ=R=x9t0kLfvQ@mail.gmail.com>
@ 2020-02-18 13:12   ` Neil Horman
  2020-02-18 14:06     ` Victor Huertas
  1 sibling, 1 reply; 8+ messages in thread
From: Neil Horman @ 2020-02-18 13:12 UTC (permalink / raw)
  To: Bruce Richardson; +Cc: Victor Huertas, dev

On Mon, Feb 17, 2020 at 02:39:58PM +0000, Bruce Richardson wrote:
> On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > Hi all,
> > 
> > I am using DPDK development environment to develop an application from
> > which I have to access C++ code.
> > I managed to modify some internal mk files in the dpdk-stable repository to
> > allow g++ compiler to be supported.
> > 
> > I have all the modified files well identified and I wonder if the support
> > team is interested to add this toolchain in future DPDK releases.
> > 
> Rather than trying to build DPDK with g++, or to use the DPDK makefiles
> with your C++ application, can I recommend instead that you treat DPDK as
> any third-party library and build it independently of your application.
> 
> If you compile and install DPDK using meson and ninja - or install the
> DPDK package from your linux distro - you will have a 'libdpdk.pc' file
> installed for use by pkg-config. Then for building your application, put in
> the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
> 'pkg-config --libs libdpdk', into your app makefile and work from there.
> 
yes, exactly this.  The proscribed method of handling issues like this is to
either:

1) Build dpdk separately (or just install it from whatever distribution you are
using, if thats an option), and just link against it (either statically or
dynamically) when you build your application.

2)  If you embed dpdk source in your
environment, and build it at the same time as your application, you should
interface to its build system, by just calling ninja/meson or make from a build
target in your application - the dpdk build file should properly select gcc
instead of g++, which you should already have if you have g++ installed.

Neil

> Note too, that all DPDK header files should already be safe for inclusion
> in C++ code - if not, please log a bug.
> 
> Regards,
> /Bruce
> 

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

* Re: [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
  2020-02-18 13:12   ` [dpdk-dev] " Neil Horman
@ 2020-02-18 14:06     ` Victor Huertas
  2020-02-19 11:35       ` Neil Horman
  0 siblings, 1 reply; 8+ messages in thread
From: Victor Huertas @ 2020-02-18 14:06 UTC (permalink / raw)
  To: Neil Horman; +Cc: Bruce Richardson, dev

Thanks Neil for your answer,
I think I will try the first option you posted without touching the
makefiles from the dpdk-stable and I will tell how it goes.
So, as a conclusion, it seems that all the modifications I have done are
not necessary in order to build your DPDK application using g++.

Regards,

El mar., 18 feb. 2020 a las 14:13, Neil Horman (<nhorman@tuxdriver.com>)
escribió:

> On Mon, Feb 17, 2020 at 02:39:58PM +0000, Bruce Richardson wrote:
> > On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > > Hi all,
> > >
> > > I am using DPDK development environment to develop an application from
> > > which I have to access C++ code.
> > > I managed to modify some internal mk files in the dpdk-stable
> repository to
> > > allow g++ compiler to be supported.
> > >
> > > I have all the modified files well identified and I wonder if the
> support
> > > team is interested to add this toolchain in future DPDK releases.
> > >
> > Rather than trying to build DPDK with g++, or to use the DPDK makefiles
> > with your C++ application, can I recommend instead that you treat DPDK as
> > any third-party library and build it independently of your application.
> >
> > If you compile and install DPDK using meson and ninja - or install the
> > DPDK package from your linux distro - you will have a 'libdpdk.pc' file
> > installed for use by pkg-config. Then for building your application, put
> in
> > the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
> > 'pkg-config --libs libdpdk', into your app makefile and work from there.
> >
> yes, exactly this.  The proscribed method of handling issues like this is
> to
> either:
>
> 1) Build dpdk separately (or just install it from whatever distribution
> you are
> using, if thats an option), and just link against it (either statically or
> dynamically) when you build your application.
>
> 2)  If you embed dpdk source in your
> environment, and build it at the same time as your application, you should
> interface to its build system, by just calling ninja/meson or make from a
> build
> target in your application - the dpdk build file should properly select gcc
> instead of g++, which you should already have if you have g++ installed.
>
> Neil
>
> > Note too, that all DPDK header files should already be safe for inclusion
> > in C++ code - if not, please log a bug.
> >
> > Regards,
> > /Bruce
> >
>


-- 
Victor

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

* Re: [dpdk-dev] Proposal to add a new toolchain for dpdk: g++
  2020-02-18 14:06     ` Victor Huertas
@ 2020-02-19 11:35       ` Neil Horman
  0 siblings, 0 replies; 8+ messages in thread
From: Neil Horman @ 2020-02-19 11:35 UTC (permalink / raw)
  To: Victor Huertas; +Cc: Bruce Richardson, dev

On Tue, Feb 18, 2020 at 03:06:51PM +0100, Victor Huertas wrote:
> Thanks Neil for your answer,
> I think I will try the first option you posted without touching the
> makefiles from the dpdk-stable and I will tell how it goes.
> So, as a conclusion, it seems that all the modifications I have done are
> not necessary in order to build your DPDK application using g++.
> 
That should be correct, yes.  As Bruce noted, all of the exported header files
are wrapped as extern C, and so they should interface to c++ code, even when the
library is compiled with gcc.  If that doesn't work, thats a bug in DPDK.

Neil

> Regards,
> 
> El mar., 18 feb. 2020 a las 14:13, Neil Horman (<nhorman@tuxdriver.com>)
> escribió:
> 
> > On Mon, Feb 17, 2020 at 02:39:58PM +0000, Bruce Richardson wrote:
> > > On Mon, Feb 17, 2020 at 11:01:21AM +0100, Victor Huertas wrote:
> > > > Hi all,
> > > >
> > > > I am using DPDK development environment to develop an application from
> > > > which I have to access C++ code.
> > > > I managed to modify some internal mk files in the dpdk-stable
> > repository to
> > > > allow g++ compiler to be supported.
> > > >
> > > > I have all the modified files well identified and I wonder if the
> > support
> > > > team is interested to add this toolchain in future DPDK releases.
> > > >
> > > Rather than trying to build DPDK with g++, or to use the DPDK makefiles
> > > with your C++ application, can I recommend instead that you treat DPDK as
> > > any third-party library and build it independently of your application.
> > >
> > > If you compile and install DPDK using meson and ninja - or install the
> > > DPDK package from your linux distro - you will have a 'libdpdk.pc' file
> > > installed for use by pkg-config. Then for building your application, put
> > in
> > > the relevant calls to pkg-config i.e. 'pkg-config --cflags libdpdk' and
> > > 'pkg-config --libs libdpdk', into your app makefile and work from there.
> > >
> > yes, exactly this.  The proscribed method of handling issues like this is
> > to
> > either:
> >
> > 1) Build dpdk separately (or just install it from whatever distribution
> > you are
> > using, if thats an option), and just link against it (either statically or
> > dynamically) when you build your application.
> >
> > 2)  If you embed dpdk source in your
> > environment, and build it at the same time as your application, you should
> > interface to its build system, by just calling ninja/meson or make from a
> > build
> > target in your application - the dpdk build file should properly select gcc
> > instead of g++, which you should already have if you have g++ installed.
> >
> > Neil
> >
> > > Note too, that all DPDK header files should already be safe for inclusion
> > > in C++ code - if not, please log a bug.
> > >
> > > Regards,
> > > /Bruce
> > >
> >
> 
> 
> -- 
> Victor

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

end of thread, other threads:[~2020-02-19 11:35 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-02-17 10:01 [dpdk-dev] Proposal to add a new toolchain for dpdk: g++ Victor Huertas
2020-02-17 12:33 ` Neil Horman
     [not found]   ` <CAGxG5cj1jf_JQ5df3bYOw7uObBQWb7CdwbJpR9fo8VtcreYwYA@mail.gmail.com>
2020-02-17 16:10     ` [dpdk-dev] Fwd: " Victor Huertas
2020-02-17 14:39 ` [dpdk-dev] " Bruce Richardson
     [not found]   ` <CAGxG5cjzFb9qJRAAghCrxncdadD4_b4xBxVEYJ=R=x9t0kLfvQ@mail.gmail.com>
2020-02-17 16:10     ` [dpdk-dev] Fwd: " Victor Huertas
2020-02-18 13:12   ` [dpdk-dev] " Neil Horman
2020-02-18 14:06     ` Victor Huertas
2020-02-19 11:35       ` Neil Horman

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).