Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-06 Thread Damjan Marion via Lists.Fd.Io
cle); > > > > > > > From: Damjan Marion > Sent: Friday, July 06, 2018 6:14 PM > To: Kingwel Xie > Cc: Vamsi Krishna ; Jim Thompson ; Dave > Barach ; vpp-dev@lists.fd.io > Subject: Re: [vpp-dev] Is VPP IPSec implementation thread safe? > > &g

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-06 Thread Kingwel Xie
: Damjan Marion Sent: Friday, July 06, 2018 6:14 PM To: Kingwel Xie Cc: Vamsi Krishna ; Jim Thompson ; Dave Barach ; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Is VPP IPSec implementation thread safe? We don't use recycle anymore (except at one place), mainly due ot the issue how dpdk works

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-06 Thread Damjan Marion via Lists.Fd.Io
We don't use recycle anymore (except at one place), mainly due ot the issue how dpdk works. -- Damjan > On 6 Jul 2018, at 11:27, Kingwel Xie wrote: > > Well, there is a vector named recycle to remember all old buffers, which > consequently means a lot of mem resize, mem_cpy when vector rate

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-06 Thread Kingwel Xie
y, July 03, 2018 5:14 PM To: Kingwel Xie Cc: Vamsi Krishna ; Jim Thompson ; Dave Barach ; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Is VPP IPSec implementation thread safe? On 3 Jul 2018, at 02:36, Kingwel Xie mailto:kingwel@ericsson.com>> wrote: Hi Damjan, Thanks for the heads-up.

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-03 Thread Damjan Marion via Lists.Fd.Io
> On 3 Jul 2018, at 02:36, Kingwel Xie wrote: > > Hi Damjan, > > Thanks for the heads-up. Never come to that. I’m still thinking it is > acceptable if we are doing IPSec. Buffer copying is a significant overhead. What i wanted to say by copying is writing encrypted data into new buffer

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-02 Thread Kingwel Xie
all of them. Regards, Kingwel From: vpp-dev@lists.fd.io On Behalf Of Damjan Marion Sent: Monday, July 02, 2018 7:43 PM To: Kingwel Xie Cc: Vamsi Krishna ; Jim Thompson ; Dave Barach ; vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Is VPP IPSec implementation thread safe? -- Damjan On 2 Jul 2018

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-02 Thread Jim Thompson
> On Jul 1, 2018, at 11:05 PM, Vamsi Krishna wrote: > > How is the performance of this code in terms of throughput, are there any > benchmarks that can be referred to? Four host setup (2 hosts for tunnel endpoints, 2 hosts outside tunnel as source & sink) Source / sink Xeon E3-1275 v3 w/40G

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-02 Thread Damjan Marion
-- Damjan > On 2 Jul 2018, at 11:14, Kingwel Xie wrote: > > Hi Vamsi, Damjan, > > I’d like to contribute my two cents about IPSEC. We have been working on the > improvement for quite some time. > > Great that vPP supports IPSEC, but the code is mainly for PoC. It lacks of > many

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-02 Thread Kingwel Xie
ev@lists.fd.io<mailto:vpp-dev@lists.fd.io> mailto:vpp-dev@lists.fd.io>> On Behalf Of Damjan Marion Sent: Wednesday, June 27, 2018 6:59 AM To: Vamsi Krishna mailto:vamsi...@gmail.com>> Cc: vpp-dev@lists.fd.io<mailto:vpp-dev@lists.fd.io> Subject: Re: [vpp-dev] Is VPP IPSec implem

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-07-01 Thread Vamsi Krishna
i/api_shared.c:v >>>> l_api_msg_handler_with_vm_node(...) >>>> >>>> >>>> >>>> if (!am->is_mp_safe[id]) >>>> >>>> { >>>> >>>>vl_msg_api_barrier_trace_context (am->msg_names[id]); &g

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-29 Thread Damjan Marion
er_sync (); >> >> } >> >> (*handler) (the_msg, vm, node); >> >> >> >> if (!am->is_mp_safe[id]) >> >>vl_msg_api_barrier_release (); >> >> >> >> Typical example of ma

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-29 Thread Vamsi Krishna
vl_msg_api_barrier_release (); >>> >>> >>> >>> Typical example of marking a message mp-safe: >>> >>> >>> >>> api_main_t *am=_main; >>> >>> ... >>> >>> >>> >>>

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-29 Thread Damjan Marion
same scheme. Unless otherwise marked mp-safe, debug > CLI commands are executed with worker threads paused in a barrier sync. > > > > HTH... Dave > > > > -Original Message- > From: vpp-dev@lists.fd.io <mailto:vpp-dev@lists.fd.io> &

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-28 Thread Jim Thompson
_mp_safe[VL_API_MEMCLNT_KEEPALIVE_REPLY] = 1; >> >> >> >> The debug CLI uses the same scheme. Unless otherwise marked mp-safe, >> debug CLI commands are executed with worker threads paused in a barrier >> sync. >> >> >> >> HTH... Dave &

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-28 Thread Vamsi Krishna
; The debug CLI uses the same scheme. Unless otherwise marked mp-safe, debug > CLI commands are executed with worker threads paused in a barrier sync. > > > > HTH... Dave > > > > -----Original Message- > From: vpp-dev@lists.fd.io On Behalf Of Damjan Marion > Sent:

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-27 Thread Dave Barach via Lists.Fd.Io
@lists.fd.io On Behalf Of Damjan Marion Sent: Wednesday, June 27, 2018 6:59 AM To: Vamsi Krishna Cc: vpp-dev@lists.fd.io Subject: Re: [vpp-dev] Is VPP IPSec implementation thread safe? ipsec data structures are updated during barrier sync, so there is not packets in-flight... > On 27 Jun

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-27 Thread Damjan Marion
ipsec data structures are updated during barrier sync, so there is not packets in-flight... > On 27 Jun 2018, at 07:45, Vamsi Krishna wrote: > > Hi , > > I have looked at the ipsec code in VPP and trying to understand how it works > in a multi threaded environment. Noticed that the

Re: [vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-27 Thread Klement Sekera via Lists.Fd.Io
Hi, I agree that there is an unlikely corner case which could result in vpp assert. I don't think there is a real chance to hit this in a production image, since it would require you to successfully make two API calls (drop old entry, replace with new entry) while there are packets in flight.

[vpp-dev] Is VPP IPSec implementation thread safe?

2018-06-26 Thread Vamsi Krishna
Hi , I have looked at the ipsec code in VPP and trying to understand how it works in a multi threaded environment. Noticed that the datastructures for spd, sad and tunnel interface are pools and there are no locks to prevent race conditions. For instance the ipsec-input node passes SA index to