aboutsummaryrefslogtreecommitdiffstats
path: root/src/vcl/vppcom.c
diff options
context:
space:
mode:
authorFlorin Coras <fcoras@cisco.com>2018-11-27 00:04:59 -0800
committerDave Barach <openvpp@barachs.net>2018-11-27 22:55:36 +0000
commit30e273b3055174f0b6fefd240a39fe93253669cd (patch)
tree1b74ae45ee367708b07641c3ed5acb5e222d16f2 /src/vcl/vppcom.c
parentdbc34b89061feae88e0641eab4c82e48903b8396 (diff)
ldp: sid to fd mapper for apps with multiple workers
Change-Id: I79585cd6b467b007c3eb9a7668387ff3777de46d Signed-off-by: Florin Coras <fcoras@cisco.com>
Diffstat (limited to 'src/vcl/vppcom.c')
-rw-r--r--src/vcl/vppcom.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/vcl/vppcom.c b/src/vcl/vppcom.c
index f20167226e8..b397058052c 100644
--- a/src/vcl/vppcom.c
+++ b/src/vcl/vppcom.c
@@ -3353,6 +3353,12 @@ vppcom_session_index (uint32_t session_handle)
}
int
+vppcom_session_handle (uint32_t session_index)
+{
+ return vcl_get_worker_index () << 24 | session_index;
+}
+
+int
vppcom_worker_register (void)
{
if (vcl_worker_alloc_and_init ())