Hi.

Can anyone help me on this issue?

Thanks for your patience.

On 11/29/2014 11:00 AM, Igor Romanovich wrote:
> Hi,
> 
> Does anyone have an idea I can try?
> 
> On 11/27/2014 03:35 PM, Igor Romanovich wrote:
>> Hi all,
>>
>> I'm working on a multi-threaded multi-interface high-throughput packet
>> generator. The architecture consists of a number of producer threads,
>> each (nearly) independently creating packets according to a reference
>> model of packet flows. I've used PF_RING ZC successfully, using the
>> standard libpcap API, just changing the interface to "zc:ethX". I had no
>> problem with three producer threads, writing onto a single 10 Gbps
>> interface. However I'm experiencing throughput limits, when using
>> multiple interfaces, the sum of two interfaces reachs a maximum of 15-16
>> Gbps, with three or more of producer threads.
>>
>> I reached the conclusion that maybe I can get a performance boost, using
>> the native PF_RING ZC API (probably the burst API). To get familiar with
>> the ZC API, before changing my own packet generator, I started with
>> zsend.c, in the zc_examples folder, changed it to work with multiple
>> threads and interfaces, and removed the unnecessary parts (code link is
>> at end of message).  Unfortunately, the threads start by writing out
>> some packets, but after about a second, the system hangs in a deadlock
>> where both threads are stuck in this loop (lines 411-420 in zsend.cpp):
>>
>>      while ((sent_bytes = pfring_zc_send_pkt(zq[d],
>> &buffers[threadIndex][d][buffer_id[d]], flush_packet)) < 0) {
>>              if (do_shutdown)
>>                      break;
>>              if (!active)
>>                      usleep(1);
>>              ....
>>      }
>>
>> On each round sent_bytes is negative and the packets don't get sent. I
>> tried hard to find what has caused this, but I have no clue.
>>
>> To test this, please download the code file (link at end of message),
>> and extract it. Then change line 486, appropriately:
>>      
>>      devices.push_back(string("zc:eth4"));
>>
>> And compile the code:
>>
>> make clean
>> make
>>
>> Then run zsend like this:
>>
>> ./zsend -t 2
>>
>> That makes it create two producer threads, both writing on the interface
>> specified on line 486.
>>
>> Any clue?
>>
>> The code is uploaded here: https://yadi.sk/d/K73fdfGicyBrq
>>
>> Best Regards,
>> Igor
>>
_______________________________________________
Ntop-misc mailing list
[email protected]
http://listgateway.unipi.it/mailman/listinfo/ntop-misc

Reply via email to