vls: relax copy on fork locks
Change-Id: I08cb7180364a5ef8444c9895c6d4f4842661b2a7
Signed-off-by: Florin Coras <fcoras@cisco.com>
diff --git a/src/vcl/vcl_locked.c b/src/vcl/vcl_locked.c
index 5539191..3b6817c 100644
--- a/src/vcl/vcl_locked.c
+++ b/src/vcl/vcl_locked.c
@@ -397,7 +397,7 @@
wrk->sessions = pool_dup (parent_wrk->sessions);
wrk->session_index_by_vpp_handles =
hash_dup (parent_wrk->session_index_by_vpp_handles);
- vls_table_wlock ();
+ vls_table_rlock ();
/* *INDENT-OFF* */
pool_foreach (s, wrk->sessions, ({
@@ -405,7 +405,7 @@
}));
/* *INDENT-ON* */
- vls_table_wunlock ();
+ vls_table_runlock ();
}
static void