Perfect, glad it worked out for you... Dave

From: Jacques Samain (jsamain) <[email protected]>
Sent: Wednesday, October 16, 2019 11:08 AM
To: Dave Barach (dbarach) <[email protected]>; [email protected]
Subject: Re: What is the best way to pass packets from an internal node to a 
process node?

Hello Dave,

I ended up with one mpcap log per worker thread and it works like a charm.
Thanks for your help.

Jacques

From: "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>
Date: Monday, October 14, 2019 at 6:55 PM
To: "Jacques Samain (jsamain)" <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: RE: What is the best way to pass packets from an internal node to a 
process node?

At that data rate, I’d consider using [a per-thread variation of?] 
../src/vppinfra/mpcap.[ch]. Push/pop the buffer length to truncate packets 
after the L3 header across the log operation.

If the spinlock turns out to be a significant serialization point, use one 
mpcap log per worker thread. Since all pkts are timestamped, you should be able 
to merge multiple worker logs.

Logging amounts to a mempcy into a chunk of virtual space backed by file(s) you 
can analyze later. Bonus: you can check the data in wireshark.

I suspect this will yield the best perf/scale available.

HTH... Dave

From: Jacques Samain (jsamain) <[email protected]<mailto:[email protected]>>
Sent: Monday, October 14, 2019 12:29 PM
To: Dave Barach (dbarach) <[email protected]<mailto:[email protected]>>; 
[email protected]<mailto:[email protected]>
Subject: Re: What is the best way to pass packets from an internal node to a 
process node?

Hi Dave,
I want to write to a file the packet headers of each packet for some offline 
traffic analysis. I have 40Gbps incoming traffic, this is why I pass packets to 
a process node, to not do the write in the internal node.

Thanks,
Jacques

From: "Dave Barach (dbarach)" <[email protected]<mailto:[email protected]>>
Date: Monday, October 14, 2019 at 5:50 PM
To: "Jacques Samain (jsamain)" <[email protected]<mailto:[email protected]>>, 
"[email protected]<mailto:[email protected]>" 
<[email protected]<mailto:[email protected]>>
Subject: RE: What is the best way to pass packets from an internal node to a 
process node?

It would help to describe the problem at a higher level. First question: why 
pass packets to a process node?

From: [email protected]<mailto:[email protected]> 
<[email protected]<mailto:[email protected]>> On Behalf Of Jacques Samain 
via Lists.Fd.Io
Sent: Monday, October 14, 2019 11:02 AM
To: [email protected]<mailto:[email protected]>
Cc: [email protected]<mailto:[email protected]>
Subject: [vpp-dev] What is the best way to pass packets from an internal node 
to a process node?

Hello,

I am trying to pass packets from an internal node (running on a worker thread) 
to a process node, and I am looking for the best way to do that.
Currently, I have a pool of arrays that is shared between the two nodes (using 
a spinlock for pool_get and pool_put). In the internal node, I copy each packet 
of a frame to one of the array of the pool (pool_get) and then pass this array 
to the process node, using vlib_process_signal_event_mt. In the process node, I 
do some processing on the packets and then release the array (pool_put).
Is there a better way of doing this, without spinlocks for example?

Thanks,
Jacques
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#14185): https://lists.fd.io/g/vpp-dev/message/14185
Mute This Topic: https://lists.fd.io/mt/34534267/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to