Re: [EXTERNAL] [vpp-dev] Multi-threading locks and synchronization

2021-07-15 Thread satish amara
Thank you guidance on this topic. Is there good documentation on API usage? VPPINFRA (Infrastructure) — Vector Packet Processor 01 documentation (fdio-vpp.readthedocs.io) This info is too little to understand

Re: [EXTERNAL] [vpp-dev] Multi-threading locks and synchronization

2021-07-13 Thread Damjan Marion via lists.fd.io
> On 13.07.2021., at 18:41, satish amara wrote: > > Sync is needed. It's a question about the design of packet flow in VPP. > Locks can be avoided if the packets in a flow are processed by the same > thread. You can use the handoff to make sure all packets belonging to specific flow or s

Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-13 Thread satish amara
Sync is needed. It's a question about the design of packet flow in  VPP. Locks can be avoided if the packets in a flow are processed by the same thread. -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#19757): https://lists.fd.io/g/vpp-dev/message/19

Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-13 Thread Chris Luke via lists.fd.io
Really depends on what you need it to do, which I may have missed. Why do you need any synchronization at all? Chris From: vpp-dev@lists.fd.io on behalf of satish amara Date: Monday, July 12, 2021 at 23:59 To: vpp-dev@lists.fd.io Subject: Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks

Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread satish amara
Thank you for your explanation.  What is recommended way if a custom plugin is working on multiple threads. Direct the packet in the same flow to the same thread or use spinlocks for synchronization. It looks like for IPSEC VPP code is trying the process the packets on the same flow on the same

Re: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread Chris Luke via lists.fd.io
: Monday, July 12, 2021 at 16:48 To: Damjan Marion , vpp-dev@lists.fd.io Subject: [EXTERNAL] Re: [vpp-dev] Multi-threading locks and synchronization "Interfaces are created/deleted under the barrier so there is not packets in flight." Can you please add more details? I just gave a scenario.

Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread satish amara
[Edited Message Follows] "Interfaces are created/deleted under the barrier so there is not packets in flight." Can you please add more details?  I just gave a scenario. In general, this is applicable to all meta fields  /Opaque fields. How is VPP handling the outdated meta fields in packets du

Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread satish amara
"Interfaces are created/deleted under the barrier so there is not packets in flight." Can you please add more details? I just gave a scenario. In general, this is applicable to all meta fields /Opaque fields. How are handling the outdated meta fields in packets due to config changes? Does this m

Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread Damjan Marion via lists.fd.io
> On 11.07.2021., at 17:10, satish amara > wrote: > > [Edited Message Follows] > > Hi, >I have a few questions about how synchronization is being done when there > are multiple workers/threads accessing the same data structure. > For example, IPsec headers ha

Re: [vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread Damjan Marion via lists.fd.io
> On 11.07.2021., at 17:10, satish amara > wrote: > > [Edited Message Follows] > > Hi, >I have a few questions about how synchronization is being done when there > are multiple workers/threads accessing the same data structure. > For example, IPsec headers ha

[vpp-dev] Multi-threading locks and synchronization

2021-07-12 Thread satish amara
[Edited Message Follows] Hi, I have a few questions about how synchronization is being done when there are multiple workers/threads accessing the same data structure. For example, IPsec headers have a seq number that gets incremented. If we have IPsec flow and encrypting packets on VPP do we assu

[vpp-dev] Multi-threading locks and synchronization

2021-07-11 Thread satish amara
[Edited Message Follows] Hi, I have a few questions about how synchronization is being done when there are multiple workers/threads accessing the same data structure. For example, IPsec headers have a seq number that gets incremented. If we have IPsec flow and encrypting packets on VPP do we assu

[vpp-dev] Multi-threading locks and synchronization

2021-07-11 Thread satish amara
Hi, I have a few questions about how synchronization is being done when there are multiple workers/threads accessing the same data structure. For example IPsec headers have a seq number which gets incremented. If we have IPsec flow and encrypting packets on VPP do we assume that packets in the

[vpp-dev] Multi-threading

2021-07-09 Thread satish amara
[Edited Message Follows] Hi, I am trying to understand and educate myself on which data structures in VPP infra are thread-safe for multi-threading. If I have multiple workers and using data structures in VPP infra in a custom plugin. I see some documentation but not on all. . VPPINFRA (Infras

[vpp-dev] Multi-threading

2021-07-09 Thread satish amara
Hi, I am trying to understand and educate myself on which data structures in VPP infra are thread-safe for multi-threading. If I have multiple workers and using data structures in VPP infra in a custom plugin. .VPPINFRA (Infrastructure) — Vector Packet Processor 01 documentation (fdio-vpp.readt