From 12989b538881f9681f078cf1485c51df1251877a Mon Sep 17 00:00:00 2001 From: Neale Ranns Date: Thu, 26 Sep 2019 16:20:19 +0000 Subject: ipsec: remove dedicated IPSec tunnels APIs for dedicated IPSec tunnels will remain in this release and are used to programme the IPIP tunnel protect. APIs will be removed in a future release. see: https://wiki.fd.io/view/VPP/IPSec Type: feature Change-Id: I0f01f597946fdd15dfa5cae3643104d5a9c83089 Signed-off-by: Neale Ranns --- src/vnet/ipsec/ipsec_sa.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/vnet/ipsec/ipsec_sa.c') diff --git a/src/vnet/ipsec/ipsec_sa.c b/src/vnet/ipsec/ipsec_sa.c index f22458da562..712d0d5e42f 100644 --- a/src/vnet/ipsec/ipsec_sa.c +++ b/src/vnet/ipsec/ipsec_sa.c @@ -317,6 +317,20 @@ ipsec_sa_unlock (index_t sai) fib_node_unlock (&sa->node); } +void +ipsec_sa_lock (index_t sai) +{ + ipsec_main_t *im = &ipsec_main; + ipsec_sa_t *sa; + + if (INDEX_INVALID == sai) + return; + + sa = pool_elt_at_index (im->sad, sai); + + fib_node_lock (&sa->node); +} + index_t ipsec_sa_find_and_lock (u32 id) { -- cgit 1.2.3-korg