[dpdk-users] Is DPDK compatible with C++11 threads?

2016-11-08 Thread Pavey, Nicholas
I?ve built the DPDK along with code in both C and C++. It works fine as long as 
you get the linkage between the languages correct and make sure that you don?t 
pass C++ headers into files compiled with the C compiler.

I did try building the DPDK itself with the ?g++? compiler (v4.8.4, Ubuntu 
14.04, 64bit), and I wasn?t able to get that working out of the box. I got 
hundreds of warnings, but I didn?t take the time to debug it ? it?s possible 
that a few point fixes in the build system / DPDK code might yield a clean 
compile.

Thanks,


Nick

From: "Wiles, Keith" 
Date: Tuesday, November 8, 2016 at 12:04 PM
To: David Aldrich 
Cc: "users at dpdk.org" 
Subject: Re: [dpdk-users] Is DPDK compatible with C++11 threads?


On Nov 8, 2016, at 5:12 AM, David Aldrich mailto:David.Aldrich at EMEA.NEC.COM>> wrote:
Hi
As a beginner with DPDK, I want to consider how we can convert an existing 
Linux application from using the kernel network stack to using DPDK.
This existing app is multi-threaded, using the C++11 thread, mutex etc. 
classes.  We assign threads to cores by calling pthread_setaffinity_np().
I have looked at the DPDK helloworld application and see that it launches 
threads using the DPDK API:
   /* call lcore_hello() on every slave lcore */
   RTE_LCORE_FOREACH_SLAVE(lcore_id) {
  rte_eal_remote_launch(lcore_hello, NULL, 
lcore_id);
   }
If we use DPDK, can we retain our existing C++11 threads or are we obliged to 
use the DPDK threading APIs exclusively?

You should be able to use the standard C++11 threads I believe, in DPDK we are 
just using pthreads and set affinity to lock a thread to a core. You can still 
use pthreads in your application.

Perhaps a more basic question is applicable: is DPDK compatible with C++?

I believe building DPDK with C++ code does work,  but I have not tried it 
myself.

Best regards
David
Best regards
David

Regards,
Keith




[dpdk-users] Is DPDK compatible with C++11 threads?

2016-11-08 Thread Wiles, Keith

> On Nov 8, 2016, at 5:12 AM, David Aldrich  
> wrote:
> 
> Hi
> 
> As a beginner with DPDK, I want to consider how we can convert an existing 
> Linux application from using the kernel network stack to using DPDK.
> 
> This existing app is multi-threaded, using the C++11 thread, mutex etc. 
> classes.  We assign threads to cores by calling pthread_setaffinity_np().
> 
> I have looked at the DPDK helloworld application and see that it launches 
> threads using the DPDK API:
> 
>   /* call lcore_hello() on every slave lcore */
>   RTE_LCORE_FOREACH_SLAVE(lcore_id) {
>  rte_eal_remote_launch(lcore_hello, NULL, 
> lcore_id);
>   }
> 
> If we use DPDK, can we retain our existing C++11 threads or are we obliged to 
> use the DPDK threading APIs exclusively?

You should be able to use the standard C++11 threads I believe, in DPDK we are 
just using pthreads and set affinity to lock a thread to a core. You can still 
use pthreads in your application.

> 
> Perhaps a more basic question is applicable: is DPDK compatible with C++?

I believe building DPDK with C++ code does work,  but I have not tried it 
myself.

> 
> Best regards
> 
> David
> 
> 
> 
> Best regards
> 
> David
> 

Regards,
Keith



[dpdk-users] After passing some traffic getting error tx_burst failed at lcore(1), port (0)

2016-11-08 Thread Tejas Kasundra
Hello Experts,

Any input will be appreciated on below issue, posting it again.

I am facing problem with one of my application with DPDK. Please find below
details of my setup,

Host - Ubuntu 14.04 with KVM-QEMU(4.2.0-27-generic) 64 bit
Guest - Ubuntu 14.04(3.13.0-24-generic) 64 bit
DPDK - 16.04 running in VM
Huge page - 2000(2MB) on guest VM
Intel NIC 350 T-4
Configured grub parameter - intel_iommu=on, iommu=pt
Using 4 core with DPDK

Now when I start traffic, DPDK start processing traffic and for 15-20
minutes everything works fine.

Then after a while DPDK stops processing traffic and I can see error on log
like tx_burst failed at lcore(1), port (0).

I checked DPDK process health and I do not see any problem with that like
hang or crash.

Any help or lead will be appreciated.

Br,
Tejas

On Thu, Oct 20, 2016 at 9:40 AM, Tejas Kasundra 
wrote:

> Hello Experts,
>
> I am facing problem with one of my application with DPDK. Please find
> below details of my setup,
>
> Host - Ubuntu 14.04 with KVM-QEMU(4.2.0-27-generic) 64 bit
> Guest - Ubuntu 14.04(3.13.0-24-generic) 64 bit
> DPDK - 16.04 running in VM
> Huge page - 2000(2MB) on guest VM
> Intel NIC 350 T-4
> Configured grub parameter - intel_iommu=on, iommu=pt
> Using 4 core with DPDK
>
> Now when I start traffic, DPDK start processing traffic and for 15-20
> minutes everything works fine.
>
> Then after a while DPDK stops processing traffic and I can see error on
> log like tx_burst failed at lcore(1), port (0).
>
> I checked DPDK process health and I do not see any problem with that like
> hang or crash.
>
> Any help or lead will be appreciated.
>
> Br,
> Tejas
>
>
>