OK, yes, that is needed as it will take care for buffers which are cloned. Potential optimisation here would be to reuse buffer if vlib_buffer_t->n_add_refs != 0.
-- Damjan > On 6 Jul 2018, at 12:27, Kingwel Xie <kingwel....@ericsson.com> wrote: > > Sorry, Damjan. Maybe I confused you. > > This is what I am talking about: > > In esp_encrypt_node_fn(), the logic is like this: > > u32 *recycle = 0; > … > vec_add1 (recycle, i_bi0); > … > free_buffers_and_exit: > if (recycle) > vlib_buffer_free (vm, recycle, vec_len (recycle)); > vec_free (recycle); > > > > > > > From: Damjan Marion <dmar...@me.com> > Sent: Friday, July 06, 2018 6:14 PM > To: Kingwel Xie <kingwel....@ericsson.com> > Cc: Vamsi Krishna <vamsi...@gmail.com>; Jim Thompson <j...@netgate.com>; Dave > Barach <dbar...@cisco.com>; 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. > -- > Damjan > > > On 6 Jul 2018, at 11:27, Kingwel Xie <kingwel....@ericsson.com > <mailto:kingwel....@ericsson.com>> 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 is 256 or > so. Counting all of these overhead, I’d say, I see around 7~10% impact, after > fixing openssl usage issue. > > We don't use recycle anymore (except at one place), mainly due ot the issue > how dpdk works. > -- > Damjan > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > > View/Reply Online (#9789): https://lists.fd.io/g/vpp-dev/message/9789 > <https://lists.fd.io/g/vpp-dev/message/9789> > Mute This Topic: https://lists.fd.io/mt/22720913/675642 > <https://lists.fd.io/mt/22720913/675642> > Group Owner: vpp-dev+ow...@lists.fd.io <mailto:vpp-dev+ow...@lists.fd.io> > Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub > <https://lists.fd.io/g/vpp-dev/unsub> [dmar...@me.com > <mailto:dmar...@me.com>] > -=-=-=-=-=-=-=-=-=-=-=-
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#9790): https://lists.fd.io/g/vpp-dev/message/9790 Mute This Topic: https://lists.fd.io/mt/22720913/21656 Group Owner: vpp-dev+ow...@lists.fd.io Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-