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)" <dbar...@cisco.com> Date: Monday, October 14, 2019 at 6:55 PM To: "Jacques Samain (jsamain)" <jsam...@cisco.com>, "vpp-dev@lists.fd.io" <vpp-dev@lists.fd.io> 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) <jsam...@cisco.com> Sent: Monday, October 14, 2019 12:29 PM To: Dave Barach (dbarach) <dbar...@cisco.com>; vpp-dev@lists.fd.io 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)" <dbar...@cisco.com<mailto:dbar...@cisco.com>> Date: Monday, October 14, 2019 at 5:50 PM To: "Jacques Samain (jsamain)" <jsam...@cisco.com<mailto:jsam...@cisco.com>>, "vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>" <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> 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: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> <vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io>> On Behalf Of Jacques Samain via Lists.Fd.Io Sent: Monday, October 14, 2019 11:02 AM To: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> 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 (#14184): https://lists.fd.io/g/vpp-dev/message/14184 Mute This Topic: https://lists.fd.io/mt/34534267/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-